Skip to content

Commit 38b021e

Browse files
committed
prevent creation of more drives than drive letters available (cmdline)
1 parent dc042fc commit 38b021e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/fdisk/cmd.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ void Command_Line_Create_Logical_DOS_Drive( void )
141141

142142
if ( Determine_Drive_Letters() >= 'Z' ) {
143143
/* maximum number of Logical DOS Drives installed */
144+
con_puts( "" );
144145
con_print( svarlang_str( 10, 71 ) );
146+
con_puts( "" );
145147
exit( 9 );
146148
}
147149

@@ -210,6 +212,14 @@ void Command_Line_Create_Primary_Partition( void )
210212

211213
Determine_Free_Space();
212214

215+
if ( Determine_Drive_Letters() >= 'Z' ) {
216+
/* maximum number of Logical DOS Drives installed */
217+
con_puts( "" );
218+
con_print( svarlang_str( 10, 71 ) );
219+
con_puts( "" );
220+
exit( 9 );
221+
}
222+
213223
maximum_partition_size_in_MB = Max_Pri_Part_Size_In_MB( PRIMARY );
214224

215225
maximum_possible_percentage = Convert_To_Percentage(

0 commit comments

Comments
 (0)