diff options
author | jamie <jamie@FreeBSD.org> | 2010-07-08 19:22:52 +0000 |
---|---|---|
committer | jamie <jamie@FreeBSD.org> | 2010-07-08 19:22:52 +0000 |
commit | 4b010573ec3137cc16a2f83312c1a52213d19853 (patch) | |
tree | bc135b04bee8a7ad9e6f791d8fa9bde829abd122 /usr.sbin | |
parent | 1f4cf66ed286294c1578f5a247efe6d564a26ad2 (diff) | |
download | FreeBSD-src-4b010573ec3137cc16a2f83312c1a52213d19853.zip FreeBSD-src-4b010573ec3137cc16a2f83312c1a52213d19853.tar.gz |
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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/jls/jls.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index a3a23b7..2c1655b 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -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)) | |