[Frugalware-darcs] pacman-tools: mkiso: add a '-c' switch to just determine the volume number (without actually generating the isos)

VMiklos vmiklos at frugalware.org
Fri Jun 2 03:19:07 CEST 2006


[mkiso: add a '-c' switch to just determine the volume number (without actually generating the isos)
VMiklos <vmiklos at frugalware.org>**20060602011524] {
hunk ./mkiso/mkiso.c 281
-int mkiso(volume_t *volume)
+int mkiso(volume_t *volume, int countonly)
hunk ./mkiso/mkiso.c 358
-	system(cmdline);
+	if(!countonly)
+		system(cmdline);
+	else
+		printf("expected volume number: %d\n", myvolume);
hunk ./mkiso/mkiso.c 444
-int prepare(volume_t *volume, char *tmproot)
+int prepare(volume_t *volume, char *tmproot, int countonly)
hunk ./mkiso/mkiso.c 519
-	mkiso(volume);
+	mkiso(volume, countonly);
hunk ./mkiso/mkiso.c 529
-	int i;
+	int i, countonly=0;
hunk ./mkiso/mkiso.c 533
-		free(xmlfile);
-		xmlfile = strdup(argv[1]);
+		if(strcmp(argv[1], "-c"))
+		{
+			free(xmlfile);
+			xmlfile = strdup(argv[1]);
+		}
+		else
+		{
+			countonly=1;
+		}
hunk ./mkiso/mkiso.c 549
-		if(prepare(g_list_nth_data(volumes, i), tmproot))
+		if(prepare(g_list_nth_data(volumes, i), tmproot, countonly))
}


More information about the Frugalware-darcs mailing list