mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
8a52a7d509
commit
1709a4fd6a
2 changed files with 4 additions and 8 deletions
|
|
@ -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");
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue