Commit d54f8144 authored by David Sterba's avatar David Sterba

btrfs: sort error decoder entries

Add the raw errnos and sort them accordingly.
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7f551d96
...@@ -72,23 +72,23 @@ const char * __attribute_const__ btrfs_decode_error(int errno) ...@@ -72,23 +72,23 @@ const char * __attribute_const__ btrfs_decode_error(int errno)
char *errstr = "unknown"; char *errstr = "unknown";
switch (errno) { switch (errno) {
case -EIO: case -ENOENT: /* -2 */
errstr = "No such entry";
break;
case -EIO: /* -5 */
errstr = "IO failure"; errstr = "IO failure";
break; break;
case -ENOMEM: case -ENOMEM: /* -12*/
errstr = "Out of memory"; errstr = "Out of memory";
break; break;
case -EROFS: case -EEXIST: /* -17 */
errstr = "Readonly filesystem";
break;
case -EEXIST:
errstr = "Object already exists"; errstr = "Object already exists";
break; break;
case -ENOSPC: case -ENOSPC: /* -28 */
errstr = "No space left"; errstr = "No space left";
break; break;
case -ENOENT: case -EROFS: /* -30 */
errstr = "No such entry"; errstr = "Readonly filesystem";
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment