summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@fingolfin.org>2022-03-10 20:12:50 +0000
committerRobert Mustacchi <rm@fingolfin.org>2022-03-15 17:30:42 +0000
commit499bc737cd392291f0c92dcebcb576970689f5d8 (patch)
tree145add1b30ad636688dfea2be1eeaf888538f7a8
parentc82c4676ac0cb87eb69c9444cf1a775e756ebbb9 (diff)
downloadillumos-joyent-499bc737cd392291f0c92dcebcb576970689f5d8.tar.gz
14561 fwflash -l on ufm without known PCI device id crashes
Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r--usr/src/cmd/fwflash/Makefile.com3
-rw-r--r--usr/src/cmd/fwflash/plugins/transport/common/ufm.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/usr/src/cmd/fwflash/Makefile.com b/usr/src/cmd/fwflash/Makefile.com
index 08b90ce62b..9ada7accb3 100644
--- a/usr/src/cmd/fwflash/Makefile.com
+++ b/usr/src/cmd/fwflash/Makefile.com
@@ -26,7 +26,6 @@
# common rules for $SRC/cmd/fwflash
CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += $(CNOWARN_UNINIT)
CERRWARN += -_gcc=-Wno-address
# not linted
@@ -94,7 +93,7 @@ $(ROOTUSRSBIN)/%: %
$(POFILE): $(POFILES)
$(RM) $@
- cat $(POFILES) >$@
+ cat $(POFILES) >$@
LINTFLAGS += -D_POSIX_PTHREAD_SEMANTICS -erroff=E_CONSTANT_CONDITION \
-erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
diff --git a/usr/src/cmd/fwflash/plugins/transport/common/ufm.c b/usr/src/cmd/fwflash/plugins/transport/common/ufm.c
index 5e9cb3abc6..9b6709f3c8 100644
--- a/usr/src/cmd/fwflash/plugins/transport/common/ufm.c
+++ b/usr/src/cmd/fwflash/plugins/transport/common/ufm.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2020 Oxide Computer Company
+ * Copyright 2022 Oxide Computer Company
*/
/*
@@ -299,7 +299,7 @@ ufmfw_fill_vpd(struct devicelist *flashdev, di_node_t node)
}
flashdev->ident->vid = vstr;
- if (dstr != NULL) {
+ if (dev != NULL) {
dstr = strdup(pcidb_device_name(dev));
} else {
(void) asprintf(&dstr, "pci:%x", did[0]);