Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2009 07:18:24 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 161015 for review
Message-ID:  <200904240718.n3O7IOhM094188@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=161015

Change 161015 by zec@zec_tpx32 on 2009/04/24 07:17:53

	Enclose options VIMAGE specific lines in #ifdef, which
	prevented DEBUG_ORDERING to be compiled in in kern_vimage.c

Affected files ...

.. //depot/projects/vimage-commit/src/sys/kern/kern_vimage.c#7 edit

Differences ...

==== //depot/projects/vimage-commit/src/sys/kern/kern_vimage.c#7 (text+ko) ====

@@ -184,8 +184,10 @@
 	if (vml->vml_iarg)
 		printf("/%s", vml->vml_iname);
 	printf(": ");
+#ifdef VIMAGE
 	if (vmi->vmi_struct_size)
 		printf("malloc(%zu); ", vmi->vmi_struct_size);
+#endif
 	if (vmi->vmi_iattach != NULL)
 		printf("iattach()");
 	printf("\n");
@@ -193,7 +195,7 @@
 
 #ifdef VIMAGE
 	if (vmi->vmi_struct_size) {
-		void *mem = malloc(vmi->vmi_struct_size, M_VNET,
+		void *mem = malloc(vmi->vmi_size, M_VNET,
 		    M_NOWAIT | M_ZERO);
 		if (mem == NULL) /* XXX should return error, not panic. */
 			panic("vi_alloc: malloc for %s\n", vmi->vmi_name);
@@ -220,8 +222,10 @@
 	printf(": ");
 	if (vmi->vmi_idetach != NULL)
 		printf("idetach(); ");
+#ifdef VIMAGE
 	if (vmi->vmi_size)
 		printf("free()");
+#endif
 	printf("\n");
 #endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904240718.n3O7IOhM094188>