parted/0072-parted-ui-remove-unneccesary-information-of-command-.patch
Brian C. Lane d75d85cc43 - Updating to upstream patches
- tests/t1701-rescue-fs wait for the device to appear. (bcl)
- Increase timeout for rmmod scsi_debug and make it a framework failure (bcl)
- libparted/dasd: add test cases for the new fdasd functions (dongdwdw)
- libparted/dasd: add an exception for changing DASD-LDL partition table (dongdwdw)
- libpartd/dasd: improve flag processing for DASD-LDL (dongdwdw)
- parted/ui: remove unneccesary information of command line (dongdwdw)
- parted: check the name of partition first when to name a partition (dongdwdw)
- Add support for RAM drives (sparschauer)
- Fix crash when localized (psusi)
- libparted: Fix typo in hfs error message (sebras)
- libparted: Fix MacOS boot support (laurent)
- mac: copy partition type and name correctly (saproj)
- libparted: Add support for atari partition tables (glaubitz)
- libparted:tests: Move get_sector_size() to common.c (glaubitz)
- tests: Update t0220 and t0280 for the swap flag. (bcl)
- libparted: set swap flag on GPT partitions (aschnell)
- libparted/dasd: add test cases for the new fdasd functions (dongdwdw)
- libparted/dasd: add new fdasd functions (dongdwdw)
- libparted/dasd: update and improve fdasd functions (dongdwdw)
- libparted/dasd: unify vtoc handling for cdl/ldl (dongdwdw)
- libparted: Don't warn if no HDIO_GET_IDENTITY ioctl (sparschauer)
- libparted: Fix starting CHS in protective MBR (petr.uzel)
- tests: Stop timing t9040 (#1172675) (bcl)
2017-05-02 09:41:50 -07:00

43 lines
1.6 KiB
Diff

From eb5eb44f6ef009c68cc8867e3277fa832cad7f10 Mon Sep 17 00:00:00 2001
From: Wang Dong <dongdwdw@linux.vnet.ibm.com>
Date: Fri, 24 Mar 2017 03:11:10 +0100
Subject: [PATCH 72/75] parted/ui: remove unneccesary information of command
line
When some command fails, the information still exists in
command_line buffer. When in command mode or interactive mode,
if an interactive exception prompts, the remained information
will be processed as option from user. This will raise some other
information or even unexpected results. So before getting option
input from user, clean the command line buffer.
Example: When the disk label is invalid and user tries to make
new partition on the device with command like,
mkpart 0 50%. Then parted will raise an exception
telling an invalid disk label found and whether to correct it.
But at this time 0 as the input of mkpart will be
considered as the option input for the exception(yes/no).
So one more exception will raised with error information.
Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
---
parted/ui.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/parted/ui.c b/parted/ui.c
index 505b8ac..c603ed2 100644
--- a/parted/ui.c
+++ b/parted/ui.c
@@ -1270,6 +1270,7 @@ command_line_get_ex_opt (const char* prompt, PedExceptionOption options)
PedExceptionOption opt;
char* opt_name;
+ command_line_flush ();
for (opt = option_get_next (options, 0); opt;
opt = option_get_next (options, opt)) {
options_strlist = str_list_append_unique (options_strlist,
--
2.9.3