1
From 7ef73999b35294a8fd30f5af4eb6221a0ce62802 Mon Sep 17 00:00:00 2001
2
From: Phillip Susi <psusi@ubuntu.com>
3
Date: Wed, 30 Nov 2011 13:13:58 -0500
4
Subject: [PATCH 4/6] parted: make _partition_warn_busy actually a warning
7
This function was throwing a PED_EXCEPTION_ERROR with only the
8
PED_EXCEPTION_CANCEL option. Converted to a PED_EXCEPTION_WARNING
9
with the option to continue anyhow.
11
parted/parted.c | 19 +++++++++++--------
12
tests/t1101-busy-partition.sh | 2 +-
13
tests/t9041-undetected-in-use-16th-partition.sh | 4 ++--
14
3 files changed, 14 insertions(+), 11 deletions(-)
16
Index: b/parted/parted.c
17
===================================================================
22
if (ped_partition_is_busy (part)) {
23
path = ped_partition_get_path (part);
24
- ped_exception_throw (
25
- PED_EXCEPTION_ERROR,
26
- PED_EXCEPTION_CANCEL,
27
- _("Partition %s is being used. You must unmount it "
28
- "before you modify it with Parted."),
32
+ if (ped_exception_throw (
33
+ PED_EXCEPTION_WARNING,
34
+ PED_EXCEPTION_YES_NO,
35
+ _("Partition %s is being used. Are you sure you " \
36
+ "want to continue?"),
37
+ path) != PED_EXCEPTION_YES)