diff options
author | John Levon <john.levon@joyent.com> | 2020-05-26 13:57:13 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2020-05-26 13:57:13 +0000 |
commit | 5b2acc0949194447bba6e45a0fa44d0b5f42f208 (patch) | |
tree | 7ea9eb87bc68fee386dd39035ce715e87a0e673c /usr/src/cmd/picl/plugins/sun4u/mpxu | |
parent | 8ca018083101bf1cb175869679bc123187fb1bab (diff) | |
parent | 2a1277d3064386cd5c4e372301007aa330bf1d5e (diff) | |
download | illumos-joyent-gcc9.tar.gz |
mergegcc9
Diffstat (limited to 'usr/src/cmd/picl/plugins/sun4u/mpxu')
6 files changed, 22 insertions, 59 deletions
diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile index 5353fc53e9..342f09cda5 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile @@ -38,8 +38,6 @@ CONF= picldevtree.conf picl_asr.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -48,9 +46,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: +all: install: $(ROOTLIBDIR) $(ROOTCONF) @@ -58,9 +55,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile index 5f2229f5ff..ce2be3f2d8 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile @@ -40,8 +40,6 @@ ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 MAININFO= $(CONFS:%.conf=%.info) -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -50,9 +48,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -70,9 +67,6 @@ $(CONFS): $(MAININFO) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile index ff1bf2e376..48012c187e 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile @@ -39,8 +39,6 @@ CONF= libpiclfrudata.conf ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) $(ROOTCONF) := FILEMODE = 0644 -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -49,7 +47,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint all: $(CONF) @@ -59,9 +56,6 @@ install: $(ROOTLIBDIR) $(ROOTCONF) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile index 7624c2cf55..f5fcac6054 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile @@ -69,12 +69,6 @@ OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info OTHERINFOS += fru_SC_data.info SB-tables.info OTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info -LINTSRC = $(LINTLIB:%.ln=%) -ROOTLINTDIR = $(ROOTLIBDIR) -ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) - -CLEANFILES = $(LINTOUT) $(LINTLIB) - CPPFLAGS += -D_REENTRANT CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil CPPFLAGS += -I$(SRC)/uts/sun4u/mpxu @@ -108,7 +102,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint _msg := TARGET= _msg all: $(LIBS) $(LIBLINKS) $(CONFS) @@ -163,11 +156,7 @@ $(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS) $(RM) -r $@ ;\ $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: - $(LINT.c) $(SRCS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c index 28adb31207..513f3d4ad4 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c @@ -894,19 +894,19 @@ find_child_by_name(picl_nodehdl_t parh, char *name) err = ptree_get_propval_by_name(parh, PICL_PROP_CHILD, &nodeh, sizeof (picl_nodehdl_t)); if (err != PICL_SUCCESS) - return (NULL); + return (0); for (;;) { err = ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, nodename, sizeof (nodename)); if (err != PICL_SUCCESS) - return (NULL); + return (0); if (strcmp(name, nodename) == 0) { return (nodeh); } err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, sizeof (picl_nodehdl_t)); if (err != PICL_SUCCESS) - return (NULL); + return (0); } } @@ -1241,7 +1241,7 @@ frudr_completion_handler(char *ename, void *earg, size_t size) { picl_nodehdl_t fruh; picl_nodehdl_t parh; - picl_nodehdl_t peerh = NULL; + picl_nodehdl_t peerh = 0; char nodename[PICL_PROPNAMELEN_MAX] = { '\0' }; int err; @@ -1250,10 +1250,10 @@ frudr_completion_handler(char *ename, void *earg, size_t size) * now frudata has been notified that the node is to be * removed, we can actually remove it */ - fruh = NULL; + fruh = 0; (void) nvlist_lookup_uint64(earg, PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { + if (fruh != 0) { (void) ptree_get_propval_by_name(fruh, PICL_PROP_PEER, &peerh, sizeof (peerh)); @@ -1301,7 +1301,7 @@ frudr_completion_handler(char *ename, void *earg, size_t size) if ((sys_platform == PLAT_CHALUPA19) && (strncmp(nodename, FT_NAME, FT_NAME_LEN) == 0) && - (peerh != NULL)) { + (peerh != 0)) { /* * On Netra-440 platforms, a fan tray * may contain 2 fans (F0 and F1) but @@ -1337,7 +1337,7 @@ post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) ev_name = strdup(ename); if (ev_name == NULL) return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, 0)) { free(ev_name); return; } @@ -1488,7 +1488,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) return; } - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) { return; } @@ -1579,7 +1579,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) /* * fru was there - but has gone away */ - post_frudr_event(PICL_FRU_REMOVED, NULL, fruh); + post_frudr_event(PICL_FRU_REMOVED, 0, fruh); } } else if (rmc_flag) { /* @@ -1589,7 +1589,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) */ if (ptree_get_propval_by_name(locnodeh, PICL_PROP_CHILD, &fruh, sizeof (picl_nodehdl_t)) != PICL_SUCCESS) { - fruh = NULL; + fruh = 0; } post_frudr_event(PICL_FRU_ADDED, locnodeh, fruh); } else { @@ -1598,7 +1598,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) * if node already there, then just return */ childh = find_child_by_name(locnodeh, fru_name); - if (childh != NULL) { + if (childh != 0) { nvlist_free(nvlp); return; } @@ -1641,7 +1641,7 @@ frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) /* * now post event */ - post_frudr_event(PICL_FRU_ADDED, locnodeh, NULL); + post_frudr_event(PICL_FRU_ADDED, locnodeh, 0); } nvlist_free(nvlp); } @@ -1752,7 +1752,7 @@ frutree_evhandler(const char *ename, const void *earg, size_t size, if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) != 0) return; - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) + if (nvlist_unpack((char *)earg, size, &nvlp, 0)) return; if (nvlist_lookup_string(nvlp, PICLEVENTARG_DATA_TYPE, &dtype)) { @@ -1894,7 +1894,7 @@ set_led(char *name, char *ptr, char *value) /* * if no fru node, then turn led off */ - if (find_child_by_name(locnodeh, DISK_FRU_NAME) != NULL) + if (find_child_by_name(locnodeh, DISK_FRU_NAME) != 0) value_ptr = value; else value_ptr = PICL_PROPVAL_OFF; @@ -2344,7 +2344,7 @@ update_disk_node(char *fruname, char *devpath) return; } diskndh = find_child_by_name(slotndh, DISK_FRU_NAME); - if (diskndh == NULL) { + if (diskndh == 0) { return; } err = ptree_get_node_by_path(devpath, &devhdl); @@ -2491,16 +2491,14 @@ check_raid(int target) static void * disk_leds_thread(void *args) { - int c; - int i; + int c; + int i; char **disk_dev; int fd; devctl_hdl_t dhdl; - int n_disks = 0, - do_raid = 0, - err = 0; + int n_disks = 0, do_raid = 0, err = 0; uint_t statep = 0; static char *mpxu_devs[] = { diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile index 1574d19255..5f705f0ddd 100644 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile +++ b/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile @@ -53,8 +53,6 @@ OTHERINFOS += $(INCDIR2)/fru_SC_data.info OTHERINFOS += $(INCDIR2)/fru_usb-a-1_data.info OTHERINFOS += $(INCDIR2)/fru_usb-a-2_data.info -ROOTLINTDIR = $(ROOTLIBDIR) - .KEEP_STATE: SUBDIRS= @@ -63,9 +61,8 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint -all: $(CONFS) +all: $(CONFS) install: $(ROOTLIBDIR) $(ROOTCONF) @@ -83,9 +80,6 @@ $(CONFS): $(MAININFO) $(OTHERINFOS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/picl/plugins/Makefile.targ -$(ROOTLINTDIR)/%: ../% - $(INS.file) - lint: $(SUBDIRS): FRC |