diff options
author | 2005-08-08 20:26:21 +0000 | |
---|---|---|
committer | 2005-08-08 20:26:21 +0000 | |
commit | 5978b28d4b6c4d4f464c5c728acc516f7368c485 (patch) | |
tree | 057a048a0d2127b69b766c854a984e93871a9a77 | |
parent | Add ses link. Tested and ok deraadt@ (diff) | |
download | wireguard-openbsd-5978b28d4b6c4d4f464c5c728acc516f7368c485.tar.xz wireguard-openbsd-5978b28d4b6c4d4f464c5c728acc516f7368c485.zip |
print information about ses/safte for each device; ok marco
-rw-r--r-- | sbin/bioctl/bioctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c index c24add1a0d7..3ee71510ecb 100644 --- a/sbin/bioctl/bioctl.c +++ b/sbin/bioctl/bioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bioctl.c,v 1.25 2005/08/08 18:57:16 deraadt Exp $ */ +/* $OpenBSD: bioctl.c,v 1.26 2005/08/08 20:26:21 deraadt Exp $ */ /* * Copyright (c) 2004, 2005 Marco Peereboom @@ -259,7 +259,12 @@ bio_inq(char *name) snprintf(scsiname, sizeof scsiname, "%u:%u.%u", bd.bd_channel, bd.bd_target, bd.bd_lun); - snprintf(encname, sizeof encname, "ses#"); + if (bd.bd_procdev[0]) + snprintf(encname, sizeof encname, "%s", + bd.bd_procdev); + else + snprintf(encname, sizeof encname, "%s", + "noencl"); printf(" %3u %-10s %14s %-7s %-6s <%s>\n", bd.bd_diskid, status, size, scsiname, encname, |