use wrappers with detailed error-messages
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 27 Feb 2004 04:42:10 +0000 (04:42 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 27 Feb 2004 04:42:10 +0000 (04:42 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1022 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/fakerunlevel.c
util-vserver/src/rpm-fake-resolver.c
util-vserver/src/save_ctxinfo.c
util-vserver/src/vrsetup.c
util-vserver/src/vserver-stat.c

index 0ca0201..d532d69 100644 (file)
@@ -101,7 +101,7 @@ int main (int argc, char *argv[])
     }
 
     umask(002);
-    fd = Eopen(fname, O_WRONLY|O_CREAT|O_APPEND, 0664);
+    fd = EopenD(fname, O_WRONLY|O_CREAT|O_APPEND, 0664);
     Eclose(fd);
 
     utmpname (fname);
index cb04281..640946d 100644 (file)
@@ -248,7 +248,7 @@ int main(int argc, char * argv[])
 
   parseArgs(&args, argc, argv);
   if (args.pid_file && args.do_fork)
-    pid_fd = Eopen(args.pid_file, O_CREAT|O_WRONLY, 0644);
+    pid_fd = EopenD(args.pid_file, O_CREAT|O_WRONLY, 0644);
   
   if (args.chroot) Echroot(args.chroot);
   Echdir("/");
index 2dd49f0..d91d884 100644 (file)
@@ -75,10 +75,10 @@ int main(int argc, char *argv[])
     return 255;
   }
 
-  Ereadlink(runfile, dstfile, sizeof(dstfile));
+  EreadlinkD(runfile, dstfile, sizeof(dstfile));
   len  = utilvserver_fmt_uint(buf, ctx);
 
-  fd = Eopen(dstfile, O_EXCL|O_CREAT|O_WRONLY, 0644);
+  fd = EopenD(dstfile, O_EXCL|O_CREAT|O_WRONLY, 0644);
   if (write(fd, buf,     len) !=len  ||
       write(fd, "\n",    1)   !=1) {
     perror("save_ctxinfo: write()");
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
   strcat(runfile, ".rev/");
   strcat(runfile, buf);
   unlink(runfile);
-  Esymlink(argv[1], runfile);
+  EsymlinkD(argv[1], runfile);
 
   Eexecv(argv[2], argv+2);
 }
index f2d3eee..b750d64 100644 (file)
@@ -118,12 +118,12 @@ int main(int argc, char *argv[])
   root_device = argv[optind];
   if (do_setup) real_root_device = argv[optind+1];
 
-  fd = Eopen(root_device, O_RDONLY, 0);
+  fd = EopenD(root_device, O_RDONLY, 0);
   if      (do_increment) Eioctl(fd, VROOT_INC_USE, 0);
   else if (do_decrement) Eioctl(fd, VROOT_DEC_USE, 0);
   else if (do_delete)    Eioctl(fd, VROOT_CLR_DEV, 0);
   else {
-    int                dfd = Eopen(real_root_device, O_RDONLY, 0);
+    int                dfd = EopenD(real_root_device, O_RDONLY, 0);
     Eioctl(fd, VROOT_SET_DEV, (void*)dfd);
     Eclose(dfd);
   }
index 7ca6504..298223f 100644 (file)
@@ -143,7 +143,7 @@ getUptime()
   uint32_t     msecs=0;
 
     // open the /proc/uptime file
-  fd  = Eopen("/proc/uptime", O_RDONLY, 0);
+  fd  = EopenD("/proc/uptime", O_RDONLY, 0);
   len = Eread(fd, buffer, sizeof buffer);
 
   if (len==sizeof(buffer)) {