OSDN Git Service

don't call ped_partition_new with "0" as 2nd arg
authorJim Meyering <meyering@redhat.com>
Sat, 26 Jul 2008 19:22:10 +0000 (21:22 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 27 Jul 2008 09:57:22 +0000 (11:57 +0200)
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):

libparted/labels/bsd.c
libparted/labels/dasd.c
libparted/labels/gpt.c
libparted/labels/loop.c
libparted/labels/mac.c
libparted/labels/pc98.c
libparted/labels/rdb.c
libparted/labels/sun.c

index e99a06c..3eb5363 100644 (file)
@@ -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;
index f1cc01f..9edab40 100644 (file)
@@ -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;
index 01046a3..13d2e88 100644 (file)
@@ -4,8 +4,7 @@
     original version by Matt Domsch <Matt_Domsch@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)
index 5ae1b9b..a6a2057 100644 (file)
@@ -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;
index 3b01db3..3ec8390 100644 (file)
@@ -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;
 
index 5185cd3..a7b7e57 100644 (file)
@@ -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;
index 42e7d71..386b2bd 100644 (file)
@@ -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;
                }
index 373b603..6f1900b 100644 (file)
@@ -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;