mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 07:09:57 +00:00
Handle ENOTTY with the correct error code for ioctl calls
Fixes half of https://github.com/fwupd/fwupd/discussions/4810
This commit is contained in:
parent
cb0966858d
commit
6f5ebc5492
@ -1534,11 +1534,19 @@ fu_udev_device_ioctl(FuUdevDevice *self,
|
||||
"permission denied");
|
||||
return FALSE;
|
||||
}
|
||||
if (errno == ENOTTY) {
|
||||
g_set_error_literal(error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOT_SUPPORTED,
|
||||
"permission denied");
|
||||
return FALSE;
|
||||
}
|
||||
g_set_error(error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_INTERNAL,
|
||||
"ioctl error: %s",
|
||||
strerror(errno));
|
||||
"ioctl error: %s [%i]",
|
||||
strerror(errno),
|
||||
errno);
|
||||
#else
|
||||
g_set_error(error, FWUPD_ERROR, FWUPD_ERROR_INTERNAL, "unspecified ioctl error");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user