Constify both struct disk->dk_name and the `name' argument to
disk_init().
This commit is contained in:
parent
636d4f1ae2
commit
cb8aa1ff9b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: subr_disk.c,v 1.90 2008/01/02 11:48:52 ad Exp $ */
|
||||
/* $NetBSD: subr_disk.c,v 1.91 2008/01/31 18:30:55 dyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -74,7 +74,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.90 2008/01/02 11:48:52 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.91 2008/01/31 18:30:55 dyoung Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -185,7 +185,7 @@ disk_find(const char *name)
|
||||
}
|
||||
|
||||
void
|
||||
disk_init(struct disk *diskp, char *name, struct dkdriver *driver)
|
||||
disk_init(struct disk *diskp, const char *name, struct dkdriver *driver)
|
||||
{
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disk.h,v 1.47 2007/12/28 19:53:10 riz Exp $ */
|
||||
/* $NetBSD: disk.h,v 1.48 2008/01/31 18:30:55 dyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
|
||||
@ -408,7 +408,7 @@ struct disk_geom {
|
||||
|
||||
struct disk {
|
||||
TAILQ_ENTRY(disk) dk_link; /* link in global disklist */
|
||||
char *dk_name; /* disk name */
|
||||
const char *dk_name; /* disk name */
|
||||
prop_dictionary_t dk_info; /* reference to disk-info dictionary */
|
||||
int dk_bopenmask; /* block devices open */
|
||||
int dk_copenmask; /* character devices open */
|
||||
@ -503,7 +503,7 @@ struct proc;
|
||||
|
||||
void disk_attach(struct disk *);
|
||||
void disk_detach(struct disk *);
|
||||
void disk_init(struct disk *, char *, struct dkdriver *);
|
||||
void disk_init(struct disk *, const char *, struct dkdriver *);
|
||||
void disk_destroy(struct disk *);
|
||||
void disk_busy(struct disk *);
|
||||
void disk_unbusy(struct disk *, long, int);
|
||||
|
Loading…
Reference in New Issue
Block a user