Skip vendor if the string is empty.
This commit is contained in:
parent
755f404f87
commit
c87c6690c0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bioctl.c,v 1.15 2011/08/29 14:34:58 joerg Exp $ */
|
||||
/* $NetBSD: bioctl.c,v 1.16 2014/11/15 01:52:01 joerg Exp $ */
|
||||
/* $OpenBSD: bioctl.c,v 1.52 2007/03/20 15:26:06 jmc Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: bioctl.c,v 1.15 2011/08/29 14:34:58 joerg Exp $");
|
||||
__RCSID("$NetBSD: bioctl.c,v 1.16 2014/11/15 01:52:01 joerg Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -292,7 +292,7 @@ bio_show_volumes(struct biotmp *bt)
|
|||
}
|
||||
|
||||
snprintf(bt->volname, sizeof(bt->volname), "%u", bv.bv_volid);
|
||||
if (bv.bv_vendor)
|
||||
if (bv.bv_vendor[0])
|
||||
snprintf(tmp, sizeof(tmp), "%s %s", bv.bv_dev, bv.bv_vendor);
|
||||
else
|
||||
snprintf(tmp, sizeof(tmp), "%s", bv.bv_dev);
|
||||
|
|
Loading…
Reference in New Issue