diff options
| author | mb158278 <none@none> | 2008-04-02 13:33:39 -0700 |
|---|---|---|
| committer | mb158278 <none@none> | 2008-04-02 13:33:39 -0700 |
| commit | a7480016c628a109c85b02a0c7c5e1cdb6ad8d02 (patch) | |
| tree | 5709de0ec2465ca20b003a199913b9fd5426ef08 /usr/src/lib/libprtdiag_psr | |
| parent | 2092e3b9b7f5272ce91eb51c92ff5ee52605c143 (diff) | |
| download | illumos-joyent-a7480016c628a109c85b02a0c7c5e1cdb6ad8d02.tar.gz | |
6647886 prtdiag fails as non-root user on M5000
Diffstat (limited to 'usr/src/lib/libprtdiag_psr')
| -rw-r--r-- | usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.c | 15 | ||||
| -rw-r--r-- | usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.h | 3 |
2 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.c b/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.c index 58dc79f5c7..02a95c9c06 100644 --- a/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.c +++ b/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * Opl platform specific PICL functions. @@ -226,13 +226,12 @@ opl_pci_callback(picl_nodehdl_t pcih, void *args) &bus_type); if (err != PICL_SUCCESS) { - /* Move on to next node */ - log_printf("Getting lane width failed for path %s\n", - pci_card.notes); - err = picl_get_propval_by_name - (nodeh, PICL_PROP_PEER, &nodeh, - sizeof (picl_nodehdl_t)); - continue; + /* + * get_lane_width will fail when run as non-root. + * Set bus_type to PCI_UNKN so that bus frequency, + * bus type and lane width will print as "--" or UNKN. + */ + bus_type = PCI_UNKN; } diff --git a/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.h b/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.h index e90810b2ba..23fc03f79a 100644 --- a/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.h +++ b/usr/src/lib/libprtdiag_psr/sparc/opl/common/opl_picl.h @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * Opl Platform header file. @@ -60,6 +60,7 @@ extern "C" { /* PCI BUS types */ +#define PCI_UNKN -1 #define PCI 10 #define PCIX 20 #define PCIE 30 |
