bmap: correct Ctrl-C message
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 8 Nov 2012 13:41:20 +0000 (15:41 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 8 Nov 2012 17:01:22 +0000 (19:01 +0200)
The long synching we warn the user about happens only for block devices
and does not happen for regualr files. So warn only if we are writing to
a block device. Also, correct the warning spelling a bit.

Change-Id: I0b1fc3362da371b150b2ea09a9b07fe83e8b149e
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmap

diff --git a/bmap b/bmap
index a975f7c..c463ab7 100755 (executable)
--- a/bmap
+++ b/bmap
@@ -86,10 +86,11 @@ def flash_command(args, log):
             raise SystemExit(1)
     except KeyboardInterrupt:
         log.error("the program is interrupted")
-        log.warning("do not panic if the program may not finish immediately, " \
-                    "just wait")
-        log.warning("reason: this is the Linux kernel behavior - it " \
-                    "synchronizes the block device")
+        if flasher.target_is_block_device:
+            log.warning("do not panic if the program does not finish " \
+                        "immediately, just wait")
+            log.warning("reason: this is the Linux kernel behavior - it " \
+                        "synchronizes the block device")
         raise SystemExit(1)
 
     flashing_time = time.time() - start_time