mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
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:
parent
7f551d9690
commit
d54f814434
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user