PERFORCE change 128040 for review

Marko Zec zec at FreeBSD.org
Wed Oct 24 17:11:29 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=128040

Change 128040 by zec at zec_tpx32 on 2007/10/25 00:11:01

	Hopefully a final attempt to make the new vimage
	naming scheme work right...
	
	While here, de-staticize vimage_by_name() so that it can
	be used from outside of kern_vimage.c

Affected files ...

.. //depot/projects/vimage/src/sys/kern/kern_vimage.c#52 edit
.. //depot/projects/vimage/src/sys/sys/vimage.h#49 edit

Differences ...

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

@@ -444,7 +444,7 @@
 }
 
 
-static struct vimage *
+struct vimage *
 vimage_by_name(struct vimage *top, char *name)
 {
 	struct vimage *vip;
@@ -466,7 +466,7 @@
 	if (namelen == 0)
 		return(NULL);
 	LIST_FOREACH(vip, &top->vi_child_head, vi_sibling)
-		if (strncmp(name, vip->vi_name, namelen) == 0) {
+		if (strcmp(name, vip->vi_name) == 0) {
 			if (next_name != NULL)
 				return(vimage_by_name(vip, next_name));
 			else

==== //depot/projects/vimage/src/sys/sys/vimage.h#49 (text+ko) ====

@@ -344,6 +344,7 @@
 int	vi_if_move(struct vi_req *, struct ifnet *, struct vimage *);
 int	vi_symlookup(struct kld_sym_lookup *, char *);
 struct	vimage *vnet2vimage(struct vnet *);
+struct	vimage *vimage_by_name(struct vimage *, char *);
 char	*vnet_name(struct vnet *);
 int	vi_child_of(struct vimage *, struct vimage *);
 


More information about the p4-projects mailing list