mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-18 05:18:47 +02:00
gioerror: Add G_IO_ERROR_NO_SUCH_DEVICE to map ENODEV
This commit is contained in:
parent
9e09894414
commit
d2ca48ad97
@ -509,6 +509,7 @@ typedef enum {
|
|||||||
* value, which has this more logical name. Since 2.44.
|
* value, which has this more logical name. Since 2.44.
|
||||||
* @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44
|
* @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44
|
||||||
* @G_IO_ERROR_MESSAGE_TOO_LARGE: Message too large. Since 2.48.
|
* @G_IO_ERROR_MESSAGE_TOO_LARGE: Message too large. Since 2.48.
|
||||||
|
* @G_IO_ERROR_NO_SUCH_DEVICE: No such device found. Since 2.74
|
||||||
*
|
*
|
||||||
* Error codes returned by GIO functions.
|
* Error codes returned by GIO functions.
|
||||||
*
|
*
|
||||||
@ -577,7 +578,8 @@ typedef enum {
|
|||||||
G_IO_ERROR_BROKEN_PIPE,
|
G_IO_ERROR_BROKEN_PIPE,
|
||||||
G_IO_ERROR_CONNECTION_CLOSED = G_IO_ERROR_BROKEN_PIPE,
|
G_IO_ERROR_CONNECTION_CLOSED = G_IO_ERROR_BROKEN_PIPE,
|
||||||
G_IO_ERROR_NOT_CONNECTED,
|
G_IO_ERROR_NOT_CONNECTED,
|
||||||
G_IO_ERROR_MESSAGE_TOO_LARGE
|
G_IO_ERROR_MESSAGE_TOO_LARGE,
|
||||||
|
G_IO_ERROR_NO_SUCH_DEVICE,
|
||||||
} GIOErrorEnum;
|
} GIOErrorEnum;
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,6 +115,11 @@ g_io_error_from_errno (gint err_no)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENODEV
|
||||||
|
case ENODEV:
|
||||||
|
return G_IO_ERROR_NO_SUCH_DEVICE;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EROFS
|
#ifdef EROFS
|
||||||
case EROFS:
|
case EROFS:
|
||||||
return G_IO_ERROR_READ_ONLY;
|
return G_IO_ERROR_READ_ONLY;
|
||||||
|
@ -272,7 +272,7 @@ test_error_from_errno (void)
|
|||||||
|
|
||||||
#ifdef ENODEV
|
#ifdef ENODEV
|
||||||
g_assert_cmpint (g_io_error_from_errno (ENODEV), ==,
|
g_assert_cmpint (g_io_error_from_errno (ENODEV), ==,
|
||||||
G_IO_ERROR_FAILED);
|
G_IO_ERROR_NO_SUCH_DEVICE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENFILE
|
#ifdef ENFILE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user