Date: Tue, 30 Oct 2012 17:05:28 +0000 (UTC) From: Matthew D Fleming <mdf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242366 - in stable/8: lib/libmemstat sys/vm Message-ID: <201210301705.q9UH5SFj035569@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mdf Date: Tue Oct 30 17:05:28 2012 New Revision: 242366 URL: http://svn.freebsd.org/changeset/base/242366 Log: MFC r242152: Const-ify the zone name argument to uma_zcreate(9). Modified: stable/8/lib/libmemstat/memstat_uma.c stable/8/sys/vm/uma.h stable/8/sys/vm/uma_core.c stable/8/sys/vm/uma_int.h Directory Properties: stable/8/lib/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/lib/libmemstat/memstat_uma.c ============================================================================== --- stable/8/lib/libmemstat/memstat_uma.c Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/lib/libmemstat/memstat_uma.c Tue Oct 30 17:05:28 2012 (r242366) @@ -262,7 +262,7 @@ kread(kvm_t *kvm, void *kvm_pointer, voi } 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; Modified: stable/8/sys/vm/uma.h ============================================================================== --- stable/8/sys/vm/uma.h Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/sys/vm/uma.h Tue Oct 30 17:05:28 2012 (r242366) @@ -165,9 +165,9 @@ typedef void (*uma_fini)(void *mem, int * 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 Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/sys/vm/uma_core.c Tue Oct 30 17:05:28 2012 (r242366) @@ -153,7 +153,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; @@ -1816,7 +1816,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) { Modified: stable/8/sys/vm/uma_int.h ============================================================================== --- stable/8/sys/vm/uma_int.h Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/sys/vm/uma_int.h Tue Oct 30 17:05:28 2012 (r242366) @@ -193,7 +193,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 */ @@ -296,7 +296,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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210301705.q9UH5SFj035569>