From: Masatake YAMATO Date: Sun, 14 Apr 2024 16:44:38 +0000 (+0900) Subject: lsns: report with warnx if a namespace related ioctl fails with ENOSYS X-Git-Tag: v2.42-start~423 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a7a8fbc7a82dfbd9e925d1b4d4936bf4e011bc1;p=thirdparty%2Futil-linux.git lsns: report with warnx if a namespace related ioctl fails with ENOSYS Qemu userspace emulation reports ENOSYS if it doesn't support a given ioctl command. Signed-off-by: Masatake YAMATO --- diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c index 0ab5e26a3..67a563ebc 100644 --- a/sys-utils/lsns.c +++ b/sys-utils/lsns.c @@ -70,7 +70,7 @@ UL_DEBUG_DEFINE_MASKNAMES(lsns) = UL_DEBUG_EMPTY_MASKNAMES; #define lsns_ioctl(fildes, request, ...) __extension__ ({ \ int ret = ioctl(fildes, request, ##__VA_ARGS__); \ - if (ret == -1 && errno == ENOTTY) \ + if (ret == -1 && (errno == ENOTTY || errno == ENOSYS)) \ warnx("Unsupported ioctl %s", #request); \ ret; })