From deaf2911d90b4dd43a0afe611c0a3dd9d675fd0b Mon Sep 17 00:00:00 2001 From: Bernd Boeckmann Date: Sat, 18 Jan 2025 23:59:19 +0100 Subject: [PATCH] fix inappropriate warning of inaccessible ext. if there is no defined --- appinfo/fdisk.lsm | 2 +- doc/fdisk/CHANGES.md | 8 ++++++++ source/fdisk/cmd.c | 4 ++-- source/fdisk/main.h | 2 +- source/fdisk/ui.c | 4 ++-- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/appinfo/fdisk.lsm b/appinfo/fdisk.lsm index 7890a06..dabfe25 100644 --- a/appinfo/fdisk.lsm +++ b/appinfo/fdisk.lsm @@ -1,6 +1,6 @@ Begin3 Title: Free FDISK -Version: 1.4.1 +Version: 1.4.2 Entered-date: 2025-01-18 Description: Fixed disk partition tool Summary: Fixed disk partition tool to create, delete and view hard disk diff --git a/doc/fdisk/CHANGES.md b/doc/fdisk/CHANGES.md index 29e62aa..32ec97c 100644 --- a/doc/fdisk/CHANGES.md +++ b/doc/fdisk/CHANGES.md @@ -8,6 +8,14 @@ Bug classification: - LOW: Cosmetic bugs, like display issues etc. +Version 1.4.2 (2025-01-18) +--------------------------- +Fixes: + - LOW: When displaying or editing logical partitions, only complain about + an unusable extended partition if there is any defined, not when there + is no extended at all (introduced with 1.4.1). + + Version 1.4.1 (2025-01-18) --------------------------- Fixes: diff --git a/source/fdisk/cmd.c b/source/fdisk/cmd.c index f71c674..1b490cf 100644 --- a/source/fdisk/cmd.c +++ b/source/fdisk/cmd.c @@ -328,7 +328,7 @@ void Command_Line_Delete( void ) 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 ) { + if ( pDrive->ptr_ext_part && !pDrive->ext_usable ) { /* NLS:No usable extended partition found. */ con_print( svarlang_str( 8, 7 ) ); exit( 9 ); @@ -350,7 +350,7 @@ 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 ) { + if ( pDrive->ptr_ext_part && !pDrive->ext_usable ) { /* NLS:No usable extended partition found. */ con_print( svarlang_str( 8, 7 ) ); exit( 9 ); diff --git a/source/fdisk/main.h b/source/fdisk/main.h index f0bfed7..0ff98b2 100644 --- a/source/fdisk/main.h +++ b/source/fdisk/main.h @@ -4,7 +4,7 @@ #define FD_NAME "Free FDISK" #endif -#define VERSION "1.4.1" +#define VERSION "1.4.2" #define COPYLEFT "1998 - 2025" #define SIZE_OF_IPL ( 512 - 4 * 16 - 2 - 6 ) diff --git a/source/fdisk/ui.c b/source/fdisk/ui.c index 7a3c439..a4a5acc 100644 --- a/source/fdisk/ui.c +++ b/source/fdisk/ui.c @@ -300,7 +300,7 @@ void Interactive_User_Interface( void ) } if ( menu == CLDD ) { - if ( !pDrive->ext_usable ) { + if ( pDrive->ptr_ext_part && !pDrive->ext_usable ) { Warn_Incompatible_Ext(); } else if ( pDrive->ptr_ext_part == NULL ) { @@ -363,7 +363,7 @@ void Interactive_User_Interface( void ) } if ( menu == DLDD ) { - if ( !pDrive->ext_usable ) { + if ( pDrive->ptr_ext_part && !pDrive->ext_usable ) { Warn_Incompatible_Ext(); } else if ( ( pDrive->num_of_log_drives == 0 ) ||