[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Sun Jul 27 10:31:32 UTC 2008


 libparted/labels/bsd.c  |    3 ++-
 libparted/labels/dasd.c |    8 +++++---
 libparted/labels/gpt.c  |    5 ++---
 libparted/labels/loop.c |    3 ++-
 libparted/labels/mac.c  |    6 ++++--
 libparted/labels/pc98.c |    5 +++--
 libparted/labels/rdb.c  |    5 +++--
 libparted/labels/sun.c  |    5 +++--
 8 files changed, 24 insertions(+), 16 deletions(-)

New commits:
commit e1e7be655deded3e2d94d8c737249b6c414e303a
Author: Jim Meyering <meyering at redhat.com>
Date:   Sat Jul 26 21:22:10 2008 +0200

    don't call ped_partition_new with "0" as 2nd arg
    
    Instead, use an explicit and equivalent PED_PARTITION_NORMAL.
    * libparted/labels/bsd.c (bsd_read):
    * libparted/labels/dasd.c (dasd_read):
    * libparted/labels/gpt.c (_parse_part_entry):
    * libparted/labels/loop.c (loop_read):
    * libparted/labels/mac.c (_disk_add_part_map_entry)
    (_rawpart_analyse):
    * libparted/labels/pc98.c (read_table):
    * libparted/labels/rdb.c (amiga_read):
    * libparted/labels/sun.c (sun_read):

diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c
index e99a06c..3eb5363 100644
--- a/libparted/labels/bsd.c
+++ b/libparted/labels/bsd.c
@@ -293,7 +293,8 @@ bsd_read (PedDisk* disk)
 		start = PED_LE32_TO_CPU(label->d_partitions[i - 1].p_offset);
 		end = PED_LE32_TO_CPU(label->d_partitions[i - 1].p_offset)
 		      + PED_LE32_TO_CPU(label->d_partitions[i - 1].p_size) - 1;
-		part = ped_partition_new (disk, 0, NULL, start, end);
+		part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+                                          NULL, start, end);
 		if (!part)
 			goto error;
 		bsd_part_data = part->disk_specific;
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index f1cc01f..9edab40 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/labels/dasd.c
@@ -1,7 +1,7 @@
 /* -*- Mode: c; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
 
     libparted - a library for manipulating disk partitions
-    Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+    Copyright (C) 2000, 2001, 2007-2008 Free Software Foundation, Inc.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -361,7 +361,8 @@ dasd_read (PedDisk* disk)
 				* (long long) disk->dev->hw_geom.sectors
 				* (long long) disk_specific->real_sector_size
 				/ (long long) disk->dev->sector_size - 1;
-		part = ped_partition_new(disk, 0, NULL, start, end);
+		part = ped_partition_new(disk, PED_PARTITION_NORMAL, NULL,
+                                         start, end);
         PDEBUG;
 
 		if (!part)
@@ -423,7 +424,8 @@ dasd_read (PedDisk* disk)
 					* (long long) disk->dev->hw_geom.sectors
 					* (long long) disk_specific->real_sector_size
 					/ (long long) disk->dev->sector_size - 1;
-			part = ped_partition_new (disk, 0, NULL, start, end);
+			part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+                                                  NULL, start, end);
 
 			if (!part)
 				goto error_close_dev;
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index 01046a3..13d2e88 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -4,8 +4,7 @@
     original version by Matt Domsch <Matt_Domsch at dell.com>
     Disclaimed into the Public Domain
 
-    Portions Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008
-        Free Software Foundation, Inc.
+    Portions Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc.
 
     EFI GUID Partition Table handling
     Per Intel EFI Specification v1.02
@@ -743,7 +742,7 @@ _parse_part_entry (PedDisk* disk, GuidPartitionEntry_t* pte)
 	GPTPartitionData* gpt_part_data;
 	unsigned int i;
 
-	part = ped_partition_new (disk, 0, NULL,
+	part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL,
 			PED_LE64_TO_CPU(pte->StartingLBA),
 			PED_LE64_TO_CPU(pte->EndingLBA));
 	if (!part)
diff --git a/libparted/labels/loop.c b/libparted/labels/loop.c
index 5ae1b9b..a6a2057 100644
--- a/libparted/labels/loop.c
+++ b/libparted/labels/loop.c
@@ -144,7 +144,8 @@ loop_read (PedDisk* disk)
 	if (!fs_type)
 		goto error_free_geom;
 
-	part = ped_partition_new (disk, 0, fs_type, geom->start, geom->end);
+	part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+                                  fs_type, geom->start, geom->end);
 	ped_geometry_destroy (geom);
 	if (!part)
 		goto error;
diff --git a/libparted/labels/mac.c b/libparted/labels/mac.c
index 3b01db3..3ec8390 100644
--- a/libparted/labels/mac.c
+++ b/libparted/labels/mac.c
@@ -234,7 +234,8 @@ _disk_add_part_map_entry (PedDisk* disk, int warn)
 	if (part_map_size == 0)
 		part_map_size = 64;
 
-	new_part = ped_partition_new (disk, 0, NULL, 1, part_map_size - 1);
+	new_part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL,
+                                      1, part_map_size - 1);
 	if (!new_part)
 		goto error;
 
@@ -553,7 +554,8 @@ _rawpart_analyse (MacRawPartition* raw_part, PedDisk* disk, int num)
 #endif
 		return NULL;
 	}
-	part = ped_partition_new (disk, 0, NULL, start, start + length - 1);
+	part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL,
+                                  start, start + length - 1);
 	if (!part)
 		goto error;
 
diff --git a/libparted/labels/pc98.c b/libparted/labels/pc98.c
index 5185cd3..a7b7e57 100644
--- a/libparted/labels/pc98.c
+++ b/libparted/labels/pc98.c
@@ -1,6 +1,6 @@
 /*
     libparted - a library for manipulating disk partitions
-    Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+    Copyright (C) 2000, 2001, 2007-2008 Free Software Foundation, Inc.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -370,7 +370,8 @@ read_table (PedDisk* disk)
 		part_start = legacy_start (disk, raw_part);
 		part_end   = legacy_end (disk, raw_part);
 
-		part = ped_partition_new (disk, 0, NULL, part_start, part_end);
+		part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+                                          NULL, part_start, part_end);
 		if (!part)
 			goto error;
 		pc98_data = part->disk_specific;
diff --git a/libparted/labels/rdb.c b/libparted/labels/rdb.c
index 42e7d71..386b2bd 100644
--- a/libparted/labels/rdb.c
+++ b/libparted/labels/rdb.c
@@ -2,7 +2,7 @@
 
     libparted - a library for manipulating disk partitions
     disk_amiga.c - libparted module to manipulate amiga RDB partition tables.
-    Copyright (C) 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
+    Copyright (C) 2000, 2001, 2004, 2007-2008 Free Software Foundation, Inc.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -547,7 +547,8 @@ amiga_read (PedDisk* disk)
 			+ 1) * cylblocks - 1;
 
 		/* We can now construct a new partition */
-		if (!(part = ped_partition_new (disk, 0, NULL, start, end))) {
+		if (!(part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+                                                NULL, start, end))) {
 			free(partition);
 			return 0;
 		}
diff --git a/libparted/labels/sun.c b/libparted/labels/sun.c
index 373b603..6f1900b 100644
--- a/libparted/labels/sun.c
+++ b/libparted/labels/sun.c
@@ -1,7 +1,7 @@
 /* -*- Mode: c; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
 
     libparted - a library for manipulating disk partitions
-    Copyright (C) 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
+    Copyright (C) 2000, 2001, 2005, 2007-2008 Free Software Foundation, Inc.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -337,7 +337,8 @@ sun_read (PedDisk* disk)
 		end = start
 		      + PED_BE32_TO_CPU(label->partitions[i].num_sectors) - 1;
 
-		part = ped_partition_new (disk, 0, NULL, start, end);
+		part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL,
+                                          start, end);
 		if (!part)
 			goto error;
 



More information about the Parted-commits mailing list