From a2563d1c3a53b1215769db6e23fc20e70ab6325e Mon Sep 17 00:00:00 2001 From: Gao Xiang Date: Thu, 9 Mar 2023 19:26:30 +0800 Subject: [PATCH] erofs-utils: lib: fix errors when building xattrs EOPNOTSUPP could be reported by llistxattr() and mkfs.erofs could fail out due to the following error: erofs: llistxattr to get the size of names for xxxxx failed erofs: Could not format the device : [Error 95] Operation not supported Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230309112630.74230-3-hsiangkao@linux.alibaba.com --- lib/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xattr.c b/lib/xattr.c index 024ecbe..dbe0519 100644 --- a/lib/xattr.c +++ b/lib/xattr.c @@ -315,7 +315,7 @@ static int read_xattrs_from_file(const char *path, mode_t mode, unsigned int keylen; struct xattr_item *item; - if (kllen < 0 && errno != ENODATA) { + if (kllen < 0 && errno != ENODATA && errno != EOPNOTSUPP) { erofs_err("llistxattr to get the size of names for %s failed", path); return -errno; -- 2.34.1