Lines Matching refs:mountfd

130     int mountfd = open(mount_path, O_RDONLY | O_DIRECTORY | O_ADMIN);
131 ASSERT_GT(mountfd, 0, "Couldn't open mount point");
132 ASSERT_EQ(fmount(fd, mountfd, DISK_FORMAT_MINFS, &default_mount_options, launch_stdio_async),
135 ASSERT_EQ(fumount(mountfd), ZX_OK);
138 ASSERT_EQ(close(mountfd), 0, "Couldn't close ex-mount point");
159 int mountfd = open(mount_path, O_RDONLY | O_DIRECTORY | O_ADMIN);
160 ASSERT_GT(mountfd, 0, "Couldn't open mount point");
165 ASSERT_EQ(fmount(fd, mountfd, DISK_FORMAT_MINFS, &default_mount_options, launch_stdio_async),
168 ASSERT_NE(fumount(mountfd), ZX_OK);
169 ASSERT_EQ(close(mountfd), 0, "Couldn't close unlinked not-mount point");
176 mountfd = open(mount_path, O_CREAT | O_RDWR);
177 ASSERT_GT(mountfd, 0);
179 ASSERT_EQ(fmount(fd, mountfd, DISK_FORMAT_MINFS, &default_mount_options, launch_stdio_async),
182 ASSERT_NE(fumount(mountfd), ZX_OK);
183 ASSERT_EQ(close(mountfd), 0, "Couldn't close file not-mount point");
191 mountfd = open(mount_path, O_RDONLY | O_DIRECTORY);
192 ASSERT_GT(mountfd, 0, "Couldn't open mount point");
193 ASSERT_EQ(fmount(fd, mountfd, DISK_FORMAT_MINFS, &default_mount_options, launch_stdio_async),
196 ASSERT_EQ(close(mountfd), 0, "Couldn't close the unpriviledged mount point");
201 mountfd = open(mount_path, O_RDONLY | O_DIRECTORY | O_ADMIN);
202 ASSERT_GT(mountfd, 0, "Couldn't open mount point");
203 ASSERT_EQ(fmount(fd, mountfd, DISK_FORMAT_MINFS, &default_mount_options, launch_stdio_async),
208 ASSERT_EQ(fmount(fd, mountfd, DISK_FORMAT_MINFS, &default_mount_options, launch_stdio_async),
239 ASSERT_EQ(fumount(mountfd), ZX_OK);
241 ASSERT_EQ(close(mountfd), 0);
263 int mountfd = open(parent_path, O_RDONLY | O_DIRECTORY | O_ADMIN);
264 ASSERT_GT(mountfd, 0, "Couldn't open mount point");
268 fmount(ramdiskfd, mountfd, DISK_FORMAT_MINFS, &default_mount_options, launch_stdio_async),
270 ASSERT_EQ(close(mountfd), 0);
439 fbl::unique_fd mountfd(open(mount_path, O_RDONLY | O_ADMIN));
440 ASSERT_TRUE(mountfd);
445 fzl::FdioCaller caller(fbl::move(mountfd));
457 mountfd.reset(open(mount_path, O_RDONLY | O_ADMIN));
458 ASSERT_TRUE(mountfd);
459 caller.reset(fbl::move(mountfd));
467 mountfd.reset(open(mount_path, O_RDONLY));
468 ASSERT_TRUE(mountfd);
469 caller.reset(fbl::move(mountfd));
478 mountfd.reset(open(mount_path, O_RDONLY | O_ADMIN));
479 ASSERT_TRUE(mountfd);
480 caller.reset(fbl::move(mountfd));