On second thought, let's call disk_predetach() disk_begindetach().
Verbs are good.
This commit is contained in:
parent
91805f2d22
commit
85d8d1fcdd
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wd.c,v 1.376 2009/05/19 23:43:44 dyoung Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.377 2009/05/20 03:26:21 dyoung Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
|
||||
|
@ -59,7 +59,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.376 2009/05/19 23:43:44 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.377 2009/05/20 03:26:21 dyoung Exp $");
|
||||
|
||||
#include "opt_ata.h"
|
||||
|
||||
|
@ -439,7 +439,7 @@ wddetach(device_t self, int flags)
|
|||
struct wd_softc *sc = device_private(self);
|
||||
int bmaj, cmaj, i, mn, rc, s;
|
||||
|
||||
if ((rc = disk_predetach(&sc->sc_dk, wdlastclose, self, flags)) != 0)
|
||||
if ((rc = disk_begindetach(&sc->sc_dk, wdlastclose, self, flags)) != 0)
|
||||
return rc;
|
||||
|
||||
/* locate the major number */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sd.c,v 1.285 2009/05/19 23:43:44 dyoung Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.286 2009/05/20 03:26:21 dyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -47,7 +47,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.285 2009/05/19 23:43:44 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.286 2009/05/20 03:26:21 dyoung Exp $");
|
||||
|
||||
#include "opt_scsi.h"
|
||||
#include "rnd.h"
|
||||
|
@ -332,7 +332,7 @@ sddetach(device_t self, int flags)
|
|||
struct sd_softc *sd = device_private(self);
|
||||
int s, bmaj, cmaj, i, mn, rc;
|
||||
|
||||
if ((rc = disk_predetach(&sd->sc_dk, sdlastclose, self, flags)) != 0)
|
||||
if ((rc = disk_begindetach(&sd->sc_dk, sdlastclose, self, flags)) != 0)
|
||||
return rc;
|
||||
|
||||
/* locate the major number */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr_disk.c,v 1.96 2009/05/19 23:42:05 dyoung Exp $ */
|
||||
/* $NetBSD: subr_disk.c,v 1.97 2009/05/20 03:26:21 dyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.96 2009/05/19 23:42:05 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.97 2009/05/20 03:26:21 dyoung Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -217,7 +217,7 @@ disk_attach(struct disk *diskp)
|
|||
}
|
||||
|
||||
int
|
||||
disk_predetach(struct disk *dk, int (*lastclose)(device_t),
|
||||
disk_begindetach(struct disk *dk, int (*lastclose)(device_t),
|
||||
device_t self, int flags)
|
||||
{
|
||||
int rc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disk.h,v 1.53 2009/05/19 23:42:05 dyoung Exp $ */
|
||||
/* $NetBSD: disk.h,v 1.54 2009/05/20 03:26:21 dyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -497,7 +497,7 @@ extern int disk_count; /* number of disks in global disklist */
|
|||
struct proc;
|
||||
|
||||
void disk_attach(struct disk *);
|
||||
int disk_predetach(struct disk *, int (*)(device_t), device_t, int);
|
||||
int disk_begindetach(struct disk *, int (*)(device_t), device_t, int);
|
||||
void disk_detach(struct disk *);
|
||||
void disk_init(struct disk *, const char *, const struct dkdriver *);
|
||||
void disk_destroy(struct disk *);
|
||||
|
|
Loading…
Reference in New Issue