summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2010-04-13 12:10:55 +0000
committeremaste <emaste@FreeBSD.org>2010-04-13 12:10:55 +0000
commit7dc7d3d41572e4fe5402aea662d75253e86e553e (patch)
tree73c020c9f119b3245b875698d108e7f17c2331a9 /sys/dev/aac
parent24680f53887643c0e1c8e610518347a34d2515e6 (diff)
downloadFreeBSD-src-7dc7d3d41572e4fe5402aea662d75253e86e553e.zip
FreeBSD-src-7dc7d3d41572e4fe5402aea662d75253e86e553e.tar.gz
Use enums in the aac_command_status_table rather than duplicating the same
values in two places. Suggested by: Garrett Cooper
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac_tables.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/sys/dev/aac/aac_tables.h b/sys/dev/aac/aac_tables.h
index 2e90004..fe687fb 100644
--- a/sys/dev/aac/aac_tables.h
+++ b/sys/dev/aac/aac_tables.h
@@ -34,42 +34,42 @@
* relevant only to FSA operations.
*/
static struct aac_code_lookup aac_command_status_table[] = {
- {"OK", 0},
- {"operation not permitted", 1},
- {"not found", 2},
- {"I/O error", 5},
- {"device not configured", 6},
- {"too big", 7},
- {"permission denied", 13},
- {"file exists", 17},
- {"cross-device link", 18},
- {"operation not supported by device", 19},
- {"not a directory", 20},
- {"is a directory", 21},
- {"invalid argument", 22},
- {"file too large", 27},
- {"no space on device", 28},
- {"readonly filesystem", 30},
- {"too many links", 31},
- {"operation would block", 35},
- {"file name too long", 63},
- {"directory not empty", 66},
- {"quota exceeded", 69},
- {"stale file handle", 70},
- {"too many levels of remote in path", 71},
- {"device busy (spinning up)", 72},
- {"bad file handle", 10001},
- {"not sync", 10002},
- {"bad cookie", 10003},
- {"operation not supported", 10004},
- {"too small", 10005},
- {"server fault", 10006},
- {"bad type", 10007},
- {"jukebox", 10008},
- {"not mounted", 10009},
- {"in maintenance mode", 10010},
- {"stale ACL", 10011},
- {"bus reset - command aborted", 20001},
+ {"OK", ST_OK},
+ {"operation not permitted", ST_PERM},
+ {"not found", ST_NOENT},
+ {"I/O error", ST_IO},
+ {"device not configured", ST_NXIO},
+ {"too big", ST_E2BIG},
+ {"permission denied", ST_ACCES},
+ {"file exists", ST_EXIST},
+ {"cross-device link", ST_XDEV},
+ {"operation not supported by device", ST_NODEV},
+ {"not a directory", ST_NOTDIR},
+ {"is a directory", ST_ISDIR},
+ {"invalid argument", ST_INVAL},
+ {"file too large", ST_FBIG},
+ {"no space on device", ST_NOSPC},
+ {"readonly filesystem", ST_ROFS},
+ {"too many links", ST_MLINK},
+ {"operation would block", ST_WOULDBLOCK},
+ {"file name too long", ST_NAMETOOLONG},
+ {"directory not empty", ST_NOTEMPTY},
+ {"quota exceeded", ST_DQUOT},
+ {"stale file handle", ST_STALE},
+ {"too many levels of remote in path", ST_REMOTE},
+ {"device busy (spinning up)", ST_NOT_READY},
+ {"bad file handle", ST_BADHANDLE},
+ {"not sync", ST_NOT_SYNC},
+ {"bad cookie", ST_BAD_COOKIE},
+ {"operation not supported", ST_NOTSUPP},
+ {"too small", ST_TOOSMALL},
+ {"server fault", ST_SERVERFAULT},
+ {"bad type", ST_BADTYPE},
+ {"jukebox", ST_JUKEBOX},
+ {"not mounted", ST_NOTMOUNTED},
+ {"in maintenance mode", ST_MAINTMODE},
+ {"stale ACL", ST_STALEACL},
+ {"bus reset - command aborted", ST_BUS_RESET},
{NULL, 0},
{"unknown command status", 0}
};
OpenPOWER on IntegriCloud