]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/lsns.c
lsns: report with warnx if a namespace related ioctl fails with ENOSYS
[thirdparty/util-linux.git] / sys-utils / lsns.c
index 0ab5e26a3079f743c5f2cc4474e95eb48ad2b85b..67a563ebc3251f45bf9c9e928ba21ba625b35de3 100644 (file)
@@ -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; })