btrfs: sort error decoder entries

Add the raw errnos and sort them accordingly.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2020-04-28 17:10:27 +02:00
parent 7f551d9690
commit d54f814434

View File

@ -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;
}