Fix regression introduced in commit d4c1e0ec98
This commit is contained in:
parent
1471f47a5c
commit
34c5f93357
2 changed files with 10 additions and 9 deletions
11
src/adv.c
11
src/adv.c
|
@ -40,6 +40,7 @@
|
|||
#include "intrf.h"
|
||||
#include "intrfn.h"
|
||||
#include "fnctdsk.h"
|
||||
#include "chgtype.h"
|
||||
#include "chgtypen.h"
|
||||
#include "dirpart.h"
|
||||
#include "fat.h"
|
||||
|
@ -200,10 +201,7 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
|
|||
log_info("\nInterface Advanced\n");
|
||||
list_part=disk_car->arch->read_part(disk_car,verbose,0);
|
||||
current_element=list_part;
|
||||
for(element=list_part;element!=NULL;element=element->next)
|
||||
{
|
||||
log_partition(disk_car,element->part);
|
||||
}
|
||||
log_all_partitions(disk_car, list_part);
|
||||
while(1)
|
||||
{
|
||||
const char *options;
|
||||
|
@ -575,7 +573,10 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
|
|||
break;
|
||||
case 't':
|
||||
case 'T':
|
||||
change_part_type_ncurses(disk_car, current_element->part);
|
||||
if(*current_cmd!=NULL)
|
||||
change_part_type_cli(disk_car, current_element->part, current_cmd);
|
||||
else
|
||||
change_part_type_ncurses(disk_car, current_element->part);
|
||||
rewrite=1;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -65,10 +65,6 @@ int change_arch_type_cli(disk_t *disk, const int verbose, char**current_cmd)
|
|||
{
|
||||
(*current_cmd)+=strlen(arch_list[i]->part_name_option);
|
||||
disk->arch=arch_list[i];
|
||||
autoset_unit(disk);
|
||||
hd_update_geometry(disk, verbose);
|
||||
log_info("%s\n",disk->description_short(disk));
|
||||
log_info("Partition table type: %s\n", disk->arch->part_name);
|
||||
keep_asking=1;
|
||||
}
|
||||
if(strncmp(*current_cmd, "ask_type", 8)==0)
|
||||
|
@ -77,5 +73,9 @@ int change_arch_type_cli(disk_t *disk, const int verbose, char**current_cmd)
|
|||
return 1;
|
||||
}
|
||||
} while(keep_asking>0);
|
||||
autoset_unit(disk);
|
||||
hd_update_geometry(disk, verbose);
|
||||
log_info("%s\n",disk->description_short(disk));
|
||||
log_info("Partition table type: %s\n", disk->arch->part_name);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue