aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs/misc.c')
-rw-r--r--fs/afs/misc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/afs/misc.c b/fs/afs/misc.c
index 55bc6778cec7..98e9276c46a2 100644
--- a/fs/afs/misc.c
+++ b/fs/afs/misc.c
@@ -1,6 +1,6 @@
1/* miscellaneous bits 1/* miscellaneous bits
2 * 2 *
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2002, 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
5 * 5 *
6 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
@@ -12,18 +12,19 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include "errors.h"
16#include "internal.h" 15#include "internal.h"
16#include "afs_fs.h"
17 17
18/* 18/*
19 * convert an AFS abort code to a Linux error number 19 * convert an AFS abort code to a Linux error number
20 */ 20 */
21int afs_abort_to_error(int abortcode) 21int afs_abort_to_error(u32 abort_code)
22{ 22{
23 switch (abortcode) { 23 switch (abort_code) {
24 case 13: return -EACCES;
24 case VSALVAGE: return -EIO; 25 case VSALVAGE: return -EIO;
25 case VNOVNODE: return -ENOENT; 26 case VNOVNODE: return -ENOENT;
26 case VNOVOL: return -ENXIO; 27 case VNOVOL: return -ENOMEDIUM;
27 case VVOLEXISTS: return -EEXIST; 28 case VVOLEXISTS: return -EEXIST;
28 case VNOSERVICE: return -EIO; 29 case VNOSERVICE: return -EIO;
29 case VOFFLINE: return -ENOENT; 30 case VOFFLINE: return -ENOENT;