Skip to content

Commit

Permalink
inform user about inaccessible ext on cmdline operations for log drv
Browse files Browse the repository at this point in the history
  • Loading branch information
boeckmann committed Jan 18, 2025
1 parent ccee882 commit 3562464
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/fdisk/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,12 @@ void Command_Line_Delete( void )
else if ( 0 == strcmp( arg[1].choice, "LOG" ) ) {
if ( ( arg[1].value >= 1 ) && ( arg[1].value <= MAX_LOGICAL_DRIVES ) &&
( ( part_num = Nth_Log_Part_Defined( pDrive, arg[1].value - 1 ) ) < MAX_LOGICAL_DRIVES ) ) {

if ( !pDrive->ext_usable ) {
/* NLS:No usable extended partition found. */
con_print( svarlang_str( 8, 7 ) );
exit( 9 );
}
error_code = Delete_Logical_Drive( part_num );
}
else {
Expand All @@ -343,6 +349,12 @@ void Command_Line_Delete( void )
}
else if ( ( arg[1].value >= 5 ) && ( arg[1].value <= 28 ) &&
( ( part_num = Nth_Log_Part_Defined( pDrive, arg[1].value - 5 ) ) < MAX_LOGICAL_DRIVES ) ) {

if ( !pDrive->ext_usable ) {
/* NLS:No usable extended partition found. */
con_print( svarlang_str( 8, 7 ) );
exit( 9 );
}
error_code = Delete_Logical_Drive( (int)( part_num ) );
}
else {
Expand Down

0 comments on commit 3562464

Please sign in to comment.