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)
char *errstr = "unknown";
switch (errno) {
case -EIO:
case -ENOENT: /* -2 */
errstr = "No such entry";
break;
case -EIO: /* -5 */
errstr = "IO failure";
break;
case -ENOMEM:
case -ENOMEM: /* -12*/
errstr = "Out of memory";
break;
case -EROFS:
errstr = "Readonly filesystem";
break;
case -EEXIST:
case -EEXIST: /* -17 */
errstr = "Object already exists";
break;
case -ENOSPC:
case -ENOSPC: /* -28 */
errstr = "No space left";
break;
case -ENOENT:
errstr = "No such entry";
case -EROFS: /* -30 */
errstr = "Readonly filesystem";
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