From d54f814434c5f87356d35bc377f43ef8d0556f15 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 28 Apr 2020 17:10:27 +0200 Subject: btrfs: sort error decoder entries Add the raw errnos and sort them accordingly. Reviewed-by: Anand Jain Signed-off-by: David Sterba --- fs/btrfs/super.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'fs/btrfs/super.c') diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 7932d8d07cff..9e5d723a0d99 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -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; } -- cgit v1.2.3-73-gaa49b