svn commit: r209899 - stable/8/usr.sbin/jls

Jamie Gritton jamie at FreeBSD.org
Sun Jul 11 15:32:21 UTC 2010


Author: jamie
Date: Sun Jul 11 15:32:20 2010
New Revision: 209899
URL: http://svn.freebsd.org/changeset/base/209899

Log:
  MFC r209820:
  
    Properly recognize a number followed by non-digits as a jail name.
    Call "0" a name because zero is used to indicate no specified jid.

Modified:
  stable/8/usr.sbin/jls/jls.c
Directory Properties:
  stable/8/usr.sbin/jls/   (props changed)

Modified: stable/8/usr.sbin/jls/jls.c
==============================================================================
--- stable/8/usr.sbin/jls/jls.c	Sun Jul 11 12:06:42 2010	(r209898)
+++ stable/8/usr.sbin/jls/jls.c	Sun Jul 11 15:32:20 2010	(r209899)
@@ -84,8 +84,10 @@ main(int argc, char **argv)
 			break;
 		case 'j':
 			jid = strtoul(optarg, &ep, 10);
-			if (!*optarg || *ep)
+			if (!jid || *ep) {
+				jid = 0;
 				jname = optarg;
+			}
 			break;
 		case 'h':
 			pflags = (pflags & ~(PRINT_SKIP | PRINT_VERBOSE)) |


More information about the svn-src-stable-8 mailing list