# include <config.h>
#endif
-#include "wrappers.h"
#include "util.h"
#include <getopt.h>
#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#define ENSC_WRAPPERS_FCNTL 1
+#define ENSC_WRAPPERS_IOCTL 1
+#define ENSC_WRAPPERS_UNISTD 1
+#include <wrappers.h>
int wrapper_exit_code = 1;
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);
}