Skip to contentSkip to conversation

cfi_flash: flinfo: allow user interrupt in flash print info fn

PATCH New Kim Phillips 3 participants 3 messages Jul 26, 2010 – Aug 12, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfi_flash: flinfo: allow user interrupt in flash print info fn

flashes getting larger, users more impatient.

---
 drivers/mtd/cfi_flash.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/cfi_flash.c +2 -0
index 3267c5d..38d0ca5 100644
@@ -1159,6 +1159,8 @@ void flash_print_info (flash_info_t * info)
 
 	puts ("\n  Sector Start Addresses:");
 	for (i = 0; i < info->sector_count; ++i) {
+		if (ctrlc())
+			return;
 		if ((i % 5) == 0)
 			printf ("\n");
 #ifdef CONFIG_SYS_FLASH_EMPTY_INFO
Signature · 1 line
1.7.1.1
#1 lore raw

PATCH 1/1 cfi_flash: flinfo: allow user interrupt in flash print info fn

Quoted 1 line · On Tuesday 27 July 2010 01:35:39 Kim Phillips wrote:

flashes getting larger, users more impatient.

Applied to u-boot-cfi-flash/master. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#2 lore raw

PATCH 1/1 cfi_flash: flinfo: allow user interrupt in flash print info fn

In reply to Kim Phillips

Dear Kim Phillips,

Quoted 12 lines · In message <[email protected]> you wrote:

flashes getting larger, users more impatient.

---
 drivers/mtd/cfi_flash.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/cfi_flash.c +0 -0
index 3267c5d..38d0ca5 100644

drivers/mtd/cfi_flash.c void flash_print_info (flash_info_t * info) · line 1166

Quoted 8 lines
drivers/mtd/cfi_flash.c +2 -0
@@ -1159,6 +1159,8 @@ void flash_print_info (flash_info_t * info)
 
 	puts ("\n  Sector Start Addresses:");
 	for (i = 0; i < info->sector_count; ++i) {
+		if (ctrlc())
+			return;
 		if ((i % 5) == 0)
 			printf ("\n");
 #ifdef CONFIG_SYS_FLASH_EMPTY_INFO

NAK. This code (and the existing "if ((i % 5) == 0) printf ("\n");" as well) is incorrectly placed, i. e. before variable declarations.

Please fix.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
HEALTH WARNING: Care Should Be Taken When Lifting This Product, Since
Its Mass, and Thus Its Weight, Is Dependent on Its Velocity  Relative
to the User.