svn commit: r209820 - head/usr.sbin/jls
Jamie Gritton
jamie at FreeBSD.org
Thu Jul 8 19:22:52 UTC 2010
Author: jamie
Date: Thu Jul 8 19:22:52 2010
New Revision: 209820
URL: http://svn.freebsd.org/changeset/base/209820
Log:
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.
MFC after: 3 days
Modified:
head/usr.sbin/jls/jls.c
Modified: head/usr.sbin/jls/jls.c
==============================================================================
--- head/usr.sbin/jls/jls.c Thu Jul 8 19:15:26 2010 (r209819)
+++ head/usr.sbin/jls/jls.c Thu Jul 8 19:22:52 2010 (r209820)
@@ -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-all
mailing list