PERFORCE change 81639 for review

soc-cjones soc-cjones at FreeBSD.org
Mon Aug 8 08:17:50 GMT 2005


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

Change 81639 by soc-cjones at soc-cjones_ishtar on 2005/08/08 08:17:46

	Get rid of excess debugging cruft that's no longer needed.

Affected files ...

.. //depot/projects/soc2005/gvinum/src/sys/geom/vinum/geom_vinum_rename.c#5 edit

Differences ...

==== //depot/projects/soc2005/gvinum/src/sys/geom/vinum/geom_vinum_rename.c#5 (text+ko) ====

@@ -146,6 +146,7 @@
 
 	LIST_FOREACH(s, &sc->subdisks, sd) {
 	  if (!strncmp(s->drive, olddrivename, GV_MAXDRIVENAME)) {
+	    printf("Fixing drive reference for subdisk %s from %s to %s\n", s->name,  s->drive, d->name);
 	    strncpy(s->drive, d->name, GV_MAXDRIVENAME);
 	  }
 	}
@@ -286,69 +287,12 @@
 	      strsep(&poldplexname, ".");
 	      snprintf(newplexname, GV_MAXPLEXNAME, "%s.%s", v->name, poldplexname);
 	      if ((err = gv_rename_plex(sc, req, p, newplexname, flags)))
-		  return err;
-
-	      /*
-		char plexnumber[GV_MAXPLEXNAME];
-		char *pplexnumber = plexnumber;
-		printf("Modifying plex %s, p->volume = %s\n", p->name, p->volume);
-		strncpy(oldplexname, p->name, GV_MAXPLEXNAME);
-		strncpy(plexnumber, p->name, GV_MAXPLEXNAME);
-		strsep(&pplexnumber, ".");
-		printf("Renaming plex %s to %s.%s\n", p->name, v->name, pplexnumber);
-		snprintf(p->name, GV_MAXPLEXNAME, "%s.%s", v->name, pplexnumber);
-		LIST_FOREACH(s, &sc->subdisks, sd) {
-		if (!strncmp(s->plex, oldplexname, GV_MAXPLEXNAME)) {
-		char sdnumber[GV_MAXSDNAME];
-		char *psdnumber = sdnumber;
-		printf("Modifying subdisk %s, s->plex = %s\n", s->name, s->plex);
-		strncpy(sdnumber, s->name, GV_MAXSDNAME);
-		strsep(&psdnumber, ".");
-		strsep(&psdnumber, ".");
-		printf("Renaming subdisk %s to %s.%s\n", s->name, p->name, psdnumber);
-		snprintf(s->name, GV_MAXSDNAME, "%s.%s", p->name, psdnumber);
-		strncpy(s->plex, p->name, GV_MAXPLEXNAME);
-		} else {
-		printf("Ignoring subdisk %s, s->plex = %s\n", s->name, s->plex);
-		}
-		}
-	      */
+		return err;
 	    }
-	   } else {
+	  } else {
 	    printf("Ignoring plex %s, p->volume = %s\n", p->name, p->volume);
 	  }
 	}
-
-	/*
-	printf("Debugging output:\n");
-	printf("\tsc = %p\n", sc);
-	printf("\treq = %p\n", req);
-	printf("\tv = %p\n", v);
-	printf("\t\tv->name = %s\n", v->name);
-	printf("\t\tv->size = %d\n", (int) v->size);
-	printf("\t\tv->plexcount = %d\n", v->plexcount);
-	printf("\tnewname = \"%s\"\n", newname);
-	printf("\tflags = %x\n", flags);
-	
-	LIST_FOREACH(p, &sc->plexes, plex) {
-	  if (!strncmp(p->volume, v->name, GV_MAXVOLNAME)) {
-	    printf("\tp->name = %s\n", p->name);
-	    printf("\tp->size = %d\n", (int) p->size);
-	    printf("\tp->volume = %s\n", p->volume);
-	    printf("\tp->sdcount = %d\n", p->sdcount);
-	    printf("\tp->sddown = %d\n", p->sddown);
-	    LIST_FOREACH(s, &sc->subdisks, sd) {
-	      if (!strncmp(s->plex, p->name, GV_MAXPLEXNAME)) {
-		printf("\t\ts->name = %s\n", s->name);
-		printf("\t\ts->size = %d\n", (int) s->size);
-		printf("\t\ts->drive = %s\n", s->drive);
-		printf("\t\ts->plex = %s\n", s->plex);		
-	      }
-	    }
-	  }
-	}
-	printf("\n\n");
-	*/
-
+       
 	return (0);
 }


More information about the p4-projects mailing list