• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (C) 2024 SUSE LLC Andrea Cervesato <andrea.cervesato@suse.com>
4  */
5 
6 #ifndef LISTMOUNT_H
7 #define LISTMOUNT_H
8 
9 #define _GNU_SOURCE
10 
11 #include "tst_test.h"
12 #include "lapi/mount.h"
13 #include "lapi/syscalls.h"
14 
listmount(uint64_t mnt_id,uint64_t last_mnt_id,uint64_t list[],size_t num,unsigned int flags)15 static inline ssize_t listmount(uint64_t mnt_id, uint64_t last_mnt_id,
16 			 uint64_t list[], size_t num, unsigned int flags)
17 {
18 	struct mnt_id_req req = {
19 		.size = MNT_ID_REQ_SIZE_VER0,
20 		.mnt_id = mnt_id,
21 		.param = last_mnt_id,
22 	};
23 
24 	return tst_syscall(__NR_listmount, &req, list, num, flags);
25 }
26 
27 #endif
28