made it compilabe with non-C99 compilers
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 21 Oct 2003 13:25:35 +0000 (13:25 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 21 Oct 2003 13:25:35 +0000 (13:25 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@257 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/secure-mount.c

index 34af02f..8b72ace 100644 (file)
@@ -549,16 +549,17 @@ int main(int argc, char *argv[])
   };
 
   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;