Inline para_fchdir(), move it to fsck.c and rename it.
[osl.git] / fd.h
diff --git a/fd.h b/fd.h
index c660babb31547ca821013ce4dbbd557641bea36a..45d08b3a3e327c17e2050cbee7382de7fabee75e 100644 (file)
--- a/fd.h
+++ b/fd.h
@@ -8,7 +8,6 @@
 
 int osl_open(const char *path, int flags, mode_t mode);
 int para_opendir(const char *dirname, DIR **dir, int *cwd);
-int para_fchdir(int fd);
 int mmap_full_file(const char *filename, int open_mode, void **map,
        size_t *size, int *fd_ptr);
 int osl_munmap(void *start, size_t length);
@@ -47,3 +46,10 @@ _static_inline_ int osl_rename(const char *old_path, const char *new_path)
                return -ERRNO_TO_ERROR(errno);
        return 1;
 }
+
+_static_inline_ int osl_stat(const char *path, struct stat *buf)
+{
+       if (stat(path, buf) >= 0)
+               return 1;
+       return -ERRNO_TO_ERROR(errno);
+}