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: archive/raspbian/2.40.2-8+rpi1~1^2^2^2^2^2^2^2^2^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ead6f38155f0fbb92559ae3a9de315a800f459e5;p=util-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 (cherry picked from commit 0a7a8fbc7a82dfbd9e925d1b4d4936bf4e011bc1) Gbp-Pq: Topic upstream Gbp-Pq: Name lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch --- diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c index e68bdbe..1f3574f 100644 --- a/sys-utils/lsns.c +++ b/sys-utils/lsns.c @@ -68,7 +68,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; })