Fix the wizardmodes 'write' command to not explode: Don't reference

the name in the disk tree we just deleted when we reopen.
This commit is contained in:
Poul-Henning Kamp 2002-10-28 22:40:49 +00:00
parent 8a52a7d509
commit 1709a4fd6a
2 changed files with 4 additions and 8 deletions

View file

@ -169,8 +169,9 @@ slice_wizard(Disk *d)
if (!strcasecmp(*cmds,"write")) {
printf("Write=%d\n",
Fake ? 0 : Write_Disk(d));
q = strdup(d->name);
Free_Disk(d);
d = Open_Disk(d->name);
d = Open_Disk(q);
continue;
}
if (strcasecmp(*cmds,"help"))
@ -192,9 +193,6 @@ slice_wizard(Disk *d)
printf("read [disk]\t\t");
printf("scan\n");
printf("write\t\t");
printf("ENUM:\n\t");
for(i=0;chunk_n[i];i++)
printf("%d = %s%s",i,chunk_n[i],i == 4 ? "\n\t" : " ");
printf("\n");
}

View file

@ -169,8 +169,9 @@ slice_wizard(Disk *d)
if (!strcasecmp(*cmds,"write")) {
printf("Write=%d\n",
Fake ? 0 : Write_Disk(d));
q = strdup(d->name);
Free_Disk(d);
d = Open_Disk(d->name);
d = Open_Disk(q);
continue;
}
if (strcasecmp(*cmds,"help"))
@ -192,9 +193,6 @@ slice_wizard(Disk *d)
printf("read [disk]\t\t");
printf("scan\n");
printf("write\t\t");
printf("ENUM:\n\t");
for(i=0;chunk_n[i];i++)
printf("%d = %s%s",i,chunk_n[i],i == 4 ? "\n\t" : " ");
printf("\n");
}