diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-06-21 11:48:23 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-06-21 11:48:23 +0000 |
commit | 766f41d1d95d047e65ac4942d66037ce7f924027 (patch) | |
tree | 395da874b27c854546a8f9e6c3457372b21eae68 /usr/src | |
parent | 158f4dbcf60701c4d8de07146a38d78ab1b77dfe (diff) | |
parent | b13c8383ad6f847486face2fe8df9f0f50f068ed (diff) | |
download | illumos-joyent-766f41d1d95d047e65ac4942d66037ce7f924027.tar.gz |
[illumos-gate merge]
commit b13c8383ad6f847486face2fe8df9f0f50f068ed
6992 devprop(1M) should work also with logical names
commit e64b5a1d424c9f5d94989cfbd14203251c97a024
7117 Dangling references to usr/src/common/openssl
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/devprop/devprop.c | 14 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-boot-wanboot.mf | 3 |
2 files changed, 11 insertions, 6 deletions
diff --git a/usr/src/cmd/devprop/devprop.c b/usr/src/cmd/devprop/devprop.c index 69306353a7..80bf0f4960 100644 --- a/usr/src/cmd/devprop/devprop.c +++ b/usr/src/cmd/devprop/devprop.c @@ -21,9 +21,9 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" #include <stdio.h> #include <unistd.h> @@ -50,7 +50,7 @@ main(int argc, char *argv[]) uchar_t *val_b; int *val_i; int64_t *val_l; - char *val_s; + char *val_s, *ptr; int n; extern char *optarg; @@ -73,7 +73,8 @@ case ch: \ while ((c = getopt(argc, argv, ":n:vqbils")) != -1) { switch (c) { case 'n': - path = optarg; + if ((path = realpath(optarg, NULL)) == NULL) + path = optarg; break; case ':': usage(); @@ -108,9 +109,14 @@ case ch: \ * "/devices", which we strip off here as di_init() expects * just the path to the node. */ - if (strncmp("/devices/", path, strlen("/devices/")) == 0) + if (strncmp("/devices/", path, strlen("/devices/")) == 0) { path += strlen("/devices"); + /* cut off minor name */ + if ((ptr = strrchr(path, ':')) != NULL) + *ptr = '\0'; + } + if ((dn = di_init(path, DINFOPROP)) == DI_NODE_NIL) { perror("di_init"); return (1); diff --git a/usr/src/pkg/manifests/system-boot-wanboot.mf b/usr/src/pkg/manifests/system-boot-wanboot.mf index ee8f0be815..16750a7ab1 100644 --- a/usr/src/pkg/manifests/system-boot-wanboot.mf +++ b/usr/src/pkg/manifests/system-boot-wanboot.mf @@ -21,7 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2012 OmniTI Computer Consulting, Inc. All rights reserved. +# Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved. # set name=pkg.fmri value=pkg:/system/boot/wanboot@$(PKGVERS) @@ -60,4 +60,3 @@ file path=usr/share/man/man1m/wanbootutil.1m legacy pkg=SUNWwbsup desc="Solaris WAN boot support" name="WAN boot support" license cr_Sun license=cr_Sun license lic_CDDL license=lic_CDDL -license usr/src/common/openssl/LICENSE license=usr/src/common/openssl/LICENSE |