diff options
Diffstat (limited to 'usr/src/cmd/luxadm')
-rw-r--r-- | usr/src/cmd/luxadm/fcalupdate.c | 8 | ||||
-rw-r--r-- | usr/src/cmd/luxadm/g_adm.c | 30 | ||||
-rw-r--r-- | usr/src/cmd/luxadm/hotplug.c | 24 | ||||
-rw-r--r-- | usr/src/cmd/luxadm/qlgcupdate.c | 12 |
4 files changed, 37 insertions, 37 deletions
diff --git a/usr/src/cmd/luxadm/fcalupdate.c b/usr/src/cmd/luxadm/fcalupdate.c index c9a8e158fa..41f800f3bd 100644 --- a/usr/src/cmd/luxadm/fcalupdate.c +++ b/usr/src/cmd/luxadm/fcalupdate.c @@ -66,7 +66,7 @@ #include <l_common.h> #include "luxadm.h" -/* Defines */ +/* Defines */ #define FEPROM_SIZE 256*1024 #define FEPROM_MAX_PROGRAM 25 #define FEPROM_MAX_ERASE 1000 @@ -632,7 +632,7 @@ getbootdev(unsigned int verbose) char *slot = ",0:slot"; ls = (char *)malloc(PATH_MAX); - (void) memset((char *)ls, NULL, PATH_MAX); + (void) memset((char *)ls, 0, PATH_MAX); (void) strcpy(ls, "ls -l "); (void) strcat(ls, bootdev); if ((ptr = popen(ls, "r")) != NULL) { @@ -827,9 +827,9 @@ loop1: /* * getsocpath(): - * Searches the /devices directory recursively returning all soc_name + * Searches the /devices directory recursively returning all soc_name * entries in sbussoc_list (global). This excludes port entries and - * onboard socal (which leaves only directory entries with + * onboard socal (which leaves only directory entries with * soc_name included). devcnt is updated to reflect number of soc_name * devices found. */ diff --git a/usr/src/cmd/luxadm/g_adm.c b/usr/src/cmd/luxadm/g_adm.c index b6377b00da..ed6a389c75 100644 --- a/usr/src/cmd/luxadm/g_adm.c +++ b/usr/src/cmd/luxadm/g_adm.c @@ -94,7 +94,7 @@ static void display_lun_info(L_disk_state, Path_struct *, struct mode_page *, int, WWN_list *, char *); static void display_fc_disk(struct path_struct *, char *, gfc_map_t *, L_inquiry, int); -static void adm_display_err(char *, int); +static void adm_display_err(char *, int); static void temperature_messages(struct l_state_struct *, int); static void ctlr_messages(struct l_state_struct *, int, int); static void fan_messages(struct l_state_struct *, int, int); @@ -285,7 +285,7 @@ char last_logical_path[MAXPATHLEN]; retval++; continue; } - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; path_phys = NULL; @@ -482,7 +482,7 @@ char err_path[MAXNAMELEN]; if (((ptr = strstr(err_path, ", ")) != NULL) && ((*(ptr + 1) == 'f') || (*(ptr + 1) == 'r') || (*(ptr +1) == 's'))) { - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; path_phys = NULL; @@ -573,7 +573,7 @@ char ses_path[MAXPATHLEN], inq_path[MAXNAMELEN]; retval++; continue; } - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; if ((err = l_convert_name(inq_path, &path_phys, @@ -2317,15 +2317,15 @@ int num_status_entries; (void) fprintf(stdout, MSGSTR(32, "Information from %s"), fc_stats->drvr_name); (void) fprintf(stdout, "\n"); - if ((*fc_stats->node_wwn != NULL) && - (*fc_stats->port_wwn[port] != NULL)) { + if ((*fc_stats->node_wwn != '\0') && + (*fc_stats->port_wwn[port] != '\0')) { (void) fprintf(stdout, MSGSTR(104, " Host Adapter WWN's: Node:%s" " Port:%s\n"), fc_stats->node_wwn, fc_stats->port_wwn[port]); } - if (*fc_stats->fw_revision != NULL) { + if (*fc_stats->fw_revision != '\0') { (void) fprintf(stdout, MSGSTR(105, " Host Adapter Firmware Revision: %s\n"), fc_stats->fw_revision); @@ -2613,15 +2613,15 @@ int p_on = 0, p_st = 0; "Information from %s"), ifp_stats.drvr_name); (void) fprintf(stdout, "\n"); - if ((*ifp_stats.node_wwn != NULL) && - (*ifp_stats.port_wwn != NULL)) { + if ((*ifp_stats.node_wwn != '\0') && + (*ifp_stats.port_wwn != '\0')) { (void) fprintf(stdout, MSGSTR(104, " Host Adapter WWN's: Node:%s" " Port:%s\n"), ifp_stats.node_wwn, ifp_stats.port_wwn); } - if (*ifp_stats.fw_revision != NULL) { + if (*ifp_stats.fw_revision != 0) { (void) fprintf(stdout, MSGSTR(105, " Host Adapter Firmware Revision: %s\n"), ifp_stats.fw_revision); @@ -2925,7 +2925,7 @@ char temp2path[MAXPATHLEN]; mp_pathlist_t pathlist; int p_pw = 0, p_on = 0, p_st = 0; gfc_dev_t map_root, map_dev; -int *port_addr, *hard_addr, pos = 0, count; +int *port_addr, *hard_addr, pos = 0, count; uchar_t *hba_port_wwn, *port_wwn, *node_wwn, *dtype_prop; uint_t map_topo; @@ -4062,7 +4062,7 @@ struct mode_page *pg_hdr; if (no_path_flag) { (void) fprintf(stdout, " "); - if (port_a_flag != NULL) { + if (port_a_flag != 0) { (void) fprintf(stdout, MSGSTR(142, "Status(Port B):")); } else { (void) fprintf(stdout, MSGSTR(141, "Status(Port A):")); @@ -4870,7 +4870,7 @@ Interconnect_st interconnect; (void) fprintf(stdout, MSGSTR(30, "Not Installed")); } else if (interconnect.code == S_CRITICAL) { - if (interconnect.eprom_fail != NULL) { + if (interconnect.eprom_fail != 0) { (void) fprintf(stdout, MSGSTR(2140, "Critical Failure: EEPROM failure")); } else { @@ -4879,7 +4879,7 @@ Interconnect_st interconnect; } revision_msg(l_state, elem_index + j); } else if (interconnect.code == S_NONCRITICAL) { - if (interconnect.eprom_fail != NULL) { + if (interconnect.eprom_fail != 0) { (void) fprintf(stdout, MSGSTR(2142, "Non-Critical Failure: EEPROM failure")); } else { @@ -5566,7 +5566,7 @@ cleanup_and_go: * * Sample output for ifp: * - * /devices/pci@1f,4000/SUNW,ifp@2:devctl CONNECTED + * /devices/pci@1f,4000/SUNW,ifp@2:devctl CONNECTED * /devices/pci@1f,2000/SUNW,ifp@1:devctl NOT CONNECTED * * Sample output for socal: diff --git a/usr/src/cmd/luxadm/hotplug.c b/usr/src/cmd/luxadm/hotplug.c index 2efec8ba3c..f3e962ae8f 100644 --- a/usr/src/cmd/luxadm/hotplug.c +++ b/usr/src/cmd/luxadm/hotplug.c @@ -104,7 +104,7 @@ static int h_pre_hotplug_sena(Hotplug_Devlist *, static int h_post_hotplug_sena(Hotplug_Devlist *, WWN_list *, int, int, int, int); static int h_remove_ses_nodes(struct dlist *); -static int h_print_list_warn(Hotplug_Devlist *, int, int); +static int h_print_list_warn(Hotplug_Devlist *, int, int); static int h_display_logical_nodes(struct dlist *); static void h_print_logical_nodes(struct dlist *); static int h_remove_nodes(struct dlist *); @@ -394,7 +394,7 @@ char choice[2]; for (list = bsyRsrv_disk_list; list != NULL; list = list->next, i++) { if ((list->dev_type == DTYPE_DIRECT) && (list->dev_location == SENA)) { - if (list->f_flag != NULL) { + if (list->f_flag != 0) { if (enc_type == DAK_ENC_TYPE) { (void) fprintf(stdout, MSGSTR(5663, " %d: Box Name: \"%s\" slot %d\n"), @@ -549,7 +549,7 @@ int p_pw = 0, p_on = 0, p_st = 0; err = 0; continue; } - *ptr = NULL; + *ptr = '\0'; slot = path_struct->slot; f_r = path_struct->f_flag; if ((err = l_convert_name(inq_path, &path_phys, @@ -687,7 +687,7 @@ int p_pw = 0, p_on = 0, p_st = 0; * set dev_path to NULL, * if disk has null wwn. */ - *dev_path = NULL; + *dev_path = '\0'; dev_location = SENA; goto getinfo; } @@ -2193,12 +2193,12 @@ Box_list *bl1, *box_list = NULL; */ static int h_post_remove_dev(Hotplug_Devlist *hotplug_disk, - int todo, int verbose_flag) + int todo, int verbose_flag) { -char device_name[MAXNAMELEN], *dev_path = NULL; -int tid, err; -gfc_map_t map; -int nArg; + char device_name[MAXNAMELEN], *dev_path = NULL; + int tid, err; + gfc_map_t map; + int nArg; tid = hotplug_disk->tid; @@ -2669,7 +2669,7 @@ char *tape_entries[] = { "", "b", "bn", "c", "cb", "cbn", "cn", (void) strcpy(buf, ptr); if ((ptr = strrchr(buf, 's')) == NULL) continue; - *(++ptr) = NULL; + *(++ptr) = '\0'; found_dev++; if (found_dev == 1) (void) fprintf(stdout, @@ -2695,7 +2695,7 @@ char *tape_entries[] = { "", "b", "bn", "c", "cb", "cbn", "cn", buf_ptr = ptr; while (*ptr >= '0' && *ptr <= '9') ptr++; - *ptr = NULL; + *ptr = '\0'; for (i = 0, ptr = tape_entries[0]; ptr != NULL; i++, ptr = tape_entries[i]) { @@ -2795,7 +2795,7 @@ Hotplug_Devlist *disk_list = disk_list_head; for (i = 1; disk_list; i++, disk_list = disk_list->next) { if ((disk_list->dev_type == DTYPE_DIRECT) && (disk_list->dev_location == SENA)) { - if (disk_list->f_flag != NULL) { + if (disk_list->f_flag != 0) { if (enc_type == DAK_ENC_TYPE) { (void) fprintf(stdout, MSGSTR(5665, " %d: Box Name: \"%s\" slot %d\n"), diff --git a/usr/src/cmd/luxadm/qlgcupdate.c b/usr/src/cmd/luxadm/qlgcupdate.c index 404f4b7c06..07b6941b91 100644 --- a/usr/src/cmd/luxadm/qlgcupdate.c +++ b/usr/src/cmd/luxadm/qlgcupdate.c @@ -159,8 +159,8 @@ q_qlgc_update(unsigned int verbose, char *file) * is "sbus@12". They are initialized to a random value and are * set such that they are not equal initially. */ - static char port1[MAXNAMELEN] = {NULL}; - static char port2[MAXNAMELEN] = {NULL}; + static char port1[MAXNAMELEN] = { 0 }; + static char port2[MAXNAMELEN] = { 0 }; if (file) { fflag++; @@ -401,8 +401,8 @@ q_findversion(int verbose, int index, uchar_t *version, uint16_t *chip_id) { int fd, ntries; struct ifp_fm_version *version_buffer = NULL; - char prom_ver[100] = {NULL}; - char mcode_ver[100] = {NULL}; + char prom_ver[100] = { 0 }; + char mcode_ver[100] = { 0 }; fcio_t fcio; if (strstr(&pcibus_list[index][0], fc_trans)) { @@ -516,7 +516,7 @@ q_findfileversion(char *dl_fcode, uchar_t *version_file, uint16_t *file_id, { int mark; int qlc_offset = 0; - char temp[4] = {NULL}; + char temp[4] = { 0 }; /* @@ -1328,7 +1328,7 @@ emulex_fcodeversion(di_node_t node, uchar_t *ver) { promprop)) != NULL) && (strcmp(promname, "fcode-version") == 0)) { size = di_prom_prop_data(promprop, &ver_data); - (void) memset(ver, NULL, size); + (void) memset(ver, 0, size); (void) memcpy(ver, ver_data, size); found = 1; } |