svn commit: r242367 - in stable/7: lib/libmemstat sys/vm

Matthew D Fleming mdf at FreeBSD.org
Tue Oct 30 17:05:49 UTC 2012


Author: mdf
Date: Tue Oct 30 17:05:47 2012
New Revision: 242367
URL: http://svn.freebsd.org/changeset/base/242367

Log:
  MFC r242152:
  
  Const-ify the zone name argument to uma_zcreate(9).

Modified:
  stable/7/lib/libmemstat/memstat_uma.c
  stable/7/sys/vm/uma.h
  stable/7/sys/vm/uma_core.c
  stable/7/sys/vm/uma_int.h
Directory Properties:
  stable/7/lib/   (props changed)
  stable/7/lib/libmemstat/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/lib/libmemstat/memstat_uma.c
==============================================================================
--- stable/7/lib/libmemstat/memstat_uma.c	Tue Oct 30 17:05:28 2012	(r242366)
+++ stable/7/lib/libmemstat/memstat_uma.c	Tue Oct 30 17:05:47 2012	(r242367)
@@ -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/7/sys/vm/uma.h
==============================================================================
--- stable/7/sys/vm/uma.h	Tue Oct 30 17:05:28 2012	(r242366)
+++ stable/7/sys/vm/uma.h	Tue Oct 30 17:05:47 2012	(r242367)
@@ -164,9 +164,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/7/sys/vm/uma_core.c
==============================================================================
--- stable/7/sys/vm/uma_core.c	Tue Oct 30 17:05:28 2012	(r242366)
+++ stable/7/sys/vm/uma_core.c	Tue Oct 30 17:05:47 2012	(r242367)
@@ -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;
@@ -1726,7 +1726,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/7/sys/vm/uma_int.h
==============================================================================
--- stable/7/sys/vm/uma_int.h	Tue Oct 30 17:05:28 2012	(r242366)
+++ stable/7/sys/vm/uma_int.h	Tue Oct 30 17:05:47 2012	(r242367)
@@ -289,7 +289,7 @@ typedef struct uma_slab_refcnt * uma_sla
  *
  */
 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) */
 	uma_keg_t	uz_keg;		/* Our underlying Keg */
 


More information about the svn-src-all mailing list