summaryrefslogtreecommitdiffstats
path: root/debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch')
-rw-r--r--debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch b/debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch
new file mode 100644
index 0000000..fd57faf
--- /dev/null
+++ b/debian/patches/upstream/lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch
@@ -0,0 +1,27 @@
+From: Masatake YAMATO <yamato@redhat.com>
+Date: Mon, 15 Apr 2024 01:44:38 +0900
+Subject: 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 <yamato@redhat.com>
+(cherry picked from commit 0a7a8fbc7a82dfbd9e925d1b4d4936bf4e011bc1)
+---
+ sys-utils/lsns.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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; })
+