From 00675c363ffdb0144873ae24ce555556aedcab0d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 10 Oct 2022 11:06:56 +0200 Subject: tree-wide: add ERRNO_IS_XATTR_ABSENT() helper We check the same list of error codes on various xattr operations, and we should on some more. Add a common helper for this purpose. --- src/home/homework-luks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/home/homework-luks.c') diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c index 858d9dda19..d0fb2d91af 100644 --- a/src/home/homework-luks.c +++ b/src/home/homework-luks.c @@ -96,7 +96,7 @@ int run_mark_dirty(int fd, bool b) { return log_debug_errno(r, "Failed to synchronize image before marking it clean: %m"); ret = fremovexattr(fd, "user.home-dirty"); - if (ret < 0 && errno != ENODATA) + if (ret < 0 && !ERRNO_IS_XATTR_ABSENT(errno)) return log_debug_errno(errno, "Could not mark home directory as clean: %m"); } -- cgit v1.2.1