}
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);
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("/");
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()");
strcat(runfile, ".rev/");
strcat(runfile, buf);
unlink(runfile);
- Esymlink(argv[1], runfile);
+ EsymlinkD(argv[1], runfile);
Eexecv(argv[2], argv+2);
}
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);
}
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)) {