[parted-devel] [PATCH v2 4/8] libparted: Fix to report success when setting lvm flag on bsd table

Mike Fleetwood mike.fleetwood at googlemail.com
Sat Oct 1 15:40:19 UTC 2016


bsd_partition_set_flag() was falling through in the lvm flag case and
returning failure.  Fix this by adding missing return 1 (success) like
for the other flags.

Found as a result of this bug reported by Timo Riikonen:
https://bugzilla.gnome.org/show_bug.cgi?id=769831
---
 libparted/labels/bsd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c
index a8525a4..23daea8 100644
--- a/libparted/labels/bsd.c
+++ b/libparted/labels/bsd.c
@@ -488,6 +488,7 @@ bsd_partition_set_flag (PedPartition* part, PedPartitionFlag flag, int state)
 				bsd_data->raid = 0;
 			}
 			bsd_data->lvm = state;
+			return 1;
 		default:
 			;
 	}
-- 
1.7.1




More information about the parted-devel mailing list