Skip to content

Commit

Permalink
btrfs: sort error decoder entries
Browse files Browse the repository at this point in the history
Add the raw errnos and sort them accordingly.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
David Sterba committed May 25, 2020
1 parent 7f551d9 commit d54f814
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d54f814

Please sign in to comment.