]> git.tuebingen.mpg.de Git - osl.git/blobdiff - fd.h
Rename para_chdir() and make it an inline function.
[osl.git] / fd.h
diff --git a/fd.h b/fd.h
index c660babb31547ca821013ce4dbbd557641bea36a..7fdff916cec60425719772e55bc44027f1d54f86 100644 (file)
--- a/fd.h
+++ b/fd.h
@@ -47,3 +47,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);
+}