random-seed: use ERRNO_IS_NOT_SUPPORTED() where appropriate

This commit is contained in:
Lennart Poettering 2020-06-11 09:51:25 +02:00
parent a1ba8c5b71
commit 97f1c6af8c
1 changed files with 1 additions and 1 deletions

View File

@ -305,7 +305,7 @@ static int run(int argc, char *argv[]) {
* entropy later on. Let's keep that in mind by setting an extended attribute. on the file */
if (getrandom_worked)
if (fsetxattr(seed_fd, "user.random-seed-creditable", "1", 1, 0) < 0)
log_full_errno(IN_SET(errno, ENOSYS, EOPNOTSUPP) ? LOG_DEBUG : LOG_WARNING, errno,
log_full_errno(ERRNO_IS_NOT_SUPPORTED(errno) ? LOG_DEBUG : LOG_WARNING, errno,
"Failed to mark seed file as creditable, ignoring: %m");
}