• Home
  • Raw
  • Download

Lines Matching refs:fd

47 	int r, fd;  in mfd_assert_new()  local
49 fd = sys_memfd_create(name, flags); in mfd_assert_new()
50 if (fd < 0) { in mfd_assert_new()
56 r = ftruncate(fd, sz); in mfd_assert_new()
62 return fd; in mfd_assert_new()
65 static __u64 mfd_assert_get_seals(int fd) in mfd_assert_get_seals() argument
69 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals()
71 printf("GET_SEALS(%d) failed: %m\n", fd); in mfd_assert_get_seals()
78 static void mfd_assert_has_seals(int fd, __u64 seals) in mfd_assert_has_seals() argument
82 s = mfd_assert_get_seals(fd); in mfd_assert_has_seals()
85 (unsigned long long)seals, (unsigned long long)s, fd); in mfd_assert_has_seals()
90 static void mfd_assert_add_seals(int fd, __u64 seals) in mfd_assert_add_seals() argument
95 s = mfd_assert_get_seals(fd); in mfd_assert_add_seals()
96 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
99 fd, (unsigned long long)s, (unsigned long long)seals); in mfd_assert_add_seals()
104 static int mfd_busy_add_seals(int fd, __u64 seals) in mfd_busy_add_seals() argument
109 r = fcntl(fd, F_GET_SEALS); in mfd_busy_add_seals()
115 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_busy_add_seals()
118 fd, (unsigned long long)s, (unsigned long long)seals); in mfd_busy_add_seals()
125 static void *mfd_assert_mmap_shared(int fd) in mfd_assert_mmap_shared() argument
133 fd, in mfd_assert_mmap_shared()
143 static void *mfd_assert_mmap_private(int fd) in mfd_assert_mmap_private() argument
151 fd, in mfd_assert_mmap_private()
232 int fd, mfd, r; in main() local
244 fd = open(argv[1], O_RDONLY | O_CLOEXEC); in main()
245 if (fd < 0) { in main()
271 r = read(fd, p, MFD_DEF_SIZE); in main()
307 close(fd); in main()