parted/parted-1.9.0-swap-flag.patch
Joel Andres Granados Moreno 15289757e3 New version.
2009-07-10 13:16:25 +00:00

31 lines
875 B
Diff

From ae78428ae1bc521a11be60b6acdb511a6e7aee21 Mon Sep 17 00:00:00 2001
From: Joel Granados Moreno <jgranado@redhat.com>
Date: Wed, 10 Jun 2009 18:34:46 +0200
Subject: [PATCH] Use the swap flag.
* libparted/labels/dos.c (msdos_partition_set_flag): Set the partition
type if the user sets the swap flag.
---
libparted/labels/dos.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index f219e7d..b4cd23a 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -1413,6 +1413,11 @@ msdos_partition_set_flag (PedPartition* part,
dos_data->prep = state;
return ped_partition_set_system (part, part->fs_type);
+ case PED_PARTITION_SWAP:
+ if (state) {
+ return ped_partition_set_system (part, ped_file_system_type_get("linux-swap"));
+ }
+
default:
return 0;
}
--
1.6.0.6