summaryrefslogtreecommitdiff
path: root/usr/src/cmd/luxadm/lux_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/luxadm/lux_util.c')
-rw-r--r--usr/src/cmd/luxadm/lux_util.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/usr/src/cmd/luxadm/lux_util.c b/usr/src/cmd/luxadm/lux_util.c
index 3c731383e1..ac408704c5 100644
--- a/usr/src/cmd/luxadm/lux_util.c
+++ b/usr/src/cmd/luxadm/lux_util.c
@@ -281,7 +281,7 @@ scsi_find_command_name(int cmd)
static void
scsi_printerr(struct uscsi_cmd *ucmd, struct scsi_extended_sense *rq,
- int rqlen, char msg_string[], char *err_string)
+ int rqlen, char msg_string[], char *err_string)
{
int blkno;
@@ -608,11 +608,8 @@ retry:
* page_code = Pages to return
*/
int
-scsi_mode_sense_cmd(int fd,
- uchar_t *buf_ptr,
- int buf_len,
- uchar_t pc,
- uchar_t page_code)
+scsi_mode_sense_cmd(int fd, uchar_t *buf_ptr, int buf_len, uchar_t pc,
+ uchar_t page_code)
{
struct uscsi_cmd ucmd;
/* 10 byte Mode Select cmd */
@@ -716,7 +713,7 @@ scsi_reserve(char *path)
*/
void
print_fabric_dtype_prop(uchar_t *hba_port_wwn, uchar_t *port_wwn,
- uchar_t dtype_prop)
+ uchar_t dtype_prop)
{
if ((dtype_prop & DTYPE_MASK) < 0x10) {
(void) fprintf(stdout, " 0x%-2x (%s)\n",
@@ -914,7 +911,7 @@ print_inq_data(char *arg_path, char *path, L_inquiry inq, uchar_t *serial,
(void) fprintf(stdout, ")\n");
(void) fprintf(stdout, "%s", *p++);
- if (inq.inq_rmb != NULL) {
+ if (inq.inq_rmb != 0) {
(void) fprintf(stdout, MSGSTR(40, "yes"));
} else {
(void) fprintf(stdout, MSGSTR(45, "no"));
@@ -923,7 +920,7 @@ print_inq_data(char *arg_path, char *path, L_inquiry inq, uchar_t *serial,
if (scsi_3) {
(void) fprintf(stdout, "%s", *p++);
- if (inq.inq_mchngr != NULL) {
+ if (inq.inq_mchngr != 0) {
(void) fprintf(stdout, MSGSTR(40, "yes"));
} else {
(void) fprintf(stdout, MSGSTR(45, "no"));
@@ -950,7 +947,7 @@ print_inq_data(char *arg_path, char *path, L_inquiry inq, uchar_t *serial,
}
if (scsi_3) {
(void) fprintf(stdout, "%s", *p++);
- if (inq.inq_normaca != NULL) {
+ if (inq.inq_normaca != 0) {
(void) fprintf(stdout, MSGSTR(40, "yes"));
} else {
(void) fprintf(stdout, MSGSTR(45, "no"));
@@ -968,7 +965,7 @@ print_inq_data(char *arg_path, char *path, L_inquiry inq, uchar_t *serial,
(void) fprintf(stdout, "%s0x%x\n", *p++, inq.inq_len);
if (scsi_3) {
if (inq.inq_dual_p) {
- if (inq.inq_port != NULL) {
+ if (inq.inq_port != 0) {
(void) fprintf(stdout, MSGSTR(2187,
"%sa\n"), *p++);
} else {
@@ -1029,7 +1026,7 @@ print_inq_data(char *arg_path, char *path, L_inquiry inq, uchar_t *serial,
if (scsi_3) {
(void) fprintf(stdout, "%s", *p++);
- if (inq.ui.inq_3.inq_trandis != NULL) {
+ if (inq.ui.inq_3.inq_trandis != 0) {
(void) fprintf(stdout, MSGSTR(40, "yes"));
} else {
(void) fprintf(stdout, MSGSTR(45, "no"));
@@ -1362,19 +1359,19 @@ get_scsi_vhci_pathinfo(char *dev_path, sv_iocdata_t *ioc, int *path_count)
int fd;
int initial_path_count;
int current_path_count;
- int i;
+ int i;
char *delimiter;
int malloc_error = 0;
- int prop_buf_size;
+ int prop_buf_size;
int pathlist_retry_count = 0;
- if (strncmp(dev_path, SCSI_VHCI, strlen(SCSI_VHCI)) != NULL) {
+ if (strncmp(dev_path, SCSI_VHCI, strlen(SCSI_VHCI)) != 0) {
if ((physical_path = get_slash_devices_from_osDevName(
dev_path, STANDARD_DEVNAME_HANDLING)) == NULL) {
return (L_INVALID_PATH);
}
if (strncmp(physical_path, SCSI_VHCI,
- strlen(SCSI_VHCI)) != NULL) {
+ strlen(SCSI_VHCI)) != 0) {
free(physical_path);
return (L_INVALID_PATH);
}
@@ -1392,7 +1389,7 @@ get_scsi_vhci_pathinfo(char *dev_path, sv_iocdata_t *ioc, int *path_count)
delimiter = strrchr(physical_path, ':');
/* if we didn't find the ':' fine, else truncate */
if (delimiter != NULL) {
- *delimiter = NULL;
+ *delimiter = '\0';
}
/*