Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Oct 2010 20:05:25 +0000 (UTC)
From:      Bruce Cran <brucec@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r214073 - head/sbin/camcontrol
Message-ID:  <201010192005.o9JK5PET025466@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brucec
Date: Tue Oct 19 20:05:25 2010
New Revision: 214073
URL: http://svn.freebsd.org/changeset/base/214073

Log:
  Stop disallowing device nodes to be passed to camcontrol(8) since libcam
  already allows both device names and nodes to be specified.
  
  Reviewed by:	avg

Modified:
  head/sbin/camcontrol/camcontrol.8
  head/sbin/camcontrol/camcontrol.c

Modified: head/sbin/camcontrol/camcontrol.8
==============================================================================
--- head/sbin/camcontrol/camcontrol.8	Tue Oct 19 19:53:06 2010	(r214072)
+++ head/sbin/camcontrol/camcontrol.8	Tue Oct 19 20:05:25 2010	(r214073)
@@ -207,9 +207,6 @@ A device identifier can take one of thre
 .Bl -tag -width 14n
 .It deviceUNIT
 Specify a device name and unit number combination, like "da5" or "cd3".
-Note that character device node names (e.g.\& /dev/da0) are
-.Em not
-allowed here.
 .It bus:target
 Specify a bus number and target id.
 The bus number can be determined from

Modified: head/sbin/camcontrol/camcontrol.c
==============================================================================
--- head/sbin/camcontrol/camcontrol.c	Tue Oct 19 19:53:06 2010	(r214072)
+++ head/sbin/camcontrol/camcontrol.c	Tue Oct 19 20:05:25 2010	(r214073)
@@ -4605,15 +4605,7 @@ main(int argc, char **argv)
 		char name[30];
 		int rv;
 
-		/*
-		 * First catch people who try to do things like:
-		 * camcontrol tur /dev/da0 
-		 * camcontrol doesn't take device nodes as arguments.
-		 */
-		if (argv[2][0] == '/') {
-			warnx("%s is not a valid device identifier", argv[2]);
-			errx(1, "please read the camcontrol(8) man page");
-		} else if (isdigit(argv[2][0])) {
+		if (isdigit(argv[2][0])) {
 			/* device specified as bus:target[:lun] */
 			rv = parse_btl(argv[2], &bus, &target, &lun, &arglist);
 			if (rv < 2)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010192005.o9JK5PET025466>