mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
gioerror: Map ENOSYS to G_IO_ERROR_NOT_SUPPORTED
If a wrong syscall is used, we can assume that such feature is not supported at higher level.
This commit is contained in:
parent
587f5f25d0
commit
e5841beba6
@ -230,6 +230,12 @@ g_io_error_from_errno (gint err_no)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENOSYS
|
||||
case ENOSYS:
|
||||
return G_IO_ERROR_NOT_SUPPORTED;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ETIMEDOUT
|
||||
case ETIMEDOUT:
|
||||
return G_IO_ERROR_TIMED_OUT;
|
||||
|
@ -322,7 +322,7 @@ test_error_from_errno (void)
|
||||
|
||||
#ifdef ENOSYS
|
||||
g_assert_cmpuint (g_io_error_from_errno (ENOSYS), ==,
|
||||
G_IO_ERROR_FAILED);
|
||||
G_IO_ERROR_NOT_SUPPORTED);
|
||||
#endif
|
||||
|
||||
#ifdef ENOMSG
|
||||
|
Loading…
Reference in New Issue
Block a user