Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dkwedge Since rev 1.101 DIOCAWEDGE could return succ...
details: https://anonhg.NetBSD.org/src/rev/e7af808ca1f3
branches: trunk
changeset: 366744:e7af808ca1f3
user: martin <martin%NetBSD.org@localhost>
date: Sat Jun 11 18:17:00 2022 +0000
description:
Since rev 1.101 DIOCAWEDGE could return success without filling in the
wedge device name - which is quite confusing for userland.
Always fill the name if we return success.
diffstat:
sys/dev/dkwedge/dk.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r db01014912cc -r e7af808ca1f3 sys/dev/dkwedge/dk.c
--- a/sys/dev/dkwedge/dk.c Sat Jun 11 17:58:15 2022 +0000
+++ b/sys/dev/dkwedge/dk.c Sat Jun 11 18:17:00 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dk.c,v 1.111 2022/04/23 16:22:23 hannken Exp $ */
+/* $NetBSD: dk.c,v 1.112 2022/06/11 18:17:00 martin Exp $ */
/*-
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.111 2022/04/23 16:22:23 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.112 2022/06/11 18:17:00 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_dkwedge.h"
@@ -483,10 +483,6 @@
return (ENOMEM);
}
- /* Return the devname to the caller. */
- strlcpy(dkw->dkw_devname, device_xname(sc->sc_dev),
- sizeof(dkw->dkw_devname));
-
/*
* XXX Really ought to make the disk_attach() and the changing
* of state to RUNNING atomic.
@@ -508,6 +504,10 @@
sc->sc_size, sc->sc_offset,
sc->sc_ptype[0] == '\0' ? "<unknown>" : sc->sc_ptype);
+ /* Return the devname to the caller. */
+ strlcpy(dkw->dkw_devname, device_xname(sc->sc_dev),
+ sizeof(dkw->dkw_devname));
+
return (0);
}
Home |
Main Index |
Thread Index |
Old Index