X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fxattr-util.c;h=6b5c5465316328c1d18ff467cdffd531ee3fccbc;hp=ddffd016b105842650cb7f122a76251b39977a67;hb=cdc7b27bf58e294db71812932cd5f6f4a8dccc8b;hpb=b96ed50e3493103d075ff2ce4c3fbad8f26b2e22 diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c index ddffd016b..6b5c54653 100644 --- a/src/basic/xattr-util.c +++ b/src/basic/xattr-util.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -19,13 +17,20 @@ along with systemd; If not, see . ***/ +#include +#include +#include +#include +#include +#include #include #include "alloc-util.h" #include "fd-util.h" +#include "macro.h" #include "sparse-endian.h" #include "stdio-util.h" -#include "util.h" +#include "time-util.h" #include "xattr-util.h" int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink) { @@ -98,6 +103,7 @@ int fgetxattr_malloc(int fd, const char *name, char **value) { } } +#if 0 /// UNNEEDED by elogind ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, void *value, size_t size, int flags) { char fn[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1]; _cleanup_close_ int fd = -1; @@ -105,7 +111,7 @@ ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, /* The kernel doesn't have a fgetxattrat() command, hence let's emulate one */ - fd = openat(dirfd, filename, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_PATH|(flags & AT_SYMLINK_NOFOLLOW ? O_NOFOLLOW : 0)); + fd = openat(dirfd, filename, O_CLOEXEC|O_PATH|(flags & AT_SYMLINK_NOFOLLOW ? O_NOFOLLOW : 0)); if (fd < 0) return -errno; @@ -118,8 +124,6 @@ ssize_t fgetxattrat_fake(int dirfd, const char *filename, const char *attribute, return l; } -/// UNNEEDED by elogind -#if 0 static int parse_crtime(le64_t le, usec_t *usec) { uint64_t u;