git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@257
94cd875c-1c1d-0410-91d2-
eb244daf1a30
};
struct Options opt = {
- .mtab = "/etc/mtab",
- .fstab = "/etc/fstab",
- .rootdir = 0,
- .ignore_mtab = false,
- .mount_all = false,
- .is_secure = false,
-
- .cur_rootdir_fd = open("/", O_RDONLY|O_DIRECTORY)
+ .mtab = "/etc/mtab",
+ .fstab = "/etc/fstab",
+ .rootdir = 0,
+ .ignore_mtab = false,
+ .mount_all = false,
+ .is_secure = false,
+ .cur_rootdir_fd = -1
};
+ opt.cur_rootdir_fd = open("/", O_RDONLY|O_DIRECTORY);
+
if (opt.cur_rootdir_fd==-1) {
perror("open(\"/\")");
return EXIT_FAILURE;