summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2012-01-20 14:43:05 +0000
committerjsing <jsing@openbsd.org>2012-01-20 14:43:05 +0000
commit313b4264043901d86723e175058ab2360c35f767 (patch)
treeae9fce4857ce6a192993dd48ca08c6fe8614f342 /sys/dev/softraid.c
parentTeach bioctl(8) about the new status interface for bio(4). With the (diff)
downloadwireguard-openbsd-313b4264043901d86723e175058ab2360c35f767.tar.xz
wireguard-openbsd-313b4264043901d86723e175058ab2360c35f767.zip
Add bio(4) status interface structs and utility functions to softraid(4).
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r--sys/dev/softraid.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index dbe3ef16ff3..2800285d407 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.267 2012/01/17 13:53:02 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.268 2012/01/20 14:43:05 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1837,6 +1837,36 @@ sr_detach(struct device *self, int flags)
}
void
+sr_info(struct sr_softc *sc, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ bio_status(&sc->sc_status, 0, BIO_MSG_INFO, fmt, &ap);
+ va_end(ap);
+}
+
+void
+sr_warn(struct sr_softc *sc, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ bio_status(&sc->sc_status, 1, BIO_MSG_WARN, fmt, &ap);
+ va_end(ap);
+}
+
+void
+sr_error(struct sr_softc *sc, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ bio_status(&sc->sc_status, 1, BIO_MSG_ERROR, fmt, &ap);
+ va_end(ap);
+}
+
+void
sr_minphys(struct buf *bp, struct scsi_link *sl)
{
DNPRINTF(SR_D_MISC, "sr_minphys: %d\n", bp->b_bcount);