diff options
author | dduvall <none@none> | 2008-04-07 21:28:46 -0700 |
---|---|---|
committer | dduvall <none@none> | 2008-04-07 21:28:46 -0700 |
commit | 985f0d0f02c56dae0380b55beb275e54a77ee4a0 (patch) | |
tree | ea5c305d05076c07116ae671f9a3ebe190d34521 | |
parent | 6202079473ec68356c823d655d2566d4ae862b0d (diff) | |
download | illumos-gate-985f0d0f02c56dae0380b55beb275e54a77ee4a0.tar.gz |
6684854 pmodes needs updating for nethack g+w files
-rw-r--r-- | usr/src/tools/pmodes/pmodes.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/src/tools/pmodes/pmodes.c b/usr/src/tools/pmodes/pmodes.c index e7d7a6e14d..15ea4eea99 100644 --- a/usr/src/tools/pmodes/pmodes.c +++ b/usr/src/tools/pmodes/pmodes.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * $Id: pmodes.c,v 1.23 1999/03/22 14:51:16 casper Exp $ @@ -79,6 +78,7 @@ static char *exempt_pkgs[] = { "SUNWSMSdf", /* "data files" package for SMS */ "SUNWSMSr", /* "root" package for SMS */ "SUNWSMSsu", /* "user" package for SMS */ + "SUNWnethackr", /* "root" package for nethack */ }; #define NEXEMPT (sizeof (exempt_pkgs) / sizeof (char *)) @@ -212,6 +212,10 @@ main(int argc, char **argv) str = buf + sizeof ("PKG=") - 1; str[strlen(str)-1] = '\0'; + if (str[0] == '"') + str++; + if (str[strlen(str)-1] == '"') + str[strlen(str)-1] = '\0'; for (i = 0; i < NEXEMPT; i++) { if (strcmp(exempt_pkgs[i], str) == 0) { exempt = B_TRUE; |