X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fstat-util.c;h=0280afeecd743a210e6840a3bd43bbead2248db3;hb=9742b1e43855b1599bd52ff95af995d9a9d35eac;hp=9dbdae0a0397d4df6fd9fa93da884e0da3285a20;hpb=ce18349eedcec2ed6074c89e5ce9e7bee0770ec0;p=elogind.git diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c index 9dbdae0a0..0280afeec 100644 --- a/src/basic/stat-util.c +++ b/src/basic/stat-util.c @@ -176,16 +176,16 @@ int path_is_os_tree(const char *path) { } #endif // 0 -int files_same(const char *filea, const char *fileb) { +int files_same(const char *filea, const char *fileb, int flags) { struct stat a, b; assert(filea); assert(fileb); - if (stat(filea, &a) < 0) + if (fstatat(AT_FDCWD, filea, &a, flags) < 0) return -errno; - if (stat(fileb, &b) < 0) + if (fstatat(AT_FDCWD, fileb, &b, flags) < 0) return -errno; return a.st_dev == b.st_dev && @@ -225,6 +225,7 @@ bool is_temporary_fs(const struct statfs *s) { is_fs_type(s, RAMFS_MAGIC); } +#if 0 /// UNNEEDED by elogind int fd_is_temporary_fs(int fd) { struct statfs s; @@ -243,3 +244,4 @@ int path_is_temporary_fs(const char *path) { return fd_is_temporary_fs(fd); } +#endif // 0