From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 12:10:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F39EA1065670; Tue, 13 Apr 2010 12:10:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D95518FC0C; Tue, 13 Apr 2010 12:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DCAtE9044794; Tue, 13 Apr 2010 12:10:55 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DCAtFF044792; Tue, 13 Apr 2010 12:10:55 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004131210.o3DCAtFF044792@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 12:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206555 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 12:10:56 -0000 Author: emaste Date: Tue Apr 13 12:10:55 2010 New Revision: 206555 URL: http://svn.freebsd.org/changeset/base/206555 Log: Use enums in the aac_command_status_table rather than duplicating the same values in two places. Suggested by: Garrett Cooper Modified: head/sys/dev/aac/aac_tables.h Modified: head/sys/dev/aac/aac_tables.h ============================================================================== --- head/sys/dev/aac/aac_tables.h Tue Apr 13 10:23:03 2010 (r206554) +++ head/sys/dev/aac/aac_tables.h Tue Apr 13 12:10:55 2010 (r206555) @@ -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} };