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)
Gbp-Pq: Topic upstream
Gbp-Pq: Name lsns-report-with-warnx-if-a-namespace-related-ioctl-fails.patch
#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; })