| constraint.h | | constraint.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. | | Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| #ifndef PED_CONSTRAINT_H_INCLUDED | | #ifndef PED_CONSTRAINT_H_INCLUDED | |
| #define PED_CONSTRAINT_H_INCLUDED | | #define PED_CONSTRAINT_H_INCLUDED | |
| | | | |
| typedef struct _PedConstraint PedConstraint; | | typedef struct _PedConstraint PedConstraint; | |
| | | | |
| #include <parted/device.h> | | #include <parted/device.h> | |
|
| | | #include <parted/geom.h> | |
| #include <parted/natmath.h> | | #include <parted/natmath.h> | |
| | | | |
| struct _PedConstraint { | | struct _PedConstraint { | |
| PedAlignment* start_align; | | PedAlignment* start_align; | |
| PedAlignment* end_align; | | PedAlignment* end_align; | |
| PedGeometry* start_range; | | PedGeometry* start_range; | |
| PedGeometry* end_range; | | PedGeometry* end_range; | |
| PedSector min_size; | | PedSector min_size; | |
| PedSector max_size; | | PedSector max_size; | |
| }; | | }; | |
| | | | |
End of changes. 4 change blocks. |
| 5 lines changed or deleted | | 4 lines changed or added | |
|
| debug.h | | debug.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. | | Copyright (C) 1998, 1999, 2000, 2002, 2007 Free Software Foundation, In
c. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| #ifndef PED_DEBUG_H_INCLUDED | | #ifndef PED_DEBUG_H_INCLUDED | |
| #define PED_DEBUG_H_INCLUDED | | #define PED_DEBUG_H_INCLUDED | |
| | | | |
|
| #include "config.h" | | | |
| | | | |
| #include <stdarg.h> | | #include <stdarg.h> | |
| | | | |
| #ifdef DEBUG | | #ifdef DEBUG | |
| | | | |
| typedef void (PedDebugHandler) ( const int level, const char* file, int lin
e, | | typedef void (PedDebugHandler) ( const int level, const char* file, int lin
e, | |
| const char* function, const char* msg ); | | const char* function, const char* msg ); | |
| | | | |
| extern void ped_debug_set_handler (PedDebugHandler* handler); | | extern void ped_debug_set_handler (PedDebugHandler* handler); | |
| extern void ped_debug ( const int level, const char* file, int line, | | extern void ped_debug ( const int level, const char* file, int line, | |
| const char* function, const char* msg, ... ); | | const char* function, const char* msg, ... ); | |
| | | | |
End of changes. 4 change blocks. |
| 7 lines changed or deleted | | 3 lines changed or added | |
|
| device.h | | device.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 1998 - 2001, 2005 Free Software Foundation, Inc. | | Copyright (C) 1998 - 2001, 2005, 2007-2008 Free Software Foundation, In
c. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedDevice | | * \addtogroup PedDevice | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** \file device.h */ | | /** \file device.h */ | |
| | | | |
| #ifndef PED_DEVICE_H_INCLUDED | | #ifndef PED_DEVICE_H_INCLUDED | |
| #define PED_DEVICE_H_INCLUDED | | #define PED_DEVICE_H_INCLUDED | |
| | | | |
|
| #include <parted/timer.h> | | | |
| | | | |
| /** We can address 2^63 sectors */ | | /** We can address 2^63 sectors */ | |
| typedef long long PedSector; | | typedef long long PedSector; | |
| | | | |
| /** \deprecated Removal from API planned */ | | /** \deprecated Removal from API planned */ | |
| typedef enum { | | typedef enum { | |
| PED_DEVICE_UNKNOWN = 0, | | PED_DEVICE_UNKNOWN = 0, | |
| PED_DEVICE_SCSI = 1, | | PED_DEVICE_SCSI = 1, | |
| PED_DEVICE_IDE = 2, | | PED_DEVICE_IDE = 2, | |
| PED_DEVICE_DAC960 = 3, | | PED_DEVICE_DAC960 = 3, | |
| PED_DEVICE_CPQARRAY = 4, | | PED_DEVICE_CPQARRAY = 4, | |
| PED_DEVICE_FILE = 5, | | PED_DEVICE_FILE = 5, | |
| PED_DEVICE_ATARAID = 6, | | PED_DEVICE_ATARAID = 6, | |
| PED_DEVICE_I2O = 7, | | PED_DEVICE_I2O = 7, | |
| PED_DEVICE_UBD = 8, | | PED_DEVICE_UBD = 8, | |
| PED_DEVICE_DASD = 9, | | PED_DEVICE_DASD = 9, | |
| PED_DEVICE_VIODASD = 10, | | PED_DEVICE_VIODASD = 10, | |
|
| PED_DEVICE_SX8 = 11 | | PED_DEVICE_SX8 = 11, | |
| #ifdef ENABLE_DEVICE_MAPPER | | PED_DEVICE_DM = 12, | |
| , | | PED_DEVICE_XVD = 13, | |
| PED_DEVICE_DM = 12 | | PED_DEVICE_SDMMC = 14, | |
| #endif | | PED_DEVICE_VIRTBLK = 15 | |
| } PedDeviceType; | | } PedDeviceType; | |
| | | | |
| typedef struct _PedDevice PedDevice; | | typedef struct _PedDevice PedDevice; | |
| typedef struct _PedDeviceArchOps PedDeviceArchOps; | | typedef struct _PedDeviceArchOps PedDeviceArchOps; | |
| typedef struct _PedCHSGeometry PedCHSGeometry; | | typedef struct _PedCHSGeometry PedCHSGeometry; | |
| | | | |
| /** | | /** | |
| * A cylinder-head-sector "old-style" geometry. | | * A cylinder-head-sector "old-style" geometry. | |
| * | | * | |
| * A device addressed in this way has C*H*S sectors. | | * A device addressed in this way has C*H*S sectors. | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 117 | |
| PedSector start, PedSector count); | | PedSector start, PedSector count); | |
| int (*write) (PedDevice* dev, const void* buffer, | | int (*write) (PedDevice* dev, const void* buffer, | |
| PedSector start, PedSector count); | | PedSector start, PedSector count); | |
| int (*sync) (PedDevice* dev); | | int (*sync) (PedDevice* dev); | |
| int (*sync_fast) (PedDevice* dev); | | int (*sync_fast) (PedDevice* dev); | |
| PedSector (*check) (PedDevice* dev, void* buffer, | | PedSector (*check) (PedDevice* dev, void* buffer, | |
| PedSector start, PedSector count); | | PedSector start, PedSector count); | |
| void (*probe_all) (); | | void (*probe_all) (); | |
| }; | | }; | |
| | | | |
|
| | | #include <parted/constraint.h> | |
| | | #include <parted/timer.h> | |
| | | | |
| extern void ped_device_probe_all (); | | extern void ped_device_probe_all (); | |
| extern void ped_device_free_all (); | | extern void ped_device_free_all (); | |
| | | | |
| extern PedDevice* ped_device_get (const char* name); | | extern PedDevice* ped_device_get (const char* name); | |
| extern PedDevice* ped_device_get_next (const PedDevice* dev); | | extern PedDevice* ped_device_get_next (const PedDevice* dev); | |
| extern int ped_device_is_busy (PedDevice* dev); | | extern int ped_device_is_busy (PedDevice* dev); | |
| extern int ped_device_open (PedDevice* dev); | | extern int ped_device_open (PedDevice* dev); | |
| extern int ped_device_close (PedDevice* dev); | | extern int ped_device_close (PedDevice* dev); | |
| extern void ped_device_destroy (PedDevice* dev); | | extern void ped_device_destroy (PedDevice* dev); | |
| extern void ped_device_cache_remove (PedDevice* dev); | | extern void ped_device_cache_remove (PedDevice* dev); | |
| | | | |
End of changes. 6 change blocks. |
| 12 lines changed or deleted | | 11 lines changed or added | |
|
| disk.h | | disk.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | | Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundati
on, Inc. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedDisk | | * \addtogroup PedDisk | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** \file disk.h */ | | /** \file disk.h */ | |
| | | | |
| #ifndef PED_DISK_H_INCLUDED | | #ifndef PED_DISK_H_INCLUDED | |
| #define PED_DISK_H_INCLUDED | | #define PED_DISK_H_INCLUDED | |
| | | | |
|
| typedef struct _PedDisk PedDisk; | | | |
| typedef struct _PedPartition PedPartition; | | | |
| typedef const struct _PedDiskOps PedDiskOps; | | | |
| typedef struct _PedDiskType PedDiskType; | | | |
| typedef const struct _PedDiskArchOps PedDiskArchOps; | | | |
| | | | |
| #include <parted/device.h> | | | |
| #include <parted/filesys.h> | | | |
| #include <parted/natmath.h> | | | |
| #include <parted/geom.h> | | | |
| | | | |
| /** | | /** | |
| * Partition types | | * Partition types | |
| */ | | */ | |
|
| typedef enum { | | enum _PedPartitionType { | |
| PED_PARTITION_NORMAL = 0x00, | | PED_PARTITION_NORMAL = 0x00, | |
| PED_PARTITION_LOGICAL = 0x01, | | PED_PARTITION_LOGICAL = 0x01, | |
| PED_PARTITION_EXTENDED = 0x02, | | PED_PARTITION_EXTENDED = 0x02, | |
| PED_PARTITION_FREESPACE = 0x04, | | PED_PARTITION_FREESPACE = 0x04, | |
| PED_PARTITION_METADATA = 0x08, | | PED_PARTITION_METADATA = 0x08, | |
| PED_PARTITION_PROTECTED = 0x10 | | PED_PARTITION_PROTECTED = 0x10 | |
|
| } PedPartitionType; | | }; | |
| | | | |
| /** | | /** | |
| * Partition flags. | | * Partition flags. | |
| */ | | */ | |
|
| typedef enum { | | enum _PedPartitionFlag { | |
| PED_PARTITION_BOOT=1, | | PED_PARTITION_BOOT=1, | |
| PED_PARTITION_ROOT=2, | | PED_PARTITION_ROOT=2, | |
| PED_PARTITION_SWAP=3, | | PED_PARTITION_SWAP=3, | |
| PED_PARTITION_HIDDEN=4, | | PED_PARTITION_HIDDEN=4, | |
| PED_PARTITION_RAID=5, | | PED_PARTITION_RAID=5, | |
| PED_PARTITION_LVM=6, | | PED_PARTITION_LVM=6, | |
| PED_PARTITION_LBA=7, | | PED_PARTITION_LBA=7, | |
| PED_PARTITION_HPSERVICE=8, | | PED_PARTITION_HPSERVICE=8, | |
| PED_PARTITION_PALO=9, | | PED_PARTITION_PALO=9, | |
| PED_PARTITION_PREP=10, | | PED_PARTITION_PREP=10, | |
|
| PED_PARTITION_MSFT_RESERVED=11 | | PED_PARTITION_MSFT_RESERVED=11, | |
| } PedPartitionFlag; | | PED_PARTITION_BIOS_GRUB=12 | |
| | | }; | |
| #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT | | #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT | |
|
| #define PED_PARTITION_LAST_FLAG PED_PARTITION_MSFT_RESERVED | | #define PED_PARTITION_LAST_FLAG PED_PARTITION_BIOS_GRUB | |
| | | | |
|
| typedef enum { | | enum _PedDiskTypeFeature { | |
| PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions *
/ | | PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions *
/ | |
| PED_DISK_TYPE_PARTITION_NAME=2 /**< supports partition names */ | | PED_DISK_TYPE_PARTITION_NAME=2 /**< supports partition names */ | |
|
| } PedDiskTypeFeature; | | }; | |
| #define PED_DISK_TYPE_FIRST_FEATURE PED_DISK_TYPE_EXTENDED | | #define PED_DISK_TYPE_FIRST_FEATURE PED_DISK_TYPE_EXTENDED | |
| #define PED_DISK_TYPE_LAST_FEATURE PED_DISK_TYPE_PARTITION_NAME | | #define PED_DISK_TYPE_LAST_FEATURE PED_DISK_TYPE_PARTITION_NAME | |
| | | | |
|
| | | struct _PedDisk; | |
| | | struct _PedPartition; | |
| | | struct _PedDiskOps; | |
| | | struct _PedDiskType; | |
| | | struct _PedDiskArchOps; | |
| | | | |
| | | typedef enum _PedPartitionType PedPartitionType; | |
| | | typedef enum _PedPartitionFlag PedPartitionFlag; | |
| | | typedef enum _PedDiskTypeFeature PedDiskTypeFeature; | |
| | | typedef struct _PedDisk PedDisk; | |
| | | typedef struct _PedPartition PedPartition; | |
| | | typedef const struct _PedDiskOps PedDiskOps; | |
| | | typedef struct _PedDiskType PedDiskType; | |
| | | typedef const struct _PedDiskArchOps PedDiskArchOps; | |
| | | | |
| | | #include <parted/device.h> | |
| | | #include <parted/filesys.h> | |
| | | #include <parted/natmath.h> | |
| | | #include <parted/geom.h> | |
| | | #include <stdbool.h> | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedPartition | | * \addtogroup PedPartition | |
| * | | * | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** \file disk.h */ | | /** \file disk.h */ | |
| | | | |
| | | | |
| skipping to change at line 171 | | skipping to change at line 181 | |
| }; | | }; | |
| | | | |
| struct _PedDiskOps { | | struct _PedDiskOps { | |
| /* disk label operations */ | | /* disk label operations */ | |
| int (*probe) (const PedDevice *dev); | | int (*probe) (const PedDevice *dev); | |
| int (*clobber) (PedDevice* dev); | | int (*clobber) (PedDevice* dev); | |
| PedDisk* (*alloc) (const PedDevice* dev); | | PedDisk* (*alloc) (const PedDevice* dev); | |
| PedDisk* (*duplicate) (const PedDisk* disk); | | PedDisk* (*duplicate) (const PedDisk* disk); | |
| void (*free) (PedDisk* disk); | | void (*free) (PedDisk* disk); | |
| int (*read) (PedDisk* disk); | | int (*read) (PedDisk* disk); | |
|
| int (*write) (PedDisk* disk); | | int (*write) (const PedDisk* disk); | |
| /** \todo add label guessing op here */ | | /** \todo add label guessing op here */ | |
| | | | |
| /* partition operations */ | | /* partition operations */ | |
| PedPartition* (*partition_new) ( | | PedPartition* (*partition_new) ( | |
| const PedDisk* disk, | | const PedDisk* disk, | |
| PedPartitionType part_type, | | PedPartitionType part_type, | |
| const PedFileSystemType* fs_type, | | const PedFileSystemType* fs_type, | |
| PedSector start, | | PedSector start, | |
| PedSector end); | | PedSector end); | |
| PedPartition* (*partition_duplicate) (const PedPartition* part); | | PedPartition* (*partition_duplicate) (const PedPartition* part); | |
| | | | |
| skipping to change at line 204 | | skipping to change at line 214 | |
| PedPartitionFlag flag); | | PedPartitionFlag flag); | |
| void (*partition_set_name) (PedPartition* part, const char* name); | | void (*partition_set_name) (PedPartition* part, const char* name); | |
| const char* (*partition_get_name) (const PedPartition* part); | | const char* (*partition_get_name) (const PedPartition* part); | |
| int (*partition_align) (PedPartition* part, | | int (*partition_align) (PedPartition* part, | |
| const PedConstraint* constraint); | | const PedConstraint* constraint); | |
| int (*partition_enumerate) (PedPartition* part); | | int (*partition_enumerate) (PedPartition* part); | |
| | | | |
| /* other */ | | /* other */ | |
| int (*alloc_metadata) (PedDisk* disk); | | int (*alloc_metadata) (PedDisk* disk); | |
| int (*get_max_primary_partition_count) (const PedDisk* disk); | | int (*get_max_primary_partition_count) (const PedDisk* disk); | |
|
| | | bool (*get_max_supported_partition_count) (const PedDisk* disk, | |
| | | int* supported); | |
| }; | | }; | |
| | | | |
| struct _PedDiskType { | | struct _PedDiskType { | |
| PedDiskType* next; | | PedDiskType* next; | |
| const char* name; /**< the name of the partition table
type. | | const char* name; /**< the name of the partition table
type. | |
| \todo not very intuitive name */ | | \todo not very intuitive name */ | |
| PedDiskOps* const ops; | | PedDiskOps* const ops; | |
| | | | |
| PedDiskTypeFeature features; /**< bitmap of supported featur
es */ | | PedDiskTypeFeature features; /**< bitmap of supported featur
es */ | |
| }; | | }; | |
| | | | |
| skipping to change at line 225 | | skipping to change at line 237 | |
| /** | | /** | |
| * Architecture-specific operations. i.e. communication with kernel (or | | * Architecture-specific operations. i.e. communication with kernel (or | |
| * whatever) about changes, etc. | | * whatever) about changes, etc. | |
| */ | | */ | |
| struct _PedDiskArchOps { | | struct _PedDiskArchOps { | |
| char* (*partition_get_path) (const PedPartition* part); | | char* (*partition_get_path) (const PedPartition* part); | |
| int (*partition_is_busy) (const PedPartition* part); | | int (*partition_is_busy) (const PedPartition* part); | |
| int (*disk_commit) (PedDisk* disk); | | int (*disk_commit) (PedDisk* disk); | |
| }; | | }; | |
| | | | |
|
| extern void ped_register_disk_type (PedDiskType* type); | | extern void ped_disk_type_register (PedDiskType* type); | |
| extern void ped_unregister_disk_type (PedDiskType* type); | | extern void ped_disk_type_unregister (PedDiskType* type); | |
| | | | |
| extern PedDiskType* ped_disk_type_get_next (PedDiskType* type); | | extern PedDiskType* ped_disk_type_get_next (PedDiskType* type); | |
| extern PedDiskType* ped_disk_type_get (const char* name); | | extern PedDiskType* ped_disk_type_get (const char* name); | |
| extern int ped_disk_type_check_feature (const PedDiskType* disk_type, | | extern int ped_disk_type_check_feature (const PedDiskType* disk_type, | |
| PedDiskTypeFeature feature); | | PedDiskTypeFeature feature); | |
| | | | |
| extern PedDiskType* ped_disk_probe (PedDevice* dev); | | extern PedDiskType* ped_disk_probe (PedDevice* dev); | |
| extern int ped_disk_clobber (PedDevice* dev); | | extern int ped_disk_clobber (PedDevice* dev); | |
| extern int ped_disk_clobber_exclude (PedDevice* dev, | | extern int ped_disk_clobber_exclude (PedDevice* dev, | |
| const PedDiskType* exclude); | | const PedDiskType* exclude); | |
| extern PedDisk* ped_disk_new (PedDevice* dev); | | extern PedDisk* ped_disk_new (PedDevice* dev); | |
| extern PedDisk* ped_disk_new_fresh (PedDevice* dev, | | extern PedDisk* ped_disk_new_fresh (PedDevice* dev, | |
| const PedDiskType* disk_type); | | const PedDiskType* disk_type); | |
| extern PedDisk* ped_disk_duplicate (const PedDisk* old_disk); | | extern PedDisk* ped_disk_duplicate (const PedDisk* old_disk); | |
| extern void ped_disk_destroy (PedDisk* disk); | | extern void ped_disk_destroy (PedDisk* disk); | |
| extern int ped_disk_commit (PedDisk* disk); | | extern int ped_disk_commit (PedDisk* disk); | |
| extern int ped_disk_commit_to_dev (PedDisk* disk); | | extern int ped_disk_commit_to_dev (PedDisk* disk); | |
| extern int ped_disk_commit_to_os (PedDisk* disk); | | extern int ped_disk_commit_to_os (PedDisk* disk); | |
|
| extern int ped_disk_check (PedDisk* disk); | | extern int ped_disk_check (const PedDisk* disk); | |
| extern void ped_disk_print (PedDisk* disk); | | extern void ped_disk_print (const PedDisk* disk); | |
| | | | |
|
| extern int ped_disk_get_primary_partition_count (PedDisk* disk); | | extern int ped_disk_get_primary_partition_count (const PedDisk* disk); | |
| extern int ped_disk_get_last_partition_num (PedDisk* disk); | | extern int ped_disk_get_last_partition_num (const PedDisk* disk); | |
| extern int ped_disk_get_max_primary_partition_count (const PedDisk* disk); | | extern int ped_disk_get_max_primary_partition_count (const PedDisk* disk); | |
|
| | | extern bool ped_disk_get_max_supported_partition_count(const PedDisk* disk, | |
| | | int* supported); | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedPartition | | * \addtogroup PedPartition | |
| * | | * | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| extern PedPartition* ped_partition_new (const PedDisk* disk, | | extern PedPartition* ped_partition_new (const PedDisk* disk, | |
| | | | |
End of changes. 18 change blocks. |
| 31 lines changed or deleted | | 45 lines changed or added | |
|
| filesys.h | | filesys.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | | Copyright (C) 1999, 2000, 2001, 2006, 2007 Free Software Foundation, In
c. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedFileSystem | | * \addtogroup PedFileSystem | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** \file filesys.h */ | | /** \file filesys.h */ | |
| | | | |
| #ifndef PED_FILESYS_H_INCLUDED | | #ifndef PED_FILESYS_H_INCLUDED | |
| #define PED_FILESYS_H_INCLUDED | | #define PED_FILESYS_H_INCLUDED | |
| | | | |
| typedef struct _PedFileSystem PedFileSystem; | | typedef struct _PedFileSystem PedFileSystem; | |
| typedef struct _PedFileSystemType PedFileSystemType; | | typedef struct _PedFileSystemType PedFileSystemType; | |
|
| | | typedef struct _PedFileSystemAlias PedFileSystemAlias; | |
| typedef const struct _PedFileSystemOps PedFileSystemOps; | | typedef const struct _PedFileSystemOps PedFileSystemOps; | |
| | | | |
| #include <parted/geom.h> | | #include <parted/geom.h> | |
|
| #include <parted/disk.h> | | | |
| #include <parted/exception.h> | | | |
| #include <parted/constraint.h> | | #include <parted/constraint.h> | |
| #include <parted/timer.h> | | #include <parted/timer.h> | |
|
| #include <stdio.h> | | | |
| | | | |
| struct _PedFileSystemOps { | | struct _PedFileSystemOps { | |
| PedGeometry* (*probe) (PedGeometry* geom); | | PedGeometry* (*probe) (PedGeometry* geom); | |
| int (*clobber) (PedGeometry* geom); | | int (*clobber) (PedGeometry* geom); | |
| | | | |
| PedFileSystem* (*open) (PedGeometry* geom); | | PedFileSystem* (*open) (PedGeometry* geom); | |
| PedFileSystem* (*create) (PedGeometry* geom, PedTimer* timer); | | PedFileSystem* (*create) (PedGeometry* geom, PedTimer* timer); | |
| int (*close) (PedFileSystem* fs); | | int (*close) (PedFileSystem* fs); | |
| int (*check) (PedFileSystem* fs, PedTimer* timer); | | int (*check) (PedFileSystem* fs, PedTimer* timer); | |
| PedFileSystem* (*copy) (const PedFileSystem* fs, PedGeometry* geom, | | PedFileSystem* (*copy) (const PedFileSystem* fs, PedGeometry* geom, | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 67 | |
| * Structure describing type of file system | | * Structure describing type of file system | |
| */ | | */ | |
| struct _PedFileSystemType { | | struct _PedFileSystemType { | |
| PedFileSystemType* next; | | PedFileSystemType* next; | |
| const char* const name; /**< name of the file system
type */ | | const char* const name; /**< name of the file system
type */ | |
| const int* block_sizes; | | const int* block_sizes; | |
| PedFileSystemOps* const ops; | | PedFileSystemOps* const ops; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
|
| | | * Structure describing a file system alias. This is separate from | |
| | | * PedFileSystemType because probing only looks through the list of types, | |
| | | * and does not probe aliases separately. | |
| | | */ | |
| | | struct _PedFileSystemAlias { | |
| | | PedFileSystemAlias* next; | |
| | | PedFileSystemType* fs_type; | |
| | | const char* alias; | |
| | | int deprecated; | |
| | | }; | |
| | | | |
| | | /** | |
| * Structure describing file system | | * Structure describing file system | |
| */ | | */ | |
| struct _PedFileSystem { | | struct _PedFileSystem { | |
| PedFileSystemType* type; /**< the file system type */ | | PedFileSystemType* type; /**< the file system type */ | |
| PedGeometry* geom; /**< where the file system a
ctually is */ | | PedGeometry* geom; /**< where the file system a
ctually is */ | |
| int checked; /**< 1 if the file system ha
s been checked. | | int checked; /**< 1 if the file system ha
s been checked. | |
| 0 otherwise. */ | | 0 otherwise. */ | |
| | | | |
| void* type_specific; | | void* type_specific; | |
| | | | |
| }; | | }; | |
| | | | |
| extern void ped_file_system_type_register (PedFileSystemType* type); | | extern void ped_file_system_type_register (PedFileSystemType* type); | |
| extern void ped_file_system_type_unregister (PedFileSystemType* type); | | extern void ped_file_system_type_unregister (PedFileSystemType* type); | |
| | | | |
|
| | | extern void ped_file_system_alias_register (PedFileSystemType* type, | |
| | | const char* alias, int deprecate | |
| | | d); | |
| | | extern void ped_file_system_alias_unregister (PedFileSystemType* type, | |
| | | const char* alias); | |
| | | | |
| extern PedFileSystemType* ped_file_system_type_get (const char* name); | | extern PedFileSystemType* ped_file_system_type_get (const char* name); | |
| extern PedFileSystemType* | | extern PedFileSystemType* | |
| ped_file_system_type_get_next (const PedFileSystemType* fs_type); | | ped_file_system_type_get_next (const PedFileSystemType* fs_type); | |
| | | | |
|
| | | extern PedFileSystemAlias* | |
| | | ped_file_system_alias_get_next (const PedFileSystemAlias* fs_alias); | |
| | | | |
| extern PedFileSystemType* ped_file_system_probe (PedGeometry* geom); | | extern PedFileSystemType* ped_file_system_probe (PedGeometry* geom); | |
| extern PedGeometry* ped_file_system_probe_specific ( | | extern PedGeometry* ped_file_system_probe_specific ( | |
| const PedFileSystemType* fs_type, | | const PedFileSystemType* fs_type, | |
| PedGeometry* geom); | | PedGeometry* geom); | |
| extern int ped_file_system_clobber (PedGeometry* geom); | | extern int ped_file_system_clobber (PedGeometry* geom); | |
| | | | |
| extern PedFileSystem* ped_file_system_open (PedGeometry* geom); | | extern PedFileSystem* ped_file_system_open (PedGeometry* geom); | |
| extern PedFileSystem* ped_file_system_create (PedGeometry* geom, | | extern PedFileSystem* ped_file_system_create (PedGeometry* geom, | |
| const PedFileSystemType* type, | | const PedFileSystemType* type, | |
| PedTimer* timer); | | PedTimer* timer); | |
| | | | |
End of changes. 9 change blocks. |
| 8 lines changed or deleted | | 25 lines changed or added | |
|
| geom.h | | geom.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 1998-2001, 2005 Free Software Foundation, Inc. | | Copyright (C) 1998-2001, 2005, 2006, 2007 Free Software Foundation, Inc
. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedGeometry | | * \addtogroup PedGeometry | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** \file geom.h */ | | /** \file geom.h */ | |
| | | | |
| #ifndef PED_GEOM_H_INCLUDED | | #ifndef PED_GEOM_H_INCLUDED | |
| #define PED_GEOM_H_INCLUDED | | #define PED_GEOM_H_INCLUDED | |
| | | | |
|
| #include <parted/device.h> | | | |
| #include <parted/timer.h> | | | |
| | | | |
| typedef struct _PedGeometry PedGeometry; | | typedef struct _PedGeometry PedGeometry; | |
| | | | |
| /** | | /** | |
| * Geometry of the partition | | * Geometry of the partition | |
| */ | | */ | |
| struct _PedGeometry { | | struct _PedGeometry { | |
| PedDevice* dev; | | PedDevice* dev; | |
| PedSector start; | | PedSector start; | |
| PedSector length; | | PedSector length; | |
| PedSector end; | | PedSector end; | |
| }; | | }; | |
| | | | |
|
| | | #include <parted/device.h> | |
| | | #include <parted/timer.h> | |
| | | | |
| extern int ped_geometry_init (PedGeometry* geom, const PedDevice* dev, | | extern int ped_geometry_init (PedGeometry* geom, const PedDevice* dev, | |
| PedSector start, PedSector length); | | PedSector start, PedSector length); | |
| extern PedGeometry* ped_geometry_new (const PedDevice* dev, PedSector start
, | | extern PedGeometry* ped_geometry_new (const PedDevice* dev, PedSector start
, | |
| PedSector length); | | PedSector length); | |
| extern PedGeometry* ped_geometry_duplicate (const PedGeometry* geom); | | extern PedGeometry* ped_geometry_duplicate (const PedGeometry* geom); | |
| extern PedGeometry* ped_geometry_intersect (const PedGeometry* a, | | extern PedGeometry* ped_geometry_intersect (const PedGeometry* a, | |
| const PedGeometry* b); | | const PedGeometry* b); | |
| extern void ped_geometry_destroy (PedGeometry* geom); | | extern void ped_geometry_destroy (PedGeometry* geom); | |
| extern int ped_geometry_set (PedGeometry* geom, PedSector start, | | extern int ped_geometry_set (PedGeometry* geom, PedSector start, | |
| PedSector length); | | PedSector length); | |
| | | | |
End of changes. 5 change blocks. |
| 8 lines changed or deleted | | 6 lines changed or added | |
|
| natmath.h | | natmath.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 2000 Free Software Foundation, Inc. | | Copyright (C) 2000, 2007, 2008 Free Software Foundation, Inc. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedAlignment | | * \addtogroup PedAlignment | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** \file natmath.h */ | | /** \file natmath.h */ | |
| | | | |
| #ifndef PED_NATMATH_H_INCLUDED | | #ifndef PED_NATMATH_H_INCLUDED | |
| #define PED_NATMATH_H_INCLUDED | | #define PED_NATMATH_H_INCLUDED | |
| | | | |
| typedef struct _PedAlignment PedAlignment; | | typedef struct _PedAlignment PedAlignment; | |
| | | | |
| #include <parted/disk.h> | | #include <parted/disk.h> | |
|
| | | #include <parted/device.h> | |
| | | | |
| #define PED_MIN(a, b) ( ((a)<(b)) ? (a) : (b) ) | | #define PED_MIN(a, b) ( ((a)<(b)) ? (a) : (b) ) | |
| #define PED_MAX(a, b) ( ((a)>(b)) ? (a) : (b) ) | | #define PED_MAX(a, b) ( ((a)>(b)) ? (a) : (b) ) | |
| | | | |
| /* this is weird (I'm still not sure I should be doing this!) | | /* this is weird (I'm still not sure I should be doing this!) | |
| * | | * | |
| * For the functions: new, destroy, duplicate and merge: the following valu
es | | * For the functions: new, destroy, duplicate and merge: the following valu
es | |
| * for align are valid: | | * for align are valid: | |
| * * align == NULL (!) represents no solution | | * * align == NULL (!) represents no solution | |
| * * align->grain_size == 0 represents a single solution | | * * align->grain_size == 0 represents a single solution | |
| | | | |
| skipping to change at line 89 | | skipping to change at line 89 | |
| ped_alignment_align_nearest (const PedAlignment* align, const PedGeometry*
geom, | | ped_alignment_align_nearest (const PedAlignment* align, const PedGeometry*
geom, | |
| PedSector sector); | | PedSector sector); | |
| | | | |
| extern int | | extern int | |
| ped_alignment_is_aligned (const PedAlignment* align, const PedGeometry* geo
m, | | ped_alignment_is_aligned (const PedAlignment* align, const PedGeometry* geo
m, | |
| PedSector sector); | | PedSector sector); | |
| | | | |
| extern const PedAlignment* ped_alignment_any; | | extern const PedAlignment* ped_alignment_any; | |
| extern const PedAlignment* ped_alignment_none; | | extern const PedAlignment* ped_alignment_none; | |
| | | | |
|
| extern inline PedSector | | static inline PedSector | |
| ped_div_round_up (PedSector numerator, PedSector divisor); | | ped_div_round_up (PedSector numerator, PedSector divisor) | |
| | | { | |
| | | return (numerator + divisor - 1) / divisor; | |
| | | } | |
| | | | |
|
| extern inline PedSector | | static inline PedSector | |
| ped_div_round_to_nearest (PedSector numerator, PedSector divisor); | | ped_div_round_to_nearest (PedSector numerator, PedSector divisor) | |
| | | { | |
| | | return (numerator + divisor/2) / divisor; | |
| | | } | |
| | | | |
| #endif /* PED_NATMATH_H_INCLUDED */ | | #endif /* PED_NATMATH_H_INCLUDED */ | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
End of changes. 6 change blocks. |
| 9 lines changed or deleted | | 14 lines changed or added | |
|
| parted.h | | parted.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | | Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| #ifndef PARTED_H_INCLUDED | | #ifndef PARTED_H_INCLUDED | |
| #define PARTED_H_INCLUDED | | #define PARTED_H_INCLUDED | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| typedef struct _PedArchitecture PedArchitecture; | | | |
| | | | |
| #include <parted/constraint.h> | | #include <parted/constraint.h> | |
| #include <parted/device.h> | | #include <parted/device.h> | |
| #include <parted/disk.h> | | #include <parted/disk.h> | |
| #include <parted/exception.h> | | #include <parted/exception.h> | |
| #include <parted/filesys.h> | | #include <parted/filesys.h> | |
| #include <parted/natmath.h> | | #include <parted/natmath.h> | |
| #include <parted/unit.h> | | #include <parted/unit.h> | |
| | | | |
|
| | | #include <stdint.h> | |
| #include <stdlib.h> | | #include <stdlib.h> | |
|
| | | #include <string.h> | |
| struct _PedArchitecture { | | | |
| PedDiskArchOps* disk_ops; | | | |
| PedDeviceArchOps* dev_ops; | | | |
| }; | | | |
| | | | |
| extern const PedArchitecture* ped_architecture; | | | |
| | | | |
| /* the architecture can't be changed if there are any PedDevice's. | | | |
| * i.e. you should only be doing this if it's the FIRST thing you do... | | | |
| */ | | | |
| extern int ped_set_architecture (const PedArchitecture* arch); | | | |
| | | | |
| extern const char* ped_get_version (); | | extern const char* ped_get_version (); | |
| | | | |
| extern void* ped_malloc (size_t size); | | extern void* ped_malloc (size_t size); | |
| extern void* ped_calloc (size_t size); | | extern void* ped_calloc (size_t size); | |
| extern int ped_realloc (void** ptr, size_t size); | | extern int ped_realloc (void** ptr, size_t size); | |
|
| extern void ped_free (void* ptr); | | extern void free (void* ptr); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* PARTED_H_INCLUDED */ | | #endif /* PARTED_H_INCLUDED */ | |
| | | | |
End of changes. 7 change blocks. |
| 20 lines changed or deleted | | 6 lines changed or added | |
|
| unit.h | | unit.h | |
| /* | | /* | |
| libparted - a library for manipulating disk partitions | | libparted - a library for manipulating disk partitions | |
|
| Copyright (C) 2005 Free Software Foundation, Inc. | | Copyright (C) 2005, 2007 Free Software Foundation, Inc. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | 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 | | it under the terms of the GNU General Public License as published by | |
|
| the Free Software Foundation; either version 2 of the License, or | | the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
|
| along with this program; if not, write to the Free Software | | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U | | | |
| SA | | | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \addtogroup PedUnit | | * \addtogroup PedUnit | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** \file unit.h */ | | /** \file unit.h */ | |
| | | | |
| #ifndef PED_UNIT_H_INCLUDED | | #ifndef PED_UNIT_H_INCLUDED | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 67 | |
| PED_UNIT_PERCENT, | | PED_UNIT_PERCENT, | |
| PED_UNIT_KIBIBYTE, | | PED_UNIT_KIBIBYTE, | |
| PED_UNIT_MEBIBYTE, | | PED_UNIT_MEBIBYTE, | |
| PED_UNIT_GIBIBYTE, | | PED_UNIT_GIBIBYTE, | |
| PED_UNIT_TEBIBYTE | | PED_UNIT_TEBIBYTE | |
| } PedUnit; | | } PedUnit; | |
| | | | |
| #define PED_UNIT_FIRST PED_UNIT_SECTOR | | #define PED_UNIT_FIRST PED_UNIT_SECTOR | |
| #define PED_UNIT_LAST PED_UNIT_TEBIBYTE | | #define PED_UNIT_LAST PED_UNIT_TEBIBYTE | |
| | | | |
|
| extern long long ped_unit_get_size (PedDevice* dev, PedUnit unit); | | extern long long ped_unit_get_size (const PedDevice* dev, PedUnit unit); | |
| extern const char* ped_unit_get_name (PedUnit unit); | | extern const char* ped_unit_get_name (PedUnit unit); | |
| extern PedUnit ped_unit_get_by_name (const char* unit_name); | | extern PedUnit ped_unit_get_by_name (const char* unit_name); | |
| | | | |
| extern void ped_unit_set_default (PedUnit unit); | | extern void ped_unit_set_default (PedUnit unit); | |
| extern PedUnit ped_unit_get_default (); | | extern PedUnit ped_unit_get_default (); | |
| | | | |
|
| extern char* ped_unit_format_byte (PedDevice* dev, PedSector byte); | | extern char* ped_unit_format_byte (const PedDevice* dev, PedSector byte); | |
| extern char* ped_unit_format_custom_byte (PedDevice* dev, PedSector byte, | | extern char* ped_unit_format_custom_byte (const PedDevice* dev, PedSector b | |
| | | yte, | |
| PedUnit unit); | | PedUnit unit); | |
| | | | |
|
| extern char* ped_unit_format (PedDevice* dev, PedSector sector); | | extern char* ped_unit_format (const PedDevice* dev, PedSector sector); | |
| extern char* ped_unit_format_custom (PedDevice* dev, PedSector sector, | | extern char* ped_unit_format_custom (const PedDevice* dev, PedSector sector | |
| | | , | |
| PedUnit unit); | | PedUnit unit); | |
| | | | |
|
| extern int ped_unit_parse (const char* str, PedDevice* dev, PedSector* sect | | extern int ped_unit_parse (const char* str, const PedDevice* dev, | |
| or, | | PedSector* sector, | |
| PedGeometry** range); | | PedGeometry** range); | |
|
| extern int ped_unit_parse_custom (const char* str, PedDevice* dev, | | extern int ped_unit_parse_custom (const char* str, const PedDevice* dev, | |
| PedUnit unit, PedSector* sector, | | PedUnit unit, PedSector* sector, | |
| PedGeometry** range); | | PedGeometry** range); | |
| | | | |
| #endif /* PED_UNIT_H_INCLUDED */ | | #endif /* PED_UNIT_H_INCLUDED */ | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
End of changes. 8 change blocks. |
| 13 lines changed or deleted | | 13 lines changed or added | |
|