diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-11-23 14:45:00 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-11-23 14:45:00 +0000 |
commit | 57d50fa24d456bafc4e3444b11d2844050f07a84 (patch) | |
tree | 48a9898d24e3a3716619f14dc8579e5bd46b423a /sys | |
parent | 76639104ee2d49c22bb32238b6a65110a5c48f50 (diff) |
if we cant fetch the serial then fill it with "(unknown)".
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/sd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 780b801fdc5..5337ed16285 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.139 2007/11/11 16:46:51 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.140 2007/11/23 14:44:59 dlg Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -981,6 +981,8 @@ sd_ioctl_inquiry(struct sd_softc *sd, struct dk_inquiry *di) if (scsi_inquire_vpd(sd->sc_link, &vpd, sizeof(vpd), SI_PG_SERIAL, 0) == 0) scsi_strvis(di->serial, vpd.serial, sizeof(vpd.serial)); + else + strlcpy(di->serial, "(unknown)", sizeof(vpd.serial)); return (0); } |