Cope with xattr syscalls raising EOPNOTSUPP

ENOTSUP and EOPNOTSUPP are numerically equal on most Linux ports,
but inexplicably differ on PA-RISC (hppa) and possibly other
rare architectures.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1275
Approved by: cgwalters
This commit is contained in:
Simon McVittie authored and Atomic Bot committed 2017-10-16 13:08:06 +00:00
1 parent 9503189362
commit a4723dafed
2 files changed
+7 -5

No files matched your search

+1 -1
View File
@@ -113,7 +113,7 @@ ostree_builtin_create_usb (int argc,
OstreeRepoMode mode = OSTREE_REPO_MODE_BARE_USER;
if (TEMP_FAILURE_RETRY (fgetxattr (mount_root_dfd, "user.test", NULL, 0)) < 0 &&
errno == ENOTSUP)
(errno == ENOTSUP || errno == EOPNOTSUPP))
mode = OSTREE_REPO_MODE_ARCHIVE;
g_debug ("%s: Creating repository in mode %u", G_STRFUNC, mode);