mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
gioerror: Handle EMLINK error as too-many-links error
This used to be a FreeBSD only error but it's actually defined also in linux.
This commit is contained in:
parent
35c6c5c663
commit
9e09894414
@ -121,6 +121,12 @@ g_io_error_from_errno (gint err_no)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef EMLINK
|
||||
case EMLINK:
|
||||
return G_IO_ERROR_TOO_MANY_LINKS;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ELOOP
|
||||
case ELOOP:
|
||||
return G_IO_ERROR_TOO_MANY_LINKS;
|
||||
|
@ -85,6 +85,11 @@ test_error_from_errno (void)
|
||||
G_IO_ERROR_TOO_MANY_LINKS);
|
||||
#endif
|
||||
|
||||
#ifdef EMLINK
|
||||
g_assert_cmpint (g_io_error_from_errno (EMLINK), ==,
|
||||
G_IO_ERROR_TOO_MANY_LINKS);
|
||||
#endif
|
||||
|
||||
#ifdef ENOSPC
|
||||
g_assert_cmpint (g_io_error_from_errno (ENOSPC), ==,
|
||||
G_IO_ERROR_NO_SPACE);
|
||||
|
Loading…
Reference in New Issue
Block a user