Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata wd(4): Use d_cfdriver/devtounit to avoid open/de...
details: https://anonhg.NetBSD.org/src/rev/fc4bb157875e
branches: trunk
changeset: 364529:fc4bb157875e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Mar 28 12:39:37 2022 +0000
description:
wd(4): Use d_cfdriver/devtounit to avoid open/detach races.
diffstat:
sys/dev/ata/wd.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 758335511a54 -r fc4bb157875e sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Mon Mar 28 12:39:28 2022 +0000
+++ b/sys/dev/ata/wd.c Mon Mar 28 12:39:37 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.466 2021/12/28 13:27:32 riastradh Exp $ */
+/* $NetBSD: wd.c,v 1.467 2022/03/28 12:39:37 riastradh Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.466 2021/12/28 13:27:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.467 2022/03/28 12:39:37 riastradh Exp $");
#include "opt_ata.h"
#include "opt_wd.h"
@@ -152,6 +152,8 @@
.d_dump = wddump,
.d_psize = wdsize,
.d_discard = wddiscard,
+ .d_cfdriver = &wd_cd,
+ .d_devtounit = disklabel_dev_unit,
.d_flag = D_DISK
};
@@ -167,6 +169,8 @@
.d_mmap = nommap,
.d_kqfilter = nokqfilter,
.d_discard = wddiscard,
+ .d_cfdriver = &wd_cd,
+ .d_devtounit = disklabel_dev_unit,
.d_flag = D_DISK
};
Home |
Main Index |
Thread Index |
Old Index