From owner-dev-commits-src-all@freebsd.org Thu Feb 25 18:42:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4268856C642; Thu, 25 Feb 2021 18:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmhVf1TWxz3D83; Thu, 25 Feb 2021 18:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 259111C88F; Thu, 25 Feb 2021 18:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11PIgo6W006953; Thu, 25 Feb 2021 18:42:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PIgoCb006952; Thu, 25 Feb 2021 18:42:50 GMT (envelope-from git) Date: Thu, 25 Feb 2021 18:42:50 GMT Message-Id: <202102251842.11PIgoCb006952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: f848d08e4528 - main - camcontrol: stop pretending cam_cmd is a bitmask MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f848d08e4528a823aaf79dce173ae87e39f7ee3c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 18:42:50 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=f848d08e4528a823aaf79dce173ae87e39f7ee3c commit f848d08e4528a823aaf79dce173ae87e39f7ee3c Author: Edward Tomasz Napierala AuthorDate: 2021-02-25 18:39:22 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-02-25 18:40:07 +0000 camcontrol: stop pretending cam_cmd is a bitmask Cleanup only, no functional changes. Reviewed By: imp Sponsored By: NetApp, Inc. Sponsored By: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27813 --- sbin/camcontrol/camcontrol.c | 94 ++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 27d545d924b3..748f54c9ce55 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -66,52 +66,52 @@ __FBSDID("$FreeBSD$"); #endif typedef enum { - CAM_CMD_NONE = 0x00000000, - CAM_CMD_DEVLIST = 0x00000001, - CAM_CMD_TUR = 0x00000002, - CAM_CMD_INQUIRY = 0x00000003, - CAM_CMD_STARTSTOP = 0x00000004, - CAM_CMD_RESCAN = 0x00000005, - CAM_CMD_READ_DEFECTS = 0x00000006, - CAM_CMD_MODE_PAGE = 0x00000007, - CAM_CMD_SCSI_CMD = 0x00000008, - CAM_CMD_DEVTREE = 0x00000009, - CAM_CMD_USAGE = 0x0000000a, - CAM_CMD_DEBUG = 0x0000000b, - CAM_CMD_RESET = 0x0000000c, - CAM_CMD_FORMAT = 0x0000000d, - CAM_CMD_TAG = 0x0000000e, - CAM_CMD_RATE = 0x0000000f, - CAM_CMD_DETACH = 0x00000010, - CAM_CMD_REPORTLUNS = 0x00000011, - CAM_CMD_READCAP = 0x00000012, - CAM_CMD_IDENTIFY = 0x00000013, - CAM_CMD_IDLE = 0x00000014, - CAM_CMD_STANDBY = 0x00000015, - CAM_CMD_SLEEP = 0x00000016, - CAM_CMD_SMP_CMD = 0x00000017, - CAM_CMD_SMP_RG = 0x00000018, - CAM_CMD_SMP_PC = 0x00000019, - CAM_CMD_SMP_PHYLIST = 0x0000001a, - CAM_CMD_SMP_MANINFO = 0x0000001b, - CAM_CMD_DOWNLOAD_FW = 0x0000001c, - CAM_CMD_SECURITY = 0x0000001d, - CAM_CMD_HPA = 0x0000001e, - CAM_CMD_SANITIZE = 0x0000001f, - CAM_CMD_PERSIST = 0x00000020, - CAM_CMD_APM = 0x00000021, - CAM_CMD_AAM = 0x00000022, - CAM_CMD_ATTRIB = 0x00000023, - CAM_CMD_OPCODES = 0x00000024, - CAM_CMD_REPROBE = 0x00000025, - CAM_CMD_ZONE = 0x00000026, - CAM_CMD_EPC = 0x00000027, - CAM_CMD_TIMESTAMP = 0x00000028, - CAM_CMD_MMCSD_CMD = 0x00000029, - CAM_CMD_POWER_MODE = 0x0000002a, - CAM_CMD_DEVTYPE = 0x0000002b, - CAM_CMD_AMA = 0x0000002c, -} cam_cmdmask; + CAM_CMD_NONE, + CAM_CMD_DEVLIST, + CAM_CMD_TUR, + CAM_CMD_INQUIRY, + CAM_CMD_STARTSTOP, + CAM_CMD_RESCAN, + CAM_CMD_READ_DEFECTS, + CAM_CMD_MODE_PAGE, + CAM_CMD_SCSI_CMD, + CAM_CMD_DEVTREE, + CAM_CMD_USAGE, + CAM_CMD_DEBUG, + CAM_CMD_RESET, + CAM_CMD_FORMAT, + CAM_CMD_TAG, + CAM_CMD_RATE, + CAM_CMD_DETACH, + CAM_CMD_REPORTLUNS, + CAM_CMD_READCAP, + CAM_CMD_IDENTIFY, + CAM_CMD_IDLE, + CAM_CMD_STANDBY, + CAM_CMD_SLEEP, + CAM_CMD_SMP_CMD, + CAM_CMD_SMP_RG, + CAM_CMD_SMP_PC, + CAM_CMD_SMP_PHYLIST, + CAM_CMD_SMP_MANINFO, + CAM_CMD_DOWNLOAD_FW, + CAM_CMD_SECURITY, + CAM_CMD_HPA, + CAM_CMD_SANITIZE, + CAM_CMD_PERSIST, + CAM_CMD_APM, + CAM_CMD_AAM, + CAM_CMD_ATTRIB, + CAM_CMD_OPCODES, + CAM_CMD_REPROBE, + CAM_CMD_ZONE, + CAM_CMD_EPC, + CAM_CMD_TIMESTAMP, + CAM_CMD_MMCSD_CMD, + CAM_CMD_POWER_MODE, + CAM_CMD_DEVTYPE, + CAM_CMD_AMA, +} cam_cmd; typedef enum { CAM_ARG_NONE = 0x00000000, @@ -248,7 +248,6 @@ struct cam_devlist { path_id_t path_id; }; -static cam_cmdmask cmdlist; static cam_argmask arglist; static const char *devtype_names[] = { @@ -10285,6 +10284,7 @@ main(int argc, char **argv) int error = 0, optstart = 2; int task_attr = MSG_SIMPLE_Q_TAG; int devopen = 1; + cam_cmd cmdlist; path_id_t bus; target_id_t target; lun_id_t lun;