#include "fstool.h"
#include "util.h"
-#include "wrappers.h"
-#include "wrappers-dirent.h"
#include <lib/vserver.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#define ENSC_WRAPPERS_DIRENT 1
+#define ENSC_WRAPPERS_FCNTL 1
+#define ENSC_WRAPPERS_UNISTD 1
+#include <wrappers.h>
struct Arguments const * global_args = 0;
// show current directory entry first
if (lstat(".", &cur_st)==-1) perror("lstat()");
- else err += handleFile(".", path, &cur_st) ? 0 : 1;
+ else err += handleFile(".", path) ? 0 : 1;
// strip trailing '/'
while (path_len>0 && path[path_len-1]=='/') --path_len;
{
CONCAT_PATHS(path, path_len, ent->d_name);
- err += handleFile(ent->d_name, new_path, &st) ? 0 : 1;
+ err += handleFile(ent->d_name, new_path) ? 0 : 1;
}
}
return iterateFilesystem(path);
}
else
- return handleFile(path, path, &st);
+ return handleFile(path, path) ? 0 : 1;
}
int main(int argc, char *argv[])