diff options
| author | Richard Lowe <richlowe@richlowe.net> | 2017-01-21 02:59:30 +0300 |
|---|---|---|
| committer | Richard Lowe <richlowe@richlowe.net> | 2017-01-21 00:01:47 -0500 |
| commit | 8bd37d66ef28b91df08410bdc764b5e18a61710b (patch) | |
| tree | 754d621d7e3445458796f873ded749eac5521cd3 /usr/src | |
| parent | b68080e04b742cedcb289c561db3fd1b9ca6fd03 (diff) | |
| download | illumos-joyent-8bd37d66ef28b91df08410bdc764b5e18a61710b.tar.gz | |
7771 integrate diskinfo (fix packaging, studio)
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/diskinfo/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/cmd/diskinfo/diskinfo.c | 9 | ||||
| -rw-r--r-- | usr/src/pkg/manifests/diagnostic-diskinfo.mf | 4 |
3 files changed, 12 insertions, 5 deletions
diff --git a/usr/src/cmd/diskinfo/Makefile b/usr/src/cmd/diskinfo/Makefile index 47d2289c90..daee372303 100644 --- a/usr/src/cmd/diskinfo/Makefile +++ b/usr/src/cmd/diskinfo/Makefile @@ -20,6 +20,8 @@ SRCS= $(OBJS:%.o=%.c) include $(SRC)/cmd/Makefile.cmd include $(SRC)/cmd/Makefile.ctf +C99MODE= $(C99_ENABLE) + CPPFLAGS += -I$(SRC)/lib/fm/topo LDLIBS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm -ldiskmgt -lnvpair -ltopo @@ -35,6 +37,6 @@ $(PROG): $(OBJS) clean: $(RM) $(OBJS) -install: all $(ROOTUSRSBINPROG) +install: all $(ROOTPROG) include $(SRC)/cmd/Makefile.targ diff --git a/usr/src/cmd/diskinfo/diskinfo.c b/usr/src/cmd/diskinfo/diskinfo.c index cf28f00889..182cd46a63 100644 --- a/usr/src/cmd/diskinfo/diskinfo.c +++ b/usr/src/cmd/diskinfo/diskinfo.c @@ -142,16 +142,21 @@ disk_walker(topo_hdl_t *hp, tnode_t *np, void *arg) TOPO_FAC_TYPE_ANY, &fl, &err) == 0) { for (lp = topo_list_next(&fl.tf_list); lp != NULL; lp = topo_list_next(lp)) { + uint32_t prop; + if (topo_prop_get_uint32(lp->tf_node, TOPO_PGROUP_FACILITY, TOPO_FACILITY_TYPE, - &type, &err) != 0) { + &prop, &err) != 0) { continue; } + type = (topo_led_type_t)prop; + if (topo_prop_get_uint32(lp->tf_node, TOPO_PGROUP_FACILITY, TOPO_LED_MODE, - &mode, &err) != 0) { + &prop, &err) != 0) { continue; } + mode = (topo_led_state_t)prop; switch (type) { case TOPO_LED_TYPE_SERVICE: diff --git a/usr/src/pkg/manifests/diagnostic-diskinfo.mf b/usr/src/pkg/manifests/diagnostic-diskinfo.mf index a7a62def0d..09c8ebe936 100644 --- a/usr/src/pkg/manifests/diagnostic-diskinfo.mf +++ b/usr/src/pkg/manifests/diagnostic-diskinfo.mf @@ -26,8 +26,8 @@ set name=info.classification \ value="org.opensolaris.category.2008:Applications/System Utilities" set name=variant.arch value=$(ARCH) dir path=usr group=sys -dir path=usr/sbin +dir path=usr/bin dir path=usr/share/man/man1m -file path=usr/sbin/diskinfo mode=0555 +file path=usr/bin/diskinfo mode=0555 file path=usr/share/man/man1m/diskinfo.1m mode=0444 license lic_CDDL license=lic_CDDL |
