bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] libparted: fail (don't just warn) upon failure to inform kernel


From: Jim Meyering
Subject: [PATCH] libparted: fail (don't just warn) upon failure to inform kernel of...
Date: Mon, 10 May 2010 13:11:22 +0200

FYI,

Thanks, Hans.

>From 2e842e056c618f5a71e1fa8cf135f2ad0248f069 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 10 May 2010 13:00:20 +0200
Subject: [PATCH] libparted: fail (don't just warn) upon failure to inform 
kernel of...

partition change(s).
* libparted/arch/linux.c (_disk_sync_part_table): Throw an error, not
merely a warning.  When this fails, it indicates that the kernel has
not been informed, and that must translate to an error, since doing
otherwise would violate the contract of ped_disk_commit_to_os.
Suggested by Hans De Goede.
---
 libparted/arch/linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 73a8e6f..38f4e31 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2550,7 +2550,7 @@ _disk_sync_part_table (PedDisk* disk)
        else {
                 bad_part_list[strlen (bad_part_list) - 2] = 0;
                 if (ped_exception_throw (
-                        PED_EXCEPTION_WARNING,
+                        PED_EXCEPTION_ERROR,
                         PED_EXCEPTION_IGNORE_CANCEL,
                         _("Partition(s) %s on %s have been written, but we 
have "
                          "been unable to inform the kernel of the change, "
--
1.7.1.189.g07419




reply via email to

[Prev in Thread] Current Thread [Next in Thread]