Const-ify the zone name argument to uma_zcreate(9).

MFC after:	3 days
This commit is contained in:
mdf 2012-10-26 17:51:05 +00:00
parent a8b2ff5af7
commit 1bc1b805d7
4 changed files with 8 additions and 8 deletions

View File

@ -254,7 +254,7 @@ kread(kvm_t *kvm, void *kvm_pointer, void *address, size_t size,
}
static int
kread_string(kvm_t *kvm, void *kvm_pointer, char *buffer, int buflen)
kread_string(kvm_t *kvm, const void *kvm_pointer, char *buffer, int buflen)
{
ssize_t ret;
int i;

View File

@ -165,9 +165,9 @@ typedef void (*uma_fini)(void *mem, int size);
* A pointer to a structure which is intended to be opaque to users of
* the interface. The value may be null if the wait flag is not set.
*/
uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
uma_init uminit, uma_fini fini, int align,
u_int32_t flags);
uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor,
uma_dtor dtor, uma_init uminit, uma_fini fini,
int align, u_int32_t flags);
/*
* Create a secondary uma zone

View File

@ -158,7 +158,7 @@ static struct callout uma_callout;
* a special allocation function just for zones.
*/
struct uma_zctor_args {
char *name;
const char *name;
size_t size;
uma_ctor ctor;
uma_dtor dtor;
@ -1828,7 +1828,7 @@ uma_set_align(int align)
/* See uma.h */
uma_zone_t
uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
uma_init uminit, uma_fini fini, int align, u_int32_t flags)
{

View File

@ -202,7 +202,7 @@ struct uma_keg {
struct mtx uk_lock; /* Lock for the keg */
struct uma_hash uk_hash;
char *uk_name; /* Name of creating zone. */
const char *uk_name; /* Name of creating zone. */
LIST_HEAD(,uma_zone) uk_zones; /* Keg's zones */
LIST_HEAD(,uma_slab) uk_part_slab; /* partially allocated slabs */
LIST_HEAD(,uma_slab) uk_free_slab; /* empty slab list */
@ -305,7 +305,7 @@ typedef struct uma_klink *uma_klink_t;
*
*/
struct uma_zone {
char *uz_name; /* Text name of the zone */
const char *uz_name; /* Text name of the zone */
struct mtx *uz_lock; /* Lock for the zone (keg's lock) */
LIST_ENTRY(uma_zone) uz_link; /* List of all zones in keg */