From: Enrico Scholz Date: Tue, 21 Oct 2003 13:25:35 +0000 (+0000) Subject: made it compilabe with non-C99 compilers X-Git-Tag: VERSION_0_10~1156 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36bfe6c2668bbce4ec6091821d749c78e54feca9;p=util-vserver.git made it compilabe with non-C99 compilers git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@257 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/src/secure-mount.c b/util-vserver/src/secure-mount.c index 34af02f..8b72ace 100644 --- a/util-vserver/src/secure-mount.c +++ b/util-vserver/src/secure-mount.c @@ -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;