summaryrefslogtreecommitdiff
path: root/libparted
diff options
context:
space:
mode:
Diffstat (limited to 'libparted')
-rw-r--r--libparted/ChangeLog.06
-rw-r--r--libparted/arch/beos.c68
-rw-r--r--libparted/arch/gnu.c20
-rw-r--r--libparted/arch/linux.c46
-rw-r--r--libparted/cs/constraint.c8
-rw-r--r--libparted/cs/geom.c30
-rw-r--r--libparted/cs/natmath.c28
-rw-r--r--libparted/device.c10
-rw-r--r--libparted/disk.c72
-rw-r--r--libparted/exception.c4
-rw-r--r--libparted/filesys.c40
-rw-r--r--libparted/fs/amiga/amiga.c24
-rw-r--r--libparted/fs/bfs/bfs.c48
-rw-r--r--libparted/fs/ext2/ext2.c4
-rw-r--r--libparted/fs/ext2/ext2.h2
-rw-r--r--libparted/fs/ext2/ext2_block_relocator.c4
-rw-r--r--libparted/fs/ext2/ext2_buffer.c2
-rw-r--r--libparted/fs/ext2/ext2_fs.h2
-rw-r--r--libparted/fs/ext2/ext2_mkfs.c8
-rw-r--r--libparted/fs/ext2/ext2_resize.c6
-rw-r--r--libparted/fs/ext2/parted_io.c2
-rw-r--r--libparted/fs/fat/bootsector.c8
-rw-r--r--libparted/fs/fat/calc.c4
-rw-r--r--libparted/fs/fat/clstdup.c4
-rw-r--r--libparted/fs/fat/context.c6
-rw-r--r--libparted/fs/fat/count.c6
-rw-r--r--libparted/fs/fat/fat.c8
-rw-r--r--libparted/fs/fat/fat.h2
-rw-r--r--libparted/fs/fat/resize.c8
-rw-r--r--libparted/fs/fat/traverse.c8
-rw-r--r--libparted/fs/hfs/DOC14
-rw-r--r--libparted/fs/hfs/HISTORY8
-rw-r--r--libparted/fs/hfs/TODO4
-rw-r--r--libparted/fs/hfs/advfs.c10
-rw-r--r--libparted/fs/hfs/advfs_plus.c12
-rw-r--r--libparted/fs/hfs/cache.c4
-rw-r--r--libparted/fs/hfs/cache.h6
-rw-r--r--libparted/fs/hfs/file.c6
-rw-r--r--libparted/fs/hfs/hfs.c30
-rw-r--r--libparted/fs/hfs/hfs.h18
-rw-r--r--libparted/fs/hfs/journal.c12
-rw-r--r--libparted/fs/hfs/probe.c4
-rw-r--r--libparted/fs/hfs/reloc.c20
-rw-r--r--libparted/fs/hfs/reloc_plus.c18
-rw-r--r--libparted/fs/jfs/jfs_superblock.h36
-rw-r--r--libparted/fs/linux_swap/linux_swap.c2
-rw-r--r--libparted/fs/ntfs/ntfs.c2
-rw-r--r--libparted/fs/reiserfs/geom_dal.c38
-rw-r--r--libparted/fs/reiserfs/reiserfs.c18
-rw-r--r--libparted/fs/reiserfs/reiserfs.h2
-rw-r--r--libparted/fs/ufs/ufs.c2
-rw-r--r--libparted/fs/xfs/xfs_sb.h24
-rw-r--r--libparted/fs/xfs/xfs_types.h26
-rw-r--r--libparted/labels/aix.c2
-rw-r--r--libparted/labels/bsd.c24
-rw-r--r--libparted/labels/dos.c20
-rw-r--r--libparted/labels/dvh.c4
-rw-r--r--libparted/labels/dvh.h2
-rw-r--r--libparted/labels/efi_crc32.c2
-rw-r--r--libparted/labels/fdasd.c108
-rw-r--r--libparted/labels/gpt.c96
-rw-r--r--libparted/labels/loop.c4
-rw-r--r--libparted/labels/mac.c10
-rw-r--r--libparted/labels/pc98.c10
-rw-r--r--libparted/labels/rdb.c34
-rw-r--r--libparted/labels/sun.c14
-rw-r--r--libparted/labels/vtoc.c220
-rw-r--r--libparted/tests/common.c2
-rw-r--r--libparted/timer.c52
-rw-r--r--libparted/unit.c60
70 files changed, 734 insertions, 734 deletions
diff --git a/libparted/ChangeLog.0 b/libparted/ChangeLog.0
index ef155dd..b064596 100644
--- a/libparted/ChangeLog.0
+++ b/libparted/ChangeLog.0
@@ -14,7 +14,7 @@
* libparted/disk.c (ped_register_disk_type, ped_unregister_disk_type):
Clean-up. Patch sent by Debarshi 'Rishi' Ray <debarshi.ray@gmail.com>.
-
+
2006-11-08 Otavio Salvador <otavio@debian.org>
* libparted/fs/hfs/probe.c: Fix a segmentation fault when running
@@ -174,7 +174,7 @@
* labels/mac.c (mac_partition_get_flag): added 'set 2 raid on/off'
capability for mac labels.
-
+
* labels/mac.c (struct MacRawDisk, struct MacPartitionData): fixed
data types of some fields (do not need to be 64 bit wide) and updated
meaning of reserved spaces.
@@ -242,7 +242,7 @@
* labels/gpt.c (pth_crc32): calculate crc32 from static size.
2006-02-20 Leslie P. Polzer <polzer@gnu.org>
- * device.c: added ped_device_get_constraint.
+ * device.c: added ped_device_get_constraint.
-----------------------------------------------------------------------------
diff --git a/libparted/arch/beos.c b/libparted/arch/beos.c
index 1d0cf64..f4f6bb9 100644
--- a/libparted/arch/beos.c
+++ b/libparted/arch/beos.c
@@ -61,7 +61,7 @@ _scan_for_disks(const char* path)
dirent_t* entp;
size_t pos;
DIR* dirp;
-
+
if ((dirp=opendir(path)) != NULL)
{
/* Build first part of path */
@@ -77,7 +77,7 @@ _scan_for_disks(const char* path)
continue;
strcpy(subdir+pos, entp->d_name);
-
+
/* /dev/disk/.../raw are the complete disks
we're interested in */
if (strcmp(entp->d_name, "raw") == 0)
@@ -86,7 +86,7 @@ _scan_for_disks(const char* path)
be another subdir */
_scan_for_disks(subdir);
}
-
+
closedir(dirp);
}
}
@@ -110,20 +110,20 @@ _device_init_ata(PedDevice* dev)
int maxlen, len, idx, fd;
char buf[256];
- /* Try and get information about device from ATA(PI) driver */
+ /* Try and get information about device from ATA(PI) driver */
if ((fd=open(dev->path, O_RDONLY)) < 0)
goto ata_error;
-
+
if (ioctl(fd, B_ATA_GET_DEVICE_INFO, &ide_info, sizeof(ide_info)) < 0)
goto ata_error_close;
close(fd);
-
+
/* Copy 'logical' dimensions */
dev->bios_geom.cylinders = ide_info.cylinders;
dev->bios_geom.heads = ide_info.heads;
dev->bios_geom.sectors = ide_info.sectors;
-
+
/* Copy used dimensions */
dev->hw_geom.cylinders = ide_info.current_cylinders;
dev->hw_geom.heads = ide_info.current_heads;
@@ -135,8 +135,8 @@ _device_init_ata(PedDevice* dev)
else if (ide_info.LBA_supported)
dev->length = ide_info.LBA_total_sectors;
else
- dev->length = ide_info.cylinders *
- ide_info.heads *
+ dev->length = ide_info.cylinders *
+ ide_info.heads *
ide_info.sectors;
dev->sector_size =
@@ -146,13 +146,13 @@ _device_init_ata(PedDevice* dev)
maxlen=sizeof(ide_info.model_number);
strncpy(buf, ide_info.model_number, maxlen);
buf[maxlen] = '\0';
-
+
for (len=-1, idx=maxlen-1; idx > 0 && len < 0; idx--)
if (buf[idx] > 0x20)
len = idx;
-
- buf[(len == -1) ? 0 : len+1] = '\0';
-
+
+ buf[(len == -1) ? 0 : len+1] = '\0';
+
dev->model = strdup(buf);
return PED_DEVICE_IDE;
@@ -163,7 +163,7 @@ ata_error_close:
ata_error:
return 0;
}
-#endif
+#endif
static int
_device_init_generic_blkdev(PedDevice* dev)
@@ -172,10 +172,10 @@ _device_init_generic_blkdev(PedDevice* dev)
int got_bios_info = 0;
int fd;
- /* Try and get information about device from ATA(PI) driver */
+ /* Try and get information about device from ATA(PI) driver */
if ((fd=open(dev->path, O_RDONLY)) < 0)
goto blkdev_error;
-
+
/* B_GET_GEOMETRY is mandatory */
if (ioctl(fd, B_GET_GEOMETRY, &os, sizeof(os)) < 0)
goto blkdev_error_close;
@@ -185,14 +185,14 @@ _device_init_generic_blkdev(PedDevice* dev)
got_bios_info = 1;
close(fd);
-
+
dev->hw_geom.cylinders = os.cylinder_count;
dev->hw_geom.heads = os.head_count;
dev->hw_geom.sectors = os.sectors_per_track;
-
+
dev->sector_size =
dev->phys_sector_size = os.bytes_per_sector;
-
+
if (got_bios_info)
{
dev->bios_geom.cylinders = bios.cylinder_count;
@@ -205,10 +205,10 @@ _device_init_generic_blkdev(PedDevice* dev)
dev->model = strdup("");
return PED_DEVICE_IDE;
-
+
blkdev_error_close:
close(fd);
-
+
blkdev_error:
return 0;
}
@@ -243,7 +243,7 @@ _device_init_file(PedDevice* dev, struct stat* dev_statp)
dev->hw_geom = dev->bios_geom;
dev->model = strdup(_("Disk Image"));
-
+
return PED_DEVICE_FILE;
}
@@ -252,8 +252,8 @@ _device_init(PedDevice* dev)
{
struct stat dev_stat;
int type = 0;
-
- /* Check if we're a regular file */
+
+ /* Check if we're a regular file */
if (stat(dev->path, &dev_stat) < 0)
goto done;
@@ -283,7 +283,7 @@ beos_new (const char* path)
if (!dev->path)
goto error_free_dev;
- dev->arch_specific
+ dev->arch_specific
= (BEOSSpecific*) ped_malloc(sizeof(BEOSSpecific));
if (dev->arch_specific == NULL)
goto error_free_path;
@@ -299,16 +299,16 @@ beos_new (const char* path)
/* All OK! */
return dev;
-
+
error_free_arch_specific:
free (dev->arch_specific);
-
+
error_free_path:
free (dev->path);
-
+
error_free_dev:
free (dev);
-
+
error:
return NULL;
}
@@ -431,14 +431,14 @@ beos_read (const PedDevice* dev, void* buffer, PedSector start, PedSector count)
return 0;
}
}
-
+
/* If we seeked ok, now is the time to read */
while (1)
{
status = read(arch_specific->fd, buffer, read_length);
if (status == count * dev->sector_size)
break;
-
+
if (status > 0)
{
read_length -= status;
@@ -527,7 +527,7 @@ beos_write (PedDevice* dev, const void* buffer, PedSector start,
status = write (arch_specific->fd, buffer, write_length);
if (status == count * dev->sector_size)
break;
-
+
if (status > 0)
{
write_length -= status;
@@ -554,7 +554,7 @@ beos_write (PedDevice* dev, const void* buffer, PedSector start,
}
}
#endif /* !READ_ONLY */
-
+
return 1;
}
@@ -566,7 +566,7 @@ beos_check (PedDevice* dev, void* buffer, PedSector start, PedSector count)
int status;
PED_ASSERT(dev != NULL, return 0);
-
+
if (lseek(arch_specific->fd, start * dev->sector_size, SEEK_SET)
!= start * dev->sector_size)
return 0;
diff --git a/libparted/arch/gnu.c b/libparted/arch/gnu.c
index 0f08b9b..f17682f 100644
--- a/libparted/arch/gnu.c
+++ b/libparted/arch/gnu.c
@@ -117,7 +117,7 @@ retry_open:
case PED_EXCEPTION_CANCEL:
goto error;
}
-
+
return 0;
}
@@ -252,12 +252,12 @@ gnu_new (const char* path)
/* Try read-write. */
if (strchr (dev->path, '/') != NULL) {
/* We set this to prevent having to use strchr more then once. */
- ispath = 1;
+ ispath = 1;
rw_err = store_open (dev->path, 0, NULL, &arch_specific->store);
- } else {
+ } else {
rw_err = store_typed_open (dev->path, 0, NULL, &arch_specific->store);
- }
+ }
/* Try readonly. */
if (rw_err) {
@@ -268,7 +268,7 @@ gnu_new (const char* path)
ro_err = store_typed_open (dev->path, STORE_READONLY, NULL,
&arch_specific->store);
}
-
+
if (ro_err) {
if (ped_exception_throw (
PED_EXCEPTION_ERROR,
@@ -350,7 +350,7 @@ static int
gnu_close (PedDevice* dev)
{
GNUSpecific* arch_specific = GNU_SPECIFIC (dev);
-
+
_flush_cache (dev);
if (dev->dirty && dev->type != PED_DEVICE_FILE) {
@@ -588,7 +588,7 @@ doggy_first_block_read:
doggy_first_block_write:
err = store_write (arch_specific->store,
PED_TO_STORE (arch_specific->store, start),
- temp, arch_specific->store->block_size,
+ temp, arch_specific->store->block_size,
&did_write);
if (! err && did_write != arch_specific->store->block_size)
err = EIO;
@@ -710,7 +710,7 @@ doggy_last_block_read:
doggy_last_block_write:
err = store_write (arch_specific->store,
PED_TO_STORE (arch_specific->store, start),
- temp, arch_specific->store->block_size,
+ temp, arch_specific->store->block_size,
&did_write);
if (! err && did_write != arch_specific->store->block_size)
err = EIO;
@@ -769,7 +769,7 @@ gnu_sync (PedDevice* dev)
PED_ASSERT (dev != NULL, return 0);
PED_ASSERT (!dev->external_mode, return 0);
-
+
arch_specific = GNU_SPECIFIC (dev);
if (dev->read_only || ! dev->dirty)
@@ -801,7 +801,7 @@ gnu_sync (PedDevice* dev)
case PED_EXCEPTION_CANCEL:
return 0;
}
- }
+ }
return 1;
}
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index afdf7f6..6e47107 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -605,12 +605,12 @@ _have_devfs ()
return have_devfs = S_ISCHR(sb.st_mode) ? 1 : 0;
}
-static void
+static void
_device_set_sector_size (PedDevice* dev)
{
LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev);
int sector_size;
-
+
dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
dev->phys_sector_size = PED_SECTOR_SIZE_DEFAULT;
@@ -620,7 +620,7 @@ _device_set_sector_size (PedDevice* dev)
dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
return;
}
-
+
if (ioctl (arch_specific->fd, BLKSSZGET, &sector_size)) {
ped_exception_throw (
PED_EXCEPTION_WARNING,
@@ -702,7 +702,7 @@ _device_probe_geometry (PedDevice* dev)
PED_ASSERT (S_ISBLK (dev_stat.st_mode), return 0);
_device_set_sector_size (dev);
-
+
dev->length = _device_get_length (dev);
if (!dev->length)
return 0;
@@ -757,7 +757,7 @@ init_ide (PedDevice* dev)
PedExceptionOption ex_status;
char hdi_buf[41];
int sector_multiplier = 0;
-
+
if (!_device_stat (dev, &dev_stat))
goto error;
@@ -790,12 +790,12 @@ init_ide (PedDevice* dev)
memcpy (hdi_buf, hdi.model, 40);
hdi_buf[40] = '\0';
dev->model = strip_name (hdi_buf);
-
+
if (!hdi.ata7_sectinfo.valid1 && hdi.ata7_sectinfo.valid2)
sector_multiplier = hdi.ata7_sectinfo.multiplier;
else
sector_multiplier = 1;
-
+
if (sector_multiplier != 1) {
ex_status = ped_exception_throw (
PED_EXCEPTION_WARNING,
@@ -808,7 +808,7 @@ init_ide (PedDevice* dev)
"Please consult the web site for up-to-date "
"information."),
dev->path, sector_multiplier);
-
+
switch (ex_status) {
case PED_EXCEPTION_CANCEL:
goto error_close_dev;
@@ -822,7 +822,7 @@ init_ide (PedDevice* dev)
break;
}
}
-
+
/* XXX sector_size has not been set yet! */
/* dev->phys_sector_size = dev->sector_size
* sector_multiplier;*/
@@ -1016,7 +1016,7 @@ static int
init_file (PedDevice* dev)
{
struct stat dev_stat;
-
+
if (!_device_stat (dev, &dev_stat))
goto error;
if (!ped_device_open (dev))
@@ -1046,9 +1046,9 @@ init_file (PedDevice* dev)
dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
dev->phys_sector_size = PED_SECTOR_SIZE_DEFAULT;
dev->model = strdup ("");
-
+
return 1;
-
+
error_close_dev:
ped_device_close (dev);
error:
@@ -1502,11 +1502,11 @@ static int
_device_seek (const PedDevice* dev, PedSector sector)
{
LinuxSpecific* arch_specific;
-
+
PED_ASSERT (dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0, return 0);
PED_ASSERT (dev != NULL, return 0);
PED_ASSERT (!dev->external_mode, return 0);
-
+
arch_specific = LINUX_SPECIFIC (dev);
#if SIZEOF_OFF_T < 8
@@ -1529,14 +1529,14 @@ _read_lastoddsector (const PedDevice* dev, void* buffer)
PED_ASSERT(dev != NULL, return 0);
PED_ASSERT(buffer != NULL, return 0);
-
+
arch_specific = LINUX_SPECIFIC (dev);
retry:
ioctl_param.block = 0; /* read the last sector */
ioctl_param.content_length = dev->sector_size;
ioctl_param.block_contents = buffer;
-
+
if (ioctl(arch_specific->fd, BLKGETLASTSECT, &ioctl_param) == -1) {
PedExceptionOption opt;
opt = ped_exception_throw (
@@ -1657,14 +1657,14 @@ _write_lastoddsector (PedDevice* dev, const void* buffer)
PED_ASSERT(dev != NULL, return 0);
PED_ASSERT(buffer != NULL, return 0);
-
+
arch_specific = LINUX_SPECIFIC (dev);
retry:
ioctl_param.block = 0; /* write the last sector */
ioctl_param.content_length = dev->sector_size;
ioctl_param.block_contents = (void*) buffer;
-
+
if (ioctl(arch_specific->fd, BLKSETLASTSECT, &ioctl_param) == -1) {
PedExceptionOption opt;
opt = ped_exception_throw (
@@ -1800,7 +1800,7 @@ linux_check (PedDevice* dev, void* buffer, PedSector start, PedSector count)
void* diobuf;
PED_ASSERT(dev != NULL, return 0);
-
+
if (!_device_seek (dev, start))
return 0;
@@ -1853,7 +1853,7 @@ _do_fsync (PedDevice* dev)
PED_ASSERT (0, (void) 0);
break;
}
- }
+ }
return 1;
}
@@ -2014,7 +2014,7 @@ _probe_sys_block ()
}
_ped_device_probe (dev_name);
}
-
+
closedir (blockdir);
return 1;
}
@@ -2378,7 +2378,7 @@ _dm_remove_map_name(char *name)
return 0;
}
-static int
+static int
_dm_is_part (struct dm_info *this, char *name)
{
struct dm_task* task = NULL;
@@ -2390,7 +2390,7 @@ _dm_is_part (struct dm_info *this, char *name)
task = dm_task_create(DM_DEVICE_DEPS);
if (!task)
return 0;
-
+
dm_task_set_name(task, name);
rc = dm_task_run(task);
if (rc < 0) {
diff --git a/libparted/cs/constraint.c b/libparted/cs/constraint.c
index e094e5b..529d199 100644
--- a/libparted/cs/constraint.c
+++ b/libparted/cs/constraint.c
@@ -19,8 +19,8 @@
/**
* \addtogroup PedConstraint
*
- * \brief Constraint solver interface.
- *
+ * \brief Constraint solver interface.
+ *
* Constraints are used to communicate restrictions on operations Constraints
* are restrictions on the location and alignment of the start and end of a
* partition, and the minimum and maximum size.
@@ -399,7 +399,7 @@ _constraint_get_nearest_end_soln (const PedConstraint* constraint,
/**
* Return the nearest region to \p geom that satisfy a \p constraint.
- *
+ *
* Note that "nearest" is somewhat ambiguous. This function makes
* no guarantees about how this ambiguity is resovled.
*
@@ -436,7 +436,7 @@ ped_constraint_solve_nearest (
/**
* Find the largest region that satisfies a constraint.
- *
+ *
* There might be more than one solution. This function makes no
* guarantees about which solution it will choose in this case.
*/
diff --git a/libparted/cs/geom.c b/libparted/cs/geom.c
index 2990d86..0ea8403 100644
--- a/libparted/cs/geom.c
+++ b/libparted/cs/geom.c
@@ -96,7 +96,7 @@ error:
* independent copy of \p geom. Both the input, \p geom, and the output
* should be destroyed with ped_geometry_destroy() when they are no
* longer needed.
- *
+ *
* \return NULL on failure.
*/
PedGeometry*
@@ -202,7 +202,7 @@ ped_geometry_set_end (PedGeometry* geom, PedSector end)
*
* That is, they lie on the same physical device, and they share
* the same physical region at least partially.
- *
+ *
* \return 1 if \p a and \p b overlap.
*/
int
@@ -241,7 +241,7 @@ ped_geometry_test_inside (const PedGeometry* a, const PedGeometry* b)
/**
* Tests if \a a and \p b refer to the same physical region.
- *
+ *
* \return 1 if \p a and \p b describe the same regions
*
*/
@@ -269,7 +269,7 @@ ped_geometry_test_sector_inside (const PedGeometry* geom, PedSector sector)
return sector >= geom->start && sector <= geom->end;
}
-/**
+/**
* Reads data from the region represented by \p geom. \p offset is the
* location from within the region, not from the start of the disk.
* \p count sectors are read into \p buffer.
@@ -293,7 +293,7 @@ ped_geometry_read (const PedGeometry* geom, void* buffer, PedSector offset,
PED_ASSERT (buffer != NULL, return 0);
PED_ASSERT (offset >= 0, return 0);
PED_ASSERT (count >= 0, return 0);
-
+
real_start = geom->start + offset;
if (real_start + count - 1 > geom->end)
@@ -306,11 +306,11 @@ ped_geometry_read (const PedGeometry* geom, void* buffer, PedSector offset,
/**
* Flushes the cache on \p geom.
- *
+ *
* This function flushes all write-behind caches that might be holding
* writes made by ped_geometry_write() to \p geom. It is slow, because
* it guarantees cache coherency among all relevant caches.
- *
+ *
* \return 0 on failure
*/
int
@@ -321,13 +321,13 @@ ped_geometry_sync (PedGeometry* geom)
}
/**
- * Flushes the cache on \p geom.
+ * Flushes the cache on \p geom.
*
* This function flushes all write-behind caches that might be holding writes
* made by ped_geometry_write() to \p geom. It does NOT ensure cache coherency
- * with other caches that cache data in the region described by \p geom.
+ * with other caches that cache data in the region described by \p geom.
* If you need cache coherency, use ped_geometry_sync() instead.
- *
+ *
* \return 0 on failure
*/
int
@@ -355,7 +355,7 @@ ped_geometry_write (PedGeometry* geom, const void* buffer, PedSector offset,
PED_ASSERT (buffer != NULL, return 0);
PED_ASSERT (offset >= 0, return 0);
PED_ASSERT (count >= 0, return 0);
-
+
real_start = geom->start + offset;
if (real_start + count - 1 > geom->end) {
@@ -438,16 +438,16 @@ found_error:
* \endcode
*
* does the same thing as
- *
+ *
* \code
* ped_geometry_read (src, buf, sector, 1)
* \endcode
*
- * Clearly, this will only work if \p src and \p dst overlap.
+ * Clearly, this will only work if \p src and \p dst overlap.
*
- * \return -1 if \p sector is not within \p dst's space,
+ * \return -1 if \p sector is not within \p dst's space,
* or \p sector's address inside \p dst
- *
+ *
*/
PedSector
ped_geometry_map (const PedGeometry* dst, const PedGeometry* src,
diff --git a/libparted/cs/natmath.c b/libparted/cs/natmath.c
index 7511fbd..2708dbc 100644
--- a/libparted/cs/natmath.c
+++ b/libparted/cs/natmath.c
@@ -121,7 +121,7 @@ ped_greatest_common_divisor (PedSector a, PedSector b)
* Initialize a preallocated piece of memory for an alignment object
* (used by PedConstraint).
*
- * The object will represent all sectors \e s for which the equation
+ * The object will represent all sectors \e s for which the equation
* <tt>s = offset + X * grain_size</tt> holds.
*/
int
@@ -221,7 +221,7 @@ extended_euclid (int a, int b)
* intersection of two alignments. That is, a sector satisfies the
* new alignment object if and only if it satisfies both of the original
* ones. (See ped_alignment_is_aligned() for the meaning of "satisfies")
- *
+ *
* Apart from the trivial cases (where one or both of the alignment objects
* constraints have no sectors that satisfy them), this is what we're trying to
* do:
@@ -231,18 +231,18 @@ extended_euclid (int a, int b)
* - hard part - solve the simultaneous equations, for offset, where offset,
* X and Y are variables. (Note: offset can be obtained from either X or Y,
* by substituing into either equation)
- *
+ *
* \code
* offset = \p a->offset + X * \p a->grain_size (1)
* offset = \p b->offset + Y * \p b->grain_size (2)
* \endcode
- *
+ *
* or, abbreviated:
*
* \code
* o = Ao + X*Ag (1)
* o = Bo + Y*Bg (2)
- *
+ *
* => Ao + X*Ag = Bo + Y*Bg (1) = (2)
* X*Ag - Y*Bg = Bo - Ao (3)
* \endcode
@@ -260,9 +260,9 @@ extended_euclid (int a, int b)
* \endcode
*
* gcd is a factor of the linear combination. QED
- *
- * Anyway, \p a * Ag + \p b * Bg = gcd can be solved (for \p a, \p b and gcd)
- * with Euclid's extended algorithm. Then, we just multiply through by
+ *
+ * Anyway, \p a * Ag + \p b * Bg = gcd can be solved (for \p a, \p b and gcd)
+ * with Euclid's extended algorithm. Then, we just multiply through by
* (Bo - Ao) / gcd to get (3).
*
* i.e.
@@ -274,7 +274,7 @@ extended_euclid (int a, int b)
* X = A*(Bo-Ao)/gcd
* Y = - B*(Bo-Ao)/gcd
* \endcode
- *
+ *
* then:
* \code
* o = Ao + X*Ag (1)
@@ -299,14 +299,14 @@ ped_alignment_intersect (const PedAlignment* a, const PedAlignment* b)
PedSector delta_on_gcd;
EuclidTriple gcd_factors;
-
+
if (!a || !b)
return NULL;
/*PED_DEBUG (0x10, "intersecting alignments (%d,%d) and (%d,%d)",
a->offset, a->grain_size, b->offset, b->grain_size);
*/
-
+
if (a->grain_size < b->grain_size) {
const PedAlignment* tmp;
tmp = a; a = b; b = tmp;
@@ -370,7 +370,7 @@ _closest_inside_geometry (const PedAlignment* align, const PedGeometry* geom,
/**
* This function returns the closest sector to \p sector that lies inside
* \p geom that satisfies the given alignment constraint \p align. It prefers
- * sectors that are beyond \p sector (are not smaller than \p sector),
+ * sectors that are beyond \p sector (are not smaller than \p sector),
* but does not guarantee that this.
*
* \return a PedSector on success, \c -1 on failure
@@ -439,7 +439,7 @@ closest (PedSector sector, PedSector a, PedSector b)
}
/**
- * This function returns the sector that is closest to \p sector,
+ * This function returns the sector that is closest to \p sector,
* satisfies the \p align constraint and lies inside \p geom.
*
* \return a PedSector on success, \c -1 on failure
@@ -455,7 +455,7 @@ ped_alignment_align_nearest (const PedAlignment* align, const PedGeometry* geom,
}
/**
- * This function returns 1 if \p sector satisfies the alignment
+ * This function returns 1 if \p sector satisfies the alignment
* constraint \p align and lies inside \p geom.
*
* \return \c 1 on success, \c 0 on failure
diff --git a/libparted/device.c b/libparted/device.c
index b951dd2..294fec4 100644
--- a/libparted/device.c
+++ b/libparted/device.c
@@ -22,11 +22,11 @@
* \addtogroup PedDevice
*
* \brief Device access.
- *
+ *
* When ped_device_probe_all() is called, libparted attempts to detect all
* devices. It constructs a list which can be accessed with
* ped_device_get_next().
- *
+ *
* If you want to use a device that isn't on the list, use
* ped_device_get(). Also, there may be OS-specific constructors, for creating
* devices from file descriptors, stores, etc. For example,
@@ -334,7 +334,7 @@ ped_device_end_external_access (PedDevice* dev)
/**
* \internal Read count sectors from dev into buffer, beginning with sector
* start.
- *
+ *
* \return zero on failure.
*/
int
@@ -352,7 +352,7 @@ ped_device_read (const PedDevice* dev, void* buffer, PedSector start,
/**
* \internal Write count sectors from buffer to dev, starting at sector
* start.
- *
+ *
* \return zero on failure.
*
* \sa PedDevice::sector_size
@@ -430,7 +430,7 @@ ped_device_get_constraint (PedDevice* dev)
int multiplier = dev->phys_sector_size / dev->sector_size;
PedAlignment* start_align = ped_alignment_new (multiplier, multiplier);
-
+
PedGeometry *s, *e;
PedConstraint* c = ped_constraint_new (
start_align, ped_alignment_any,
diff --git a/libparted/disk.c b/libparted/disk.c
index 4003618..5fb8060 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
@@ -23,7 +23,7 @@
* \addtogroup PedDisk
*
* \brief Disk label access.
- *
+ *
* Most programs will need to use ped_disk_new() or ped_disk_new_fresh() to get
* anything done. A PedDisk is always associated with a device and has a
* partition table. There are different types of partition tables (or disk
@@ -71,7 +71,7 @@ ped_disk_type_register (PedDiskType* disk_type)
PED_ASSERT (disk_type != NULL, return);
PED_ASSERT (disk_type->ops != NULL, return);
PED_ASSERT (disk_type->name != NULL, return);
-
+
disk_type->next = disk_types;
disk_types = disk_type;
}
@@ -160,12 +160,12 @@ ped_disk_probe (PedDevice* dev)
}
/**
- * Read the partition table off a device (if one is found).
- *
+ * Read the partition table off a device (if one is found).
+ *
* \warning May modify \p dev->cylinders, \p dev->heads and \p dev->sectors
* if the partition table indicates that the existing values
* are incorrect.
- *
+ *
* \return A new \link _PedDisk PedDisk \endlink object;
* NULL on failure (e.g. partition table not detected).
*/
@@ -273,9 +273,9 @@ error:
/**
* Remove all identifying signatures of a partition table,
* except for partition tables of a given type.
- *
+ *
* \return 0 on error, 1 otherwise.
- *
+ *
* \sa ped_disk_clobber()
*/
int
@@ -315,11 +315,11 @@ error:
return 0;
}
-/**
+/**
* Remove all identifying signatures of a partition table,
- *
+ *
* \return 0 on error, 1 otherwise.
- *
+ *
* \sa ped_disk_clobber_exclude()
*/
int
@@ -333,7 +333,7 @@ ped_disk_clobber (PedDevice* dev)
*
* This new partition table is only created in-memory, and nothing is written
* to disk until ped_disk_commit_to_dev() is called.
- *
+ *
* \return The newly constructed \link _PedDisk PedDisk \endlink,
* NULL on failure.
*/
@@ -415,7 +415,7 @@ ped_disk_destroy (PedDisk* disk)
* use the new blkpg interface to tell Linux where each partition
* starts/ends, etc. In this case, Linux does not need to have support for
* a specific type of partition table.
- *
+ *
* \return 0 on failure, 1 otherwise.
*/
int
@@ -664,7 +664,7 @@ ped_disk_get_max_supported_partition_count(const PedDisk* disk, int* supported)
/**
* Get the maximum number of (primary) partitions the disk label supports.
- *
+ *
* For example, MacIntosh partition maps can have different sizes,
* and accordingly support a different number of partitions.
*/
@@ -835,7 +835,7 @@ _alloc_extended_freespace (PedDisk* disk)
last_end = extended_part->geom.start;
last = NULL;
-
+
for (walk = extended_part->part_list; walk; walk = walk->next) {
if (walk->geom.start > last_end + 1) {
free_space = ped_partition_new (
@@ -965,7 +965,7 @@ _disk_pop_update_mode (PedDisk* disk)
* \addtogroup PedPartition
*
* \brief Partition access.
- *
+ *
* @{
*/
@@ -1043,13 +1043,13 @@ fail:
*
* \note The constructed partition is not added to <tt>disk</tt>'s
* partition table. Use ped_disk_add_partition() to do this.
- *
+ *
* \return A new \link _PedPartition PedPartition \endlink object,
* NULL on failure.
*
* \throws PED_EXCEPTION_ERROR if \p type is \p EXTENDED or \p LOGICAL but the
* label does not support this concept.
- */
+ */
PedPartition*
ped_partition_new (const PedDisk* disk, PedPartitionType type,
const PedFileSystemType* fs_type, PedSector start,
@@ -1126,7 +1126,7 @@ ped_partition_is_active (const PedPartition* part)
/**
* Set the state (\c 1 or \c 0) of a flag on a partition.
- *
+ *
* Flags are disk label specific, although they have a global
* "namespace": the flag PED_PARTITION_BOOT, for example, roughly means
* "this" partition is bootable". But this means different things on different
@@ -1134,7 +1134,7 @@ ped_partition_is_active (const PedPartition* part)
* on MS-DOS disk labels, there can only be one boot partition, and this
* refers to the partition that will be booted from on startup. On PC98
* disk labels, the user can choose from any bootable partition on startup.
- *
+ *
* \note It is an error to call this on an unavailable flag -- use
* ped_partition_is_flag_available() to determine which flags are available
* for a given disk label.
@@ -1253,7 +1253,7 @@ _assert_partition_name_feature (const PedDiskType* disk_type)
* ped_disk_type_check_feature (part->disk->type, PED_DISK_TYPE_PARTITION_NAME);
* \endcode
* to check whether this feature is enabled for a label.
- *
+ *
* \note \p name will not be modified by libparted. It can be freed
* by the caller immediately after ped_partition_set_name() is called.
*
@@ -1320,7 +1320,7 @@ ped_disk_extended_partition (const PedDisk* disk)
return walk;
}
-/**
+/**
* Return the next partition after \p part on \p disk. If \p part is \c NULL,
* return the first partition. If \p part is the last partition, returns
* \c NULL. If \p part is an extended partition, returns the first logical
@@ -1374,7 +1374,7 @@ _disk_check_sanity (PedDisk* disk)
#endif
/**
- * Returns the partition numbered \p num.
+ * Returns the partition numbered \p num.
*
* \return \c NULL if the specified partition does not exist.
*/
@@ -1516,7 +1516,7 @@ _disk_raw_add (PedDisk* disk, PedPartition* part)
ext_part->part_list = part;
else
disk->part_list = part;
- }
+ }
}
return 1;
@@ -1535,7 +1535,7 @@ _partition_get_overlap_constraint (PedPartition* part, PedGeometry* geom)
if (part->type & PED_PARTITION_LOGICAL) {
PedPartition* ext_part;
-
+
ext_part = ped_disk_extended_partition (part->disk);
PED_ASSERT (ext_part != NULL, return NULL);
@@ -1574,7 +1574,7 @@ _partition_get_overlap_constraint (PedPartition* part, PedGeometry* geom)
* Returns \c 0 if the partition, \p part overlaps with any partitions on the
* \p disk. The geometry of \p part is taken to be \p geom, NOT \p part->geom
* (the idea here is to check if \p geom is valid, before changing \p part).
- *
+ *
* This is useful for seeing if a resized partitions new geometry is going to
* fit, without the existing geomtry getting in the way.
*
@@ -1802,7 +1802,7 @@ _check_partition (PedDisk* disk, PedPartition* part)
/**
* Adds PedPartition \p part to PedPartition \p disk.
- *
+ *
* \warning The partition's geometry may be changed, subject to \p constraint.
* You could set \p constraint to <tt>ped_constraint_exact(&part->geom)</tt>,
* but many partition table schemes have special requirements on the start
@@ -1810,7 +1810,7 @@ _check_partition (PedDisk* disk, PedPartition* part)
* will probably mean that this function will fail (in which
* case \p part will be left unmodified)
* \p part is assigned a number (\p part->num) in this process.
- *
+ *
* \return \c 0 on failure.
*/
int
@@ -1974,7 +1974,7 @@ ped_disk_delete_all (PedDisk* disk)
* to \p constraint.
*
* \warning The constraint warning from ped_disk_add_partition() applies.
- *
+ *
* \note this function does not modify the contents of the partition. You need
* to call ped_file_system_resize() separately.
*/
@@ -2035,7 +2035,7 @@ error_pop_update_mode:
/**
* Grow PedPartition \p part geometry to the maximum possible subject to
* \p constraint. The new geometry will be a superset of the old geometry.
- *
+ *
* \return 0 on failure
*/
int
@@ -2129,7 +2129,7 @@ ped_disk_get_max_partition_geometry (PedDisk* disk, PedPartition* part,
return max_geom;
}
-/**
+/**
* Reduce the size of the extended partition to a minimum while still wrapping
* its logical partitions. If there are no logical partitions, remove the
* extended partition.
@@ -2185,11 +2185,11 @@ ped_disk_minimize_extended_partition (PedDisk* disk)
/**
* Returns a name that seems mildly appropriate for a partition type \p type.
- *
+ *
* Eg, if you pass (PED_PARTITION_LOGICAL & PED_PARTITION_FREESPACE), it
* will return "free". This isn't to be taken too seriously - it's just
* useful for user interfaces, so you can show the user something ;-)
- *
+ *
* \note The returned string will be in English. However,
* translations are provided, so the caller can call
* dgettext("parted", RESULT) on the result.
@@ -2213,7 +2213,7 @@ ped_partition_type_get_name (PedPartitionType type)
/**
* Returns a name for a \p flag, e.g. PED_PARTITION_BOOT will return "boot".
- *
+ *
* \note The returned string will be in English. However,
* translations are provided, so the caller can call
* dgettext("parted", RESULT) on the result.
@@ -2258,8 +2258,8 @@ ped_partition_flag_get_name (PedPartitionFlag flag)
}
/**
- * Iterates through all flags.
- *
+ * Iterates through all flags.
+ *
* ped_partition_flag_next(0) returns the first flag
*
* \return the next flag, or 0 if there are no more flags
@@ -2271,7 +2271,7 @@ ped_partition_flag_next (PedPartitionFlag flag)
}
/**
- * Returns the flag associated with \p name.
+ * Returns the flag associated with \p name.
*
* \p name can be the English
* string, or the translation for the native language.
diff --git a/libparted/exception.c b/libparted/exception.c
index 46e08b2..4a7dcc7 100644
--- a/libparted/exception.c
+++ b/libparted/exception.c
@@ -22,7 +22,7 @@
* \addtogroup PedException
*
* \brief Exception handling.
- *
+ *
* There are a few types of exceptions: PED_EXCEPTION_INFORMATION,
* PED_EXCEPTION_WARNING, PED_EXCEPTION_ERROR, PED_EXCEPTION_FATAL,
* PED_EXCEPTION_BUG.
@@ -214,7 +214,7 @@ do_throw ()
* Throw an exception.
*
* You can also use this in a program using libparted.
- * "message" is a printf-like format string, so you can do
+ * "message" is a printf-like format string, so you can do
*
* \code
* ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_RETRY_CANCEL,
diff --git a/libparted/filesys.c b/libparted/filesys.c
index 7d98c23..ba48a79 100644
--- a/libparted/filesys.c
+++ b/libparted/filesys.c
@@ -48,7 +48,7 @@ ped_file_system_type_register (PedFileSystemType* fs_type)
PED_ASSERT (fs_type != NULL, return);
PED_ASSERT (fs_type->ops != NULL, return);
PED_ASSERT (fs_type->name != NULL, return);
-
+
fs_type->next = fs_types;
fs_types = fs_type;
}
@@ -69,7 +69,7 @@ ped_file_system_type_unregister (PedFileSystemType* fs_type)
if (last)
((struct _PedFileSystemType*) last)->next = fs_type->next;
else
- fs_types = fs_type->next;
+ fs_types = fs_type->next;
}
/**
@@ -184,7 +184,7 @@ _probe_with_open (PedGeometry* geom, int detected_count,
} else {
open_detected = detected [i];
}
- }
+ }
ped_device_close (geom->dev);
return open_detected;
@@ -231,7 +231,7 @@ _best_match (const PedGeometry* geom, PedFileSystemType* detected [],
/**
- * Attempt to detect a file system in region \p geom.
+ * Attempt to detect a file system in region \p geom.
* This function tries to be clever at dealing with ambiguous
* situations, such as when one file system was not completely erased before a
* new file system was created on top of it.
@@ -284,7 +284,7 @@ ped_file_system_probe (PedGeometry* geom)
* After this operation ped_file_system_probe() won't detect any file system.
*
* \note ped_file_system_create() calls this before creating a new file system.
- *
+ *
* \return \c 1 on success, \c 0 on failure
*/
int
@@ -359,7 +359,7 @@ ped_file_system_clobber_exclude (PedGeometry* geom,
*
* \throws PED_EXCEPTION_ERROR if file system could not be detected
* \throws PED_EXCEPTION_ERROR if the file system is bigger than its volume
- * \throws PED_EXCEPTION_NO_FEATURE if opening of a file system stored on
+ * \throws PED_EXCEPTION_NO_FEATURE if opening of a file system stored on
* \p geom is not implemented
*
* \return a PedFileSystem on success, \c NULL on failure.
@@ -419,11 +419,11 @@ error:
}
/**
- * This function initializes a new file system of type \p type on
- * a region described by \p geom, writing out appropriate metadata and
+ * This function initializes a new file system of type \p type on
+ * a region described by \p geom, writing out appropriate metadata and
* signatures. If \p timer is non-NULL, it is used as the progress meter.
*
- * \throws PED_EXCEPTION_NO_FEATURE if creating file system type \p type
+ * \throws PED_EXCEPTION_NO_FEATURE if creating file system type \p type
* is not implemented yet
*
* \return a PedFileSystem on success, \c NULL on failure
@@ -487,7 +487,7 @@ error_close_dev:
/**
* Check \p fs file system for errors.
*
- * \throws PED_EXCEPTION_NO_FEATURE if checking file system \p fs is
+ * \throws PED_EXCEPTION_NO_FEATURE if checking file system \p fs is
* not implemented yet
*
* \return \c 0 on failure (i.e. unfixed errors)
@@ -594,11 +594,11 @@ error:
/**
* Create a new file system (of the same type) on \p geom, and
- * copy the contents of \p fs into the new filesystem.
+ * copy the contents of \p fs into the new filesystem.
* If \p timer is non-NULL, it is used as the progress meter.
*
* \throws PED_EXCEPTION_ERROR when trying to copy onto an overlapping partition
- * \throws PED_EXCEPTION_NO_FEATURE if copying of file system \p fs
+ * \throws PED_EXCEPTION_NO_FEATURE if copying of file system \p fs
* is not implemented yet
*
* \return a new PedFileSystem on success, \c NULL on failure
@@ -635,7 +635,7 @@ ped_file_system_copy (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
return _raw_copy_and_resize (
fs, (PedGeometry*) geom,
timer);
-
+
ped_exception_throw (
PED_EXCEPTION_NO_FEATURE,
PED_EXCEPTION_CANCEL,
@@ -677,10 +677,10 @@ error:
* (This isn't asserted, so it's not a bug not to... just it's likely
* to fail ;) If \p timer is non-NULL, it is used as the progress meter.
*
- * \throws PED_EXCEPTION_NO_FEATURE if resizing of file system \p fs
+ * \throws PED_EXCEPTION_NO_FEATURE if resizing of file system \p fs
* is not implemented yet
- *
- * \return \c 0 on failure
+ *
+ * \return \c 0 on failure
*/
int
ped_file_system_resize (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
@@ -708,7 +708,7 @@ ped_file_system_resize (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
/**
* This function returns a constraint on the region that all file systems
- * of a particular type \p fs_type created on device \p dev with
+ * of a particular type \p fs_type created on device \p dev with
* ped_file_system_create() must satisfy. For example, FAT16 file systems must
* be at least 32 megabytes.
*
@@ -727,7 +727,7 @@ ped_file_system_get_create_constraint (const PedFileSystemType* fs_type,
}
/**
* Return a constraint, that represents all of the possible ways the
- * file system \p fs can be resized with ped_file_system_resize().
+ * file system \p fs can be resized with ped_file_system_resize().
* This takes into account the amount of used space on
* the filesystem \p fs and the capabilities of the resize algorithm.
* Hints:
@@ -735,7 +735,7 @@ ped_file_system_get_create_constraint (const PedFileSystemType* fs_type,
* constraint->start_geom->length == 1, then the start can not be moved
* -# constraint->min_size is the minimum size you can resize the partition
* to. You might want to tell the user this ;-).
- *
+ *
* \return a PedConstraint on success, \c NULL on failure
*/
PedConstraint*
@@ -753,7 +753,7 @@ ped_file_system_get_resize_constraint (const PedFileSystem* fs)
* to somewhere on \p dev.
*
* \return a PedConstraint on success, \c NULL on failure
- */
+ */
PedConstraint*
ped_file_system_get_copy_constraint (const PedFileSystem* fs,
const PedDevice* dev)
diff --git a/libparted/fs/amiga/amiga.c b/libparted/fs/amiga/amiga.c
index 4a20f06..1346038 100644
--- a/libparted/fs/amiga/amiga.c
+++ b/libparted/fs/amiga/amiga.c
@@ -1,4 +1,4 @@
-/*
+/*
libparted/fs_amiga - amiga file system support.
Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
@@ -38,7 +38,7 @@
#define IDNAME_FILESYSHEADER (uint32_t)0x46534844 /* 'FSHD' */
#define IDNAME_LOADSEG (uint32_t)0x4C534547 /* 'LSEG' */
#define IDNAME_BOOT (uint32_t)0x424f4f54 /* 'BOOT' */
-#define IDNAME_FREE (uint32_t)0xffffffff
+#define IDNAME_FREE (uint32_t)0xffffffff
static const char *
_amiga_block_id (uint32_t id) {
@@ -103,7 +103,7 @@ struct AmigaBlock {
uint32_t amiga_SummedLongss; /* Size of the structure for checksums */
int32_t amiga_ChkSum; /* Checksum of the structure */
};
-#define AMIGA(pos) ((struct AmigaBlock *)(pos))
+#define AMIGA(pos) ((struct AmigaBlock *)(pos))
struct RigidDiskBlock {
uint32_t rdb_ID; /* Identifier 32 bit word : 'RDSK' */
@@ -152,7 +152,7 @@ struct RigidDiskBlock {
#define AMIGA_MAX_PARTITIONS 128
#define RDB_LOCATION_LIMIT 16
-#define RDSK(pos) ((struct RigidDiskBlock *)(pos))
+#define RDSK(pos) ((struct RigidDiskBlock *)(pos))
static int
_amiga_checksum (struct AmigaBlock *blk) {
@@ -176,7 +176,7 @@ _amiga_calculate_checksum (struct AmigaBlock *blk) {
blk->amiga_ChkSum = PED_CPU_TO_BE32(
PED_BE32_TO_CPU(blk->amiga_ChkSum) -
_amiga_checksum((struct AmigaBlock *) blk));
- return;
+ return;
}
@@ -189,7 +189,7 @@ _amiga_read_block (PedDevice *dev, struct AmigaBlock *blk, PedSector block, stru
{
case PED_EXCEPTION_CANCEL :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
return NULL;
}
}
@@ -212,13 +212,13 @@ _amiga_read_block (PedDevice *dev, struct AmigaBlock *blk, PedSector block, stru
{
case PED_EXCEPTION_CANCEL :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
return NULL;
}
}
case PED_EXCEPTION_IGNORE :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
return blk;
}
}
@@ -229,7 +229,7 @@ static uint32_t
_amiga_find_rdb (PedDevice *dev, struct RigidDiskBlock *rdb) {
int i;
struct AmigaIds *ids;
-
+
ids = _amiga_add_id (IDNAME_RIGIDDISK, NULL);
for (i = 0; i<RDB_LOCATION_LIMIT; i++) {
@@ -278,7 +278,7 @@ amiga_find_part (PedGeometry *geom, struct PartitionBlock *part)
{
case PED_EXCEPTION_CANCEL :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
return NULL;
}
}
@@ -289,7 +289,7 @@ amiga_find_part (PedGeometry *geom, struct PartitionBlock *part)
{
case PED_EXCEPTION_CANCEL :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
free(rdb);
return NULL;
}
@@ -319,7 +319,7 @@ amiga_find_part (PedGeometry *geom, struct PartitionBlock *part)
{
case PED_EXCEPTION_CANCEL :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
free(rdb);
return NULL;
}
diff --git a/libparted/fs/bfs/bfs.c b/libparted/fs/bfs/bfs.c
index 7cc3540..a97f2ca 100644
--- a/libparted/fs/bfs/bfs.c
+++ b/libparted/fs/bfs/bfs.c
@@ -52,7 +52,7 @@ bfs_probe (PedGeometry* geom)
PED_ASSERT (geom->dev != NULL, return NULL);
buf = ped_malloc (geom->dev->sector_size);
-
+
if (!ped_geometry_read (geom, buf, 0, 1))
return 0;
@@ -75,7 +75,7 @@ bfs_clobber (PedGeometry* geom)
PED_ASSERT (geom->dev != NULL, return 0);
buf = ped_malloc (geom->dev->sector_size);
-
+
if (!ped_geometry_read (geom, buf, 0, 1))
return 0;
memset (buf, 0, 512);
@@ -123,30 +123,30 @@ bfs_free (PedFileSystem* fs)
}
-static PedFileSystem*
+static PedFileSystem*
bfs_open (PedGeometry *geom)
{
PedFileSystem* fs = bfs_alloc (geom);
-
+
struct bfs_sb* sb = (struct bfs_sb*) ped_malloc(sizeof(struct bfs_sb));
struct BfsSpecific* bfs;
uint8_t* buf;
-
+
PED_ASSERT (geom != NULL, return NULL);
PED_ASSERT (geom->dev != NULL, return NULL);
-
+
buf = ped_malloc (geom->dev->sector_size);
-
+
if (!fs)
return NULL;
bfs = fs->type_specific;
-
+
if (!ped_geometry_read (geom, buf, 0, 1))
return NULL;
-
+
memcpy (sb, buf, BFS_SECTOR_SIZE);
-
+
bfs->sb = sb;
return fs;
@@ -168,7 +168,7 @@ static struct bfs_inode* create_root_inode()
root->nlinks = 0UL;
root->atime = root->ctime = 0UL;
memset ((void*)root->reserved, 0, 32*4);
-
+
return root;
}
@@ -195,37 +195,37 @@ static int _write_block (PedFileSystem* fs, uint8_t* buf, int n)
static int _write_sb (PedFileSystem* fs)
{
uint8_t* sb = _block_alloc (1);
-
+
BFS_SB(fs)->magic = BFS_MAGIC;
BFS_SB(fs)->sanity = BFS_PED_SANITY;
BFS_SB(fs)->start = BFS_SPECIFIC(fs)->data_start;
BFS_SB(fs)->size = BFS_SPECIFIC(fs)->size;
-
+
memcpy (sb, BFS_SB(fs), sizeof(struct bfs_sb));
return _write_block (fs, sb, 1);
}
-static PedFileSystem*
+static PedFileSystem*
bfs_create (PedGeometry *geom, PedTimer *timer)
{
PedFileSystem* fs = bfs_alloc (geom);
int n_inodes = PED_MAX (BFS_PED_MIN_INODES, 16/*some sane value here*/);
-
+
/* TODO: check whether geometry is big enough */
-
+
fs->data_start = 1 + ped_round_up_to (n_inodes * 64, 512);
fs->size = geom->dev->sector_size * length;
-
- ped_timer_set_state_name (timer, "Writing inodes");
-
-
-
+
+ ped_timer_set_state_name (timer, "Writing inodes");
+
+
+
ped_timer_set_state_name (timer, "Writing super block");
_write_sb (fs);
-
- return 0;
+
+ return 0;
}
#endif /* !DISCOVER_ONLY */
@@ -236,7 +236,7 @@ static PedFileSystemOps bfs_ops = {
clobber: bfs_clobber,
#else
clobber: NULL,
-#endif
+#endif
open: bfs_open,
#ifndef DISCOVER_ONLY
create: bfs_create,
diff --git a/libparted/fs/ext2/ext2.c b/libparted/fs/ext2/ext2.c
index cf00ab1..4663115 100644
--- a/libparted/fs/ext2/ext2.c
+++ b/libparted/fs/ext2/ext2.c
@@ -569,7 +569,7 @@ static int is_root(int x, int y)
/* check whether group contains a superblock copy on file systems
* where not all groups have one (sparse superblock feature) */
int ext2_is_group_sparse(struct ext2_fs *fs, int group)
-{
+{
if (!fs->sparse)
return 1;
@@ -779,7 +779,7 @@ struct ext2_fs *ext2_open(struct ext2_dev_handle *handle, int state)
ext2_read_blocks(fs, fs->gd, EXT2_SUPER_FIRST_DATA_BLOCK(fs->sb) + 1,
fs->gdblocks);
-
+
fs->metadirty = 0;
return fs;
diff --git a/libparted/fs/ext2/ext2.h b/libparted/fs/ext2/ext2.h
index a3e7fe3..6c4bab9 100644
--- a/libparted/fs/ext2/ext2.h
+++ b/libparted/fs/ext2/ext2.h
@@ -100,7 +100,7 @@ struct ext2_dev_handle
};
struct ext2_fs
-{
+{
struct ext2_dev_handle *devhandle;
struct ext2_super_block sb;
diff --git a/libparted/fs/ext2/ext2_block_relocator.c b/libparted/fs/ext2/ext2_block_relocator.c
index e9f6a7b..f71d7cb 100644
--- a/libparted/fs/ext2/ext2_block_relocator.c
+++ b/libparted/fs/ext2/ext2_block_relocator.c
@@ -51,11 +51,11 @@ struct ext2_block_entry
* and the first data block in the group. This can change when a
* filesystem is resized, because the size of the group descriptors is
* proportional to the size of the filesystem.
- *
+ *
* - allocentries is the size of the "block" array. It is a tuneable
* parameter that determines how many blocks can be moved in each
* pass.
- *
+ *
* - usedentries says how many entries of the "block" array have been
* used. That is, how many blocks have been scheduled so far to
* be moved.
diff --git a/libparted/fs/ext2/ext2_buffer.c b/libparted/fs/ext2/ext2_buffer.c
index 47ba501..6fc9be0 100644
--- a/libparted/fs/ext2/ext2_buffer.c
+++ b/libparted/fs/ext2/ext2_buffer.c
@@ -54,7 +54,7 @@ static int try_to_flush(struct ext2_buffer_cache *bc)
struct ext2_buffer_head *bh;
bh = &bc->heads[i];
-
+
if (bh->alloc && !bh->usecount && !bh->dirty)
{
ext2_bh_dealloc(bh);
diff --git a/libparted/fs/ext2/ext2_fs.h b/libparted/fs/ext2/ext2_fs.h
index d642518..c449949 100644
--- a/libparted/fs/ext2/ext2_fs.h
+++ b/libparted/fs/ext2/ext2_fs.h
@@ -205,7 +205,7 @@ struct ext2_super_block
* the incompatible feature set is that if there is a bit set
* in the incompatible feature set that the kernel doesn't
* know about, it should refuse to mount the file system.
- *
+ *
* e2fsck's requirements are more strict; if it doesn't know
* about a feature in either the compatible or incompatible
* feature set, it must abort and not try to meddle with
diff --git a/libparted/fs/ext2/ext2_mkfs.c b/libparted/fs/ext2/ext2_mkfs.c
index fa78a76..c084a75 100644
--- a/libparted/fs/ext2/ext2_mkfs.c
+++ b/libparted/fs/ext2/ext2_mkfs.c
@@ -32,7 +32,7 @@
#include "ext2.h"
/* formula grabbed from linux ext2 kernel source
- *
+ *
* returns 1 iff:
* x == y^N, N is some natural number
* OR x == 0
@@ -521,7 +521,7 @@ struct ext2_fs *ext2_mkfs(struct ext2_dev_handle *handle,
int first_block;
int last_group_blocks;
int last_group_admin;
-
+
/* if the FS is > 512Mb, use 4k blocks, otherwise 1k blocks */
if (log_block_size == 0) {
handle->ops->set_blocksize(handle->cookie, 12);
@@ -534,9 +534,9 @@ struct ext2_fs *ext2_mkfs(struct ext2_dev_handle *handle,
/* FIXME: block size must be > MAX(logicalbs, physicalbs)
* to avoid modify-on-write.
* -- Leslie
- */
+ */
+
-
handle->ops->set_blocksize(handle->cookie, log_block_size);
if (numblocks == 0)
diff --git a/libparted/fs/ext2/ext2_resize.c b/libparted/fs/ext2/ext2_resize.c
index 3da71f7..b4245d2 100644
--- a/libparted/fs/ext2/ext2_resize.c
+++ b/libparted/fs/ext2/ext2_resize.c
@@ -575,7 +575,7 @@ static int ext2_shrink_fs(struct ext2_fs *fs, blk_t newsize,
diff -= sizelast;
}
}
-
+
ped_timer_update (timer, 1.0);
return 1;
@@ -589,7 +589,7 @@ int ext2_determine_itoffset(struct ext2_fs *fs)
- EXT2_SUPER_FIRST_DATA_BLOCK(fs->sb);
/*PED_DEBUG (0x20, "itoffset is %d", fs->itoffset);
-
+
PED_DEBUG (0x20, "walking %d groups", fs->numgroups);*/
for (i=0;i<fs->numgroups;i++)
@@ -637,7 +637,7 @@ int ext2_determine_itoffset(struct ext2_fs *fs)
PED_DEBUG (0x21, "calculated inode table to be %d, "
"but fs says %d.", it,
EXT2_GROUP_INODE_TABLE(fs->gd[i]));*/
-
+
return 0;
}
}
diff --git a/libparted/fs/ext2/parted_io.c b/libparted/fs/ext2/parted_io.c
index 8f13240..300e7d5 100644
--- a/libparted/fs/ext2/parted_io.c
+++ b/libparted/fs/ext2/parted_io.c
@@ -90,7 +90,7 @@ static int do_set_blocksize(void *cookie, int logsize)
monster->logsize = logsize;
return 1;
-}
+}
static int do_write(void *cookie, void *ptr, blk_t block, blk_t num)
{
diff --git a/libparted/fs/fat/bootsector.c b/libparted/fs/fat/bootsector.c
index 2bed1fd..c8e67b8 100644
--- a/libparted/fs/fat/bootsector.c
+++ b/libparted/fs/fat/bootsector.c
@@ -130,7 +130,7 @@ fat_boot_sector_analyse (FatBootSector* bs, PedFileSystem* fs)
int fat_entry_size;
PED_ASSERT (bs != NULL, return 0);
-
+
if (PED_LE16_TO_CPU (bs->sector_size) != 512) {
if (ped_exception_throw (
PED_EXCEPTION_BUG,
@@ -400,7 +400,7 @@ fat_info_sector_read (FatInfoSector* is, const PedFileSystem* fs)
int status;
PED_ASSERT (is != NULL, return 0);
-
+
if (!ped_geometry_read (fs->geom, is, fs_info->info_sector_offset, 1))
return 0;
@@ -423,7 +423,7 @@ fat_info_sector_generate (FatInfoSector* is, const PedFileSystem* fs)
FatSpecific* fs_info = FAT_SPECIFIC (fs);
PED_ASSERT (is != NULL, return 0);
-
+
fat_table_count_stats (fs_info->fat);
memset (is, 0, 512);
@@ -443,7 +443,7 @@ fat_info_sector_write (const FatInfoSector* is, PedFileSystem *fs)
FatSpecific* fs_info = FAT_SPECIFIC (fs);
PED_ASSERT (is != NULL, return 0);
-
+
if (!ped_geometry_write (fs->geom, is, fs_info->info_sector_offset, 1))
return 0;
return ped_geometry_sync (fs->geom);
diff --git a/libparted/fs/fat/calc.c b/libparted/fs/fat/calc.c
index aa1c414..026aec8 100644
--- a/libparted/fs/fat/calc.c
+++ b/libparted/fs/fat/calc.c
@@ -17,7 +17,7 @@
*/
#include <config.h>
-#include "fat.h"
+#include "fat.h"
#ifndef DISCOVER_ONLY
@@ -328,7 +328,7 @@ fat_calc_align_sectors (const PedFileSystem* new_fs,
PedSector align;
new_meta_data_size
- = fat_min_reserved_sector_count (new_fs_info->fat_type)
+ = fat_min_reserved_sector_count (new_fs_info->fat_type)
+ new_fs_info->fat_sectors * 2;
if (new_fs_info->fat_type == FAT_TYPE_FAT16)
diff --git a/libparted/fs/fat/clstdup.c b/libparted/fs/fat/clstdup.c
index f3151fe..6a27631 100644
--- a/libparted/fs/fat/clstdup.c
+++ b/libparted/fs/fat/clstdup.c
@@ -43,7 +43,7 @@ needs_duplicating (const FatOpContext* ctx, FatFragment frag)
case FAT_FLAG_FILE:
return fat_op_context_map_static_fragment (ctx, frag) == -1;
-
+
case FAT_FLAG_BAD:
return 0;
}
@@ -189,7 +189,7 @@ quick_group_write_read_underlay (FatOpContext* ctx, int first, int last)
underlay_length = last_underlay - first_underlay + 1;
if (!fat_read_fragments (ctx->new_fs,
- new_fs_info->buffer
+ new_fs_info->buffer
+ (first_underlay - ctx->buffer_map [first])
* new_fs_info->frag_size,
first_underlay,
diff --git a/libparted/fs/fat/context.c b/libparted/fs/fat/context.c
index 423bc64..e50ce8b 100644
--- a/libparted/fs/fat/context.c
+++ b/libparted/fs/fat/context.c
@@ -58,7 +58,7 @@ calc_deltas (FatOpContext* ctx)
(int) new_fs_info->cluster_sectors);
return 0;
}
-
+
ctx->start_move_delta = sector_delta / ctx->frag_sectors;
#ifdef PED_VERBOSE
@@ -152,7 +152,7 @@ fat_op_context_map_static_cluster (const FatOpContext* ctx, FatCluster clst)
FatFragment mapped_frag;
mapped_frag = fat_op_context_map_static_fragment (ctx,
- fat_cluster_to_frag (ctx->old_fs, clst));
+ fat_cluster_to_frag (ctx->old_fs, clst));
if (mapped_frag != -1)
return fat_frag_to_cluster (ctx->new_fs, mapped_frag);
else
@@ -171,7 +171,7 @@ fat_op_context_map_cluster (const FatOpContext* ctx, FatCluster clst)
FatFragment mapped_frag;
mapped_frag = fat_op_context_map_fragment (ctx,
- fat_cluster_to_frag (ctx->old_fs, clst));
+ fat_cluster_to_frag (ctx->old_fs, clst));
if (mapped_frag != -1)
return fat_frag_to_cluster (ctx->new_fs, mapped_frag);
else
diff --git a/libparted/fs/fat/count.c b/libparted/fs/fat/count.c
index 10328d1..e934294 100644
--- a/libparted/fs/fat/count.c
+++ b/libparted/fs/fat/count.c
@@ -283,7 +283,7 @@ flag_traverse_dir (FatTraverseInfo* trav_info) {
return 0;
} else if (fat_dir_entry_is_file (this_entry)) {
if (!flag_traverse_fat (fs, file_name, first_cluster,
- FAT_FLAG_FILE, size))
+ FAT_FLAG_FILE, size))
return 0;
}
}
@@ -304,7 +304,7 @@ _mark_bad_clusters (PedFileSystem* fs)
}
}
-/*
+/*
fills in cluster_info. Each FAT entry (= cluster) is flagged as either
FAT_FLAG_FREE, FAT_FLAG_FILE or FAT_FLAG_DIRECTORY.
@@ -314,7 +314,7 @@ int
fat_collect_cluster_info (PedFileSystem* fs) {
FatSpecific* fs_info = FAT_SPECIFIC (fs);
FatTraverseInfo* trav_info;
-
+
/* set all clusters to unused as a default */
memset (fs_info->cluster_info, 0, fs_info->fat->cluster_count + 2);
fs_info->total_dir_clusters = 0;
diff --git a/libparted/fs/fat/fat.c b/libparted/fs/fat/fat.c
index 242162f..ada2d62 100644
--- a/libparted/fs/fat/fat.c
+++ b/libparted/fs/fat/fat.c
@@ -234,7 +234,7 @@ fat_open (PedGeometry* geom)
if (!_init_fats (fs))
goto error_free_fs;
- if (!fat_alloc_buffers (fs))
+ if (!fat_alloc_buffers (fs))
goto error_free_fat_table;
if (!fat_collect_cluster_info (fs))
goto error_free_buffers;
@@ -362,7 +362,7 @@ fat_create (PedGeometry* geom, FatType fat_type, PedTimer* timer)
if (!fs_info->fat)
goto error_free_fs;
fat_table_set_cluster_count (fs_info->fat, fs_info->cluster_count);
- if (!fat_alloc_buffers (fs))
+ if (!fat_alloc_buffers (fs))
goto error_free_fat_table;
if (fs_info->fat_type == FAT_TYPE_FAT32) {
@@ -539,7 +539,7 @@ fat_check (PedFileSystem* fs, PedTimer* timer)
!= PED_EXCEPTION_IGNORE)
goto error;
}
- }
+ }
if (fs_info->fat_type == FAT_TYPE_FAT32) {
info_free_clusters
@@ -646,7 +646,7 @@ _get_min_resize_size (const PedFileSystem* fs, PedSector min_data_size)
}
/* adds a bit of leeway (64 sectors), for resolving extra issues, like root
- * directory allocation, that aren't covered here.
+ * directory allocation, that aren't covered here.
*/
return max_length + 64;
}
diff --git a/libparted/fs/fat/fat.h b/libparted/fs/fat/fat.h
index 1d5565b..d749bc8 100644
--- a/libparted/fs/fat/fat.h
+++ b/libparted/fs/fat/fat.h
@@ -135,7 +135,7 @@ struct _FatSpecific {
#define DIRECTORY_ATTR 0x10
#define ARCH_ATTR 0x20
-#define MAX_FAT12_CLUSTERS 4086
+#define MAX_FAT12_CLUSTERS 4086
#define MAX_FAT16_CLUSTERS 65526
#define MAX_FAT32_CLUSTERS 2000000
diff --git a/libparted/fs/fat/resize.c b/libparted/fs/fat/resize.c
index 835bc34..e877a17 100644
--- a/libparted/fs/fat/resize.c
+++ b/libparted/fs/fat/resize.c
@@ -572,7 +572,7 @@ ask_type (PedFileSystem* fs, int fat16_ok, int fat32_ok, FatType* out_fat_type)
*out_fat_type = FAT_TYPE_FAT32;
return 1;
}
-
+
ped_exception_throw (
PED_EXCEPTION_NO_FEATURE,
PED_EXCEPTION_CANCEL,
@@ -683,7 +683,7 @@ create_resize_context (PedFileSystem* fs, const PedGeometry* new_geom)
new_fs_info->cluster_count = new_cluster_count;
new_fs_info->dir_entries_per_cluster = fs_info->dir_entries_per_cluster;
- new_fs_info->fat_type = new_fat_type;
+ new_fs_info->fat_type = new_fat_type;
new_fs_info->fat_table_count = 2;
new_fs_info->fat_sectors = new_fat_sectors;
@@ -711,7 +711,7 @@ create_resize_context (PedFileSystem* fs, const PedGeometry* new_geom)
+ 2 * new_fs_info->fat_sectors;
} else {
new_fs_info->root_dir_sector_count = root_dir_sector_count;
- new_fs_info->root_dir_entry_count
+ new_fs_info->root_dir_entry_count
= root_dir_sector_count * 512 / sizeof (FatDirEntry);
new_fs_info->fat_offset
@@ -724,7 +724,7 @@ create_resize_context (PedFileSystem* fs, const PedGeometry* new_geom)
new_fs_info->cluster_offset = new_fs_info->root_dir_offset
+ new_fs_info->root_dir_sector_count;
}
-
+
new_fs_info->total_dir_clusters = fs_info->total_dir_clusters;
context = fat_op_context_new (new_fs, fs);
diff --git a/libparted/fs/fat/traverse.c b/libparted/fs/fat/traverse.c
index be5efe9..670a254 100644
--- a/libparted/fs/fat/traverse.c
+++ b/libparted/fs/fat/traverse.c
@@ -42,7 +42,7 @@ fat_traverse_entries_per_buffer (FatTraverseInfo* trav_info)
static int
is_last_buffer (FatTraverseInfo* trav_info) {
FatSpecific* fs_info = FAT_SPECIFIC (trav_info->fs);
-
+
if (trav_info->is_legacy_root_dir)
return 1;
else
@@ -53,7 +53,7 @@ static int
write_root_dir (FatTraverseInfo* trav_info)
{
FatSpecific* fs_info = FAT_SPECIFIC (trav_info->fs);
-
+
if (!ped_geometry_write (trav_info->fs->geom, trav_info->dir_entries,
fs_info->root_dir_offset,
fs_info->root_dir_sector_count))
@@ -258,7 +258,7 @@ fat_dir_entry_set_first_cluster (FatDirEntry* dir_entry, PedFileSystem* fs,
case FAT_TYPE_FAT16:
dir_entry->first_cluster = PED_CPU_TO_LE16 (cluster);
break;
-
+
case FAT_TYPE_FAT32:
dir_entry->first_cluster
= PED_CPU_TO_LE16 (cluster & 0xffff);
@@ -323,7 +323,7 @@ fat_dir_entry_has_first_cluster (FatDirEntry* dir_entry, PedFileSystem* fs)
{
FatSpecific* fs_info = FAT_SPECIFIC (fs);
FatCluster first_cluster;
-
+
if (!fat_dir_entry_is_file (dir_entry)
&& !fat_dir_entry_is_directory (dir_entry))
return 0;
diff --git a/libparted/fs/hfs/DOC b/libparted/fs/hfs/DOC
index d39b10b..9ee8b4d 100644
--- a/libparted/fs/hfs/DOC
+++ b/libparted/fs/hfs/DOC
@@ -6,7 +6,7 @@ might also be there in 2.6, there is of course no warranty)
---
- Technical doc about Apple HFS and HFS+ file systems is available at :
+ Technical doc about Apple HFS and HFS+ file systems is available at :
* For HFS, section "Data Organization on Volumes",
"Chapter 2 - File Manager"
of the book "Inside Macintosh: Files"
@@ -16,7 +16,7 @@ might also be there in 2.6, there is of course no warranty)
Some useful HFS precisions concerning alignement, bit ordering, and
order of fields for extent key comparaisons are only in the HFS+ TN
-
+
These Apple Creator Codes are reserved for us :
Shnk traP GP16 GnuP PH+x Xpnd Resz GP17 GP18 GP19 GP20
@@ -26,10 +26,10 @@ might also be there in 2.6, there is of course no warranty)
Versions before HFS Patch 15 were very slow when data relocation was needed,
because every extent to relocate involved scanning the whole file system,
-looking for a reference to its physical position on the volume (this was a
+looking for a reference to its physical position on the volume (this was a
dummy algorithm, I know :)
-HFS Patch 16 introduced a cache that allows to efficiently retrieve the place
+HFS Patch 16 introduced a cache that allows to efficiently retrieve the place
of the reference in the file system given the physical position of an extent.
The cache is designed for : - efficiency
- scaling
@@ -47,15 +47,15 @@ will just need a very special amount of RAM (on typical systems about
(# of files) * 20 bytes. With very few files it's about (FS Size) / 1024 / 256.
At the beginning of the resize process, the cache is filed by scanning the FS.
-The position of each extent is cut into 2 parts : high order is used as
+The position of each extent is cut into 2 parts : high order is used as
an index into a table of pointer to a linked list which contains :
- the next ptr (sizeof struct *)
- the extent start (4 bytes)
- the extent size (4 bytes)
- number of BTree block or 0 if in prim (4 bytes)
-- offset of the extent start reference
+- offset of the extent start reference
from the block beginning (2 bytes)
-- sectors by BTree block, or
+- sectors by BTree block, or
1 for VH/MDB (1 byte)
- FS special file / primary structure
where the extent reference is stored (1 byte)
diff --git a/libparted/fs/hfs/HISTORY b/libparted/fs/hfs/HISTORY
index e4c4b52..5e138a6 100644
--- a/libparted/fs/hfs/HISTORY
+++ b/libparted/fs/hfs/HISTORY
@@ -37,7 +37,7 @@
-Mark out of volume blocks as used
(improve compatibility with broken HFS+ Linux
implementation)
- WARNING : this fix is not 100% tn1150 compatible :
+ WARNING : this fix is not 100% tn1150 compatible :
"The allocation file may be larger than the minimum
number of bits required for the given volume size.
Any unused bits in the bitmap must be set to _zero_."
@@ -45,11 +45,11 @@
previous implementations
Maybe I should ask Apple to change the specifications
-HISTORY, DOC and TODO files 29-04-2004
-12 Corrected a bug in hfsplus_volume_resize : size of alloc
+12 Corrected a bug in hfsplus_volume_resize : size of alloc
bitmap could be miscalculated 29-04-2004
--------------------- PATCH FOR PARTED 1.6.12 ----------------------------
13-Finally partial rewrite of *_search_move_*
- Easier to maintain and prepare for extent search and
+ Easier to maintain and prepare for extent search and
relocation algorithm changes for better ones.
-"An extent has not been relocated!" message now only when
relocation requested
@@ -108,7 +108,7 @@
now generate an error if file_ID or type mismatch after the
first pass
Also check return value of ped_malloc
- -Bugfix: in hfsplus_btree_search, check return value of ped_malloc
+ -Bugfix: in hfsplus_btree_search, check return value of ped_malloc
29-09-2004
---------------- INTEGRATION IN PARTED 1.6.22 (cvs) ----------------------
Futur changes will be described in ../../ChangeLog
diff --git a/libparted/fs/hfs/TODO b/libparted/fs/hfs/TODO
index 13bca9c..6e408e3 100644
--- a/libparted/fs/hfs/TODO
+++ b/libparted/fs/hfs/TODO
@@ -6,12 +6,12 @@
* write doc, website, ... -- (high)
* Check block allocation in linux 2.4 and remove
compatibility code if possible -- (high)
-
+
* In hfs(plus)_btree_search , use a static variable to detect
illegal recursion and abort in that case. (find the right
number of recursion before reporting bug) -- easy -- (medium)
* Finish the HFS Extractor -- (medium)
- (add mdb & vh extraction, and maybe journal)
+ (add mdb & vh extraction, and maybe journal)
* Write code to allow enlarging and moving HFS[+x] -- (low)
* Use a bitmap to internaly store the bad blocks -- (low)
diff --git a/libparted/fs/hfs/advfs.c b/libparted/fs/hfs/advfs.c
index 25d5844..d395ed9 100644
--- a/libparted/fs/hfs/advfs.c
+++ b/libparted/fs/hfs/advfs.c
@@ -54,7 +54,7 @@ hfs_extent_key_cmp(HfsPrivateGenericKey* a, HfsPrivateGenericKey* b)
/* 0xFFFFFFFF > 1 !!! (this is the 2.4 bug) */
if (key1->file_ID != key2->file_ID)
return PED_BE32_TO_CPU(key1->file_ID) <
- PED_BE32_TO_CPU(key2->file_ID) ?
+ PED_BE32_TO_CPU(key2->file_ID) ?
-1 : +1;
if (key1->type != key2->type)
@@ -64,7 +64,7 @@ hfs_extent_key_cmp(HfsPrivateGenericKey* a, HfsPrivateGenericKey* b)
return 0;
/* the whole thing wont work with 16 bits ints */
/* anyway */
- return (int)( PED_BE16_TO_CPU(key1->start) -
+ return (int)( PED_BE16_TO_CPU(key1->start) -
PED_BE16_TO_CPU(key2->start) );
}
@@ -133,7 +133,7 @@ hfs_btree_search (HfsPrivateFile* b_tree_file, HfsPrivateGenericKey* key,
if (!hfs_file_read_sector(b_tree_file, node,
node_number))
return 0;
- } else
+ } else
break;
}
@@ -178,7 +178,7 @@ hfs_read_bad_blocks (const PedFileSystem *fs)
return 1;
{
- uint8_t record[sizeof (HfsExtentKey)
+ uint8_t record[sizeof (HfsExtentKey)
+ sizeof (HfsExtDataRec)];
HfsExtentKey search;
HfsExtentKey* ret_key = (HfsExtentKey*) record;
@@ -248,7 +248,7 @@ hfs_is_bad_block (const PedFileSystem *fs, unsigned int fblock)
for (walk = priv_data->bad_blocks_xtent_list; walk; walk = walk->next) {
/* Won't compile without the strange cast ! gcc bug ? */
/* or maybe C subtilties... */
- if ((fblock >= PED_BE16_TO_CPU (walk->extent.start_block)) &&
+ if ((fblock >= PED_BE16_TO_CPU (walk->extent.start_block)) &&
(fblock < (unsigned int) (PED_BE16_TO_CPU (
walk->extent.start_block)
+ PED_BE16_TO_CPU (
diff --git a/libparted/fs/hfs/advfs_plus.c b/libparted/fs/hfs/advfs_plus.c
index 75bf964..0771c9c 100644
--- a/libparted/fs/hfs/advfs_plus.c
+++ b/libparted/fs/hfs/advfs_plus.c
@@ -48,7 +48,7 @@ hfsplus_extent_key_cmp(HfsPPrivateGenericKey* a, HfsPPrivateGenericKey* b)
if (key1->file_ID != key2->file_ID)
return PED_BE32_TO_CPU(key1->file_ID) <
- PED_BE32_TO_CPU(key2->file_ID) ?
+ PED_BE32_TO_CPU(key2->file_ID) ?
-1 : +1;
if (key1->type != key2->type)
@@ -56,7 +56,7 @@ hfsplus_extent_key_cmp(HfsPPrivateGenericKey* a, HfsPPrivateGenericKey* b)
if (key1->start == key2->start)
return 0;
- return PED_BE32_TO_CPU(key1->start) <
+ return PED_BE32_TO_CPU(key1->start) <
PED_BE32_TO_CPU(key2->start) ?
-1 : +1;
}
@@ -139,7 +139,7 @@ hfsplus_btree_search (HfsPPrivateFile* b_tree_file, HfsPPrivateGenericKey* key,
free (node);
return 0;
}
- } else
+ } else
break;
}
@@ -257,7 +257,7 @@ hfsplus_is_bad_block (const PedFileSystem *fs, unsigned int fblock)
for (walk = priv_data->bad_blocks_xtent_list; walk; walk = walk->next) {
/* Won't compile without the strange cast ! gcc bug ? */
/* or maybe C subtilties... */
- if ((fblock >= PED_BE32_TO_CPU (walk->extent.start_block)) &&
+ if ((fblock >= PED_BE32_TO_CPU (walk->extent.start_block)) &&
(fblock < (unsigned int)(PED_BE32_TO_CPU (
walk->extent.start_block)
+ PED_BE32_TO_CPU (walk->extent.block_count))))
@@ -334,9 +334,9 @@ hfsplus_get_min_size (const PedFileSystem *fs)
hfs_sect_block =
PED_BE32_TO_CPU (hfs_priv_data->mdb->block_size)
/ PED_SECTOR_SIZE_DEFAULT;
- /*
+ /*
* if hfs+ is embedded in an hfs wrapper then the new size is :
- * the new size of the hfs+ volume rounded up to the size
+ * the new size of the hfs+ volume rounded up to the size
* of hfs blocks
* + the minimum size of the hfs wrapper without any hfs+
* modification
diff --git a/libparted/fs/hfs/cache.c b/libparted/fs/hfs/cache.c
index a330259..373d79f 100644
--- a/libparted/fs/hfs/cache.c
+++ b/libparted/fs/hfs/cache.c
@@ -140,9 +140,9 @@ hfsc_cache_add_extent(HfsCPrivateCache* cache, uint32_t start, uint32_t length,
return NULL;
}
- if ( cache->last_table->table_first_free
+ if ( cache->last_table->table_first_free
== cache->last_table->table_size ) {
- cache->last_table->next_cache =
+ cache->last_table->next_cache =
hfsc_new_cachetable( ( cache->first_cachetable_size
/ CR_NEW_ALLOC_DIV )
+ CR_ADD_CST );
diff --git a/libparted/fs/hfs/cache.h b/libparted/fs/hfs/cache.h
index 8e1b921..59b5ba9 100644
--- a/libparted/fs/hfs/cache.h
+++ b/libparted/fs/hfs/cache.h
@@ -47,10 +47,10 @@
/* tuning */
#define CR_SHIFT 8 /* number of bits to shift start_block by */
/* to get the index of the linked list */
-#define CR_OVER_DIV 16 /* alloc a table for (1+1/CR_OVER_DIV) *
+#define CR_OVER_DIV 16 /* alloc a table for (1+1/CR_OVER_DIV) *
file_number + CR_ADD_CST */
#define CR_ADD_CST 16
-#define CR_NEW_ALLOC_DIV 4 /* divide the size of the first alloc table
+#define CR_NEW_ALLOC_DIV 4 /* divide the size of the first alloc table
by this value to allocate next tables */
/* See DOC for an explaination of this structure */
@@ -77,7 +77,7 @@ struct _HfsCPrivateCacheTable {
};
typedef struct _HfsCPrivateCacheTable HfsCPrivateCacheTable;
-/* Internaly used by cache.c for custom memory managment
+/* Internaly used by cache.c for custom memory managment
and cache handling only */
struct _HfsCPrivateCache {
HfsCPrivateCacheTable* table_list;
diff --git a/libparted/fs/hfs/file.c b/libparted/fs/hfs/file.c
index 87b61f6..11fc90b 100644
--- a/libparted/fs/hfs/file.c
+++ b/libparted/fs/hfs/file.c
@@ -52,7 +52,7 @@ hfs_file_open (PedFileSystem *fs, uint32_t CNID,
file->CNID = CNID;
memcpy(file->first, ext_desc, sizeof (HfsExtDataRec));
file->start_cache = 0;
-
+
return file;
}
@@ -82,7 +82,7 @@ hfs_get_extent_containing (HfsPrivateFile* file, unsigned int block,
search.file_ID = file->CNID;
search.start = PED_CPU_TO_BE16 (block);
- if (!hfs_btree_search (priv_data->extent_file,
+ if (!hfs_btree_search (priv_data->extent_file,
(HfsPrivateGenericKey*) &search,
record, sizeof (record), NULL))
return 0;
@@ -207,7 +207,7 @@ hfs_file_write_sector (HfsPrivateFile* file, void *buf, PedSector sector)
PED_EXCEPTION_ERROR,
PED_EXCEPTION_CANCEL,
_("Trying to write HFS file with CNID %X behind EOF."),
- PED_BE32_TO_CPU(file->CNID));
+ PED_BE32_TO_CPU(file->CNID));
return 0;
}
diff --git a/libparted/fs/hfs/hfs.c b/libparted/fs/hfs/hfs.c
index 2c9aa7d..654bd28 100644
--- a/libparted/fs/hfs/hfs.c
+++ b/libparted/fs/hfs/hfs.c
@@ -16,8 +16,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- Author : Guillaume Knispel <k_guillaume@libertysurf.fr>
+/*
+ Author : Guillaume Knispel <k_guillaume@libertysurf.fr>
Report bug to <bug-parted@gnu.org>
*/
@@ -68,7 +68,7 @@ hfs_clobber (PedGeometry* geom)
uint8_t buf[PED_SECTOR_SIZE_DEFAULT];
memset (buf, 0, PED_SECTOR_SIZE_DEFAULT);
-
+
/* destroy boot blocks, mdb, alternate mdb ... */
return (!!ped_geometry_write (geom, buf, 0, 1)) &
(!!ped_geometry_write (geom, buf, 1, 1)) &
@@ -92,7 +92,7 @@ hfs_open (PedGeometry* geom)
/* Read MDB */
if (!ped_geometry_read (geom, buf, 2, 1))
return NULL;
-
+
/* Allocate memory */
fs = (PedFileSystem*) ped_malloc (sizeof (PedFileSystem));
if (!fs) goto ho;
@@ -165,7 +165,7 @@ hfs_close (PedFileSystem *fs)
return 1;
}
-static PedConstraint*
+static PedConstraint*
hfs_get_resize_constraint (const PedFileSystem *fs)
{
PedDevice* dev = fs->geom->dev;
@@ -289,7 +289,7 @@ hfs_resize (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
SET_BLOC_OCCUPATION(priv_data->alloc_map,block);
/* save the allocation map
- I do not write until start of allocation blocks
+ I do not write until start of allocation blocks
but only until pre-resize end of bitmap blocks
because the specifications do _not_ assert that everything
until allocation blocks is boot, mdb and alloc */
@@ -360,7 +360,7 @@ hfsplus_clobber (PedGeometry* geom)
(PedSector) geom->start
+ PED_BE16_TO_CPU (mdb->start_block)
+ (PedSector) PED_BE16_TO_CPU (
- mdb->old_new.embedded.location.start_block ) * i,
+ mdb->old_new.embedded.location.start_block ) * i,
(PedSector) PED_BE16_TO_CPU (
mdb->old_new.embedded.location.block_count ) * i );
if (!embedded) i = 0;
@@ -523,7 +523,7 @@ hfsplus_open (PedGeometry* geom)
/ PED_SECTOR_SIZE_DEFAULT);
if (!priv_data->attributes_file) goto hpo_cc;
- map_sectors = ( PED_BE32_TO_CPU (vh->total_blocks)
+ map_sectors = ( PED_BE32_TO_CPU (vh->total_blocks)
+ PED_SECTOR_SIZE_DEFAULT * 8 - 1 )
/ (PED_SECTOR_SIZE_DEFAULT * 8);
priv_data->dirty_alloc_map = (uint8_t*)
@@ -568,7 +568,7 @@ hpo_fs: free(fs);
hpo: return NULL;
}
-static PedConstraint*
+static PedConstraint*
hfsplus_get_resize_constraint (const PedFileSystem *fs)
{
PedDevice* dev = fs->geom->dev;
@@ -628,7 +628,7 @@ hfsplus_volume_resize (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
ped_timer_set_state_name(timer, _("shrinking"));
ped_timer_update(timer, 0.0);
/* relocate data */
- to_free = ( priv_data->plus_geom->length
+ to_free = ( priv_data->plus_geom->length
- geom->length + hfsp_sect_block
- 1 ) / hfsp_sect_block;
block = hfsplus_find_start_pack (fs, to_free);
@@ -644,7 +644,7 @@ hfsplus_volume_resize (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
/* Calculate new block number and other VH field */
/* nblock must be rounded _down_ */
nblock = geom->length / hfsp_sect_block;
- nfree = PED_BE32_TO_CPU (vh->free_blocks)
+ nfree = PED_BE32_TO_CPU (vh->free_blocks)
- (old_blocks - nblock);
/* free block readjustement is only needed when incorrect nblock
was used by my previous implementation, so detect the case */
@@ -829,7 +829,7 @@ hfsplus_wrapper_update (PedFileSystem* fs)
PED_BE16_TO_CPU (
hfs_priv_data->mdb->volume_bitmap_block ),
( PED_BE16_TO_CPU (
- hfs_priv_data->mdb->total_blocks )
+ hfs_priv_data->mdb->total_blocks )
+ PED_SECTOR_SIZE_DEFAULT * 8 - 1 )
/ (PED_SECTOR_SIZE_DEFAULT * 8)))
return 0;
@@ -859,7 +859,7 @@ hfsplus_wrapper_update (PedFileSystem* fs)
while (ret_key->type == key.type && ret_key->file_ID == key.file_ID) {
for (i = 0; i < HFS_EXT_NB; i++) {
- if ( ret_data[i].start_block
+ if ( ret_data[i].start_block
== hfs_priv_data->mdb->old_new
.embedded.location.start_block) {
ret_data[i].block_count =
@@ -915,7 +915,7 @@ hfsplus_resize (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
/* check preconditions */
PED_ASSERT (fs != NULL, return 0);
- PED_ASSERT (fs->geom != NULL, return 0);
+ PED_ASSERT (fs->geom != NULL, return 0);
PED_ASSERT (geom != NULL, return 0);
PED_ASSERT (fs->geom->dev == geom->dev, return 0);
#ifdef DEBUG
@@ -1133,7 +1133,7 @@ hfsplus_extract_file(const char* filename, HfsPPrivateFile* hfsp_file)
for (rem_sect = hfsp_file->sect_nb; rem_sect; rem_sect -= cp_sect) {
cp_sect = rem_sect < BLOCK_MAX_BUFF ? rem_sect : BLOCK_MAX_BUFF;
- if (!hfsplus_file_read(hfsp_file, extract_buffer,
+ if (!hfsplus_file_read(hfsp_file, extract_buffer,
hfsp_file->sect_nb - rem_sect, cp_sect))
goto err_close;
if (!fwrite (extract_buffer, cp_sect * PED_SECTOR_SIZE_DEFAULT,
diff --git a/libparted/fs/hfs/hfs.h b/libparted/fs/hfs/hfs.h
index e73cd95..be5f299 100644
--- a/libparted/fs/hfs/hfs.h
+++ b/libparted/fs/hfs/hfs.h
@@ -334,29 +334,29 @@ struct __attribute__ ((packed)) _HfsPVolumeHeader {
uint32_t attributes;
uint32_t last_mounted_version;
uint32_t journal_info_block;
-
+
uint32_t create_date;
uint32_t modify_date;
uint32_t backup_date;
uint32_t checked_date;
-
+
uint32_t file_count;
uint32_t dir_count;
-
+
uint32_t block_size;
uint32_t total_blocks;
uint32_t free_blocks;
-
+
uint32_t next_allocation;
uint32_t res_clump_size;
uint32_t data_clump_size;
HfsPNodeID next_catalog_ID;
-
+
uint32_t write_count;
uint64_t encodings_bitmap;
-
+
uint8_t finder_info[32];
-
+
HfsPForkData allocation_file;
HfsPForkData extents_file;
HfsPForkData catalog_file;
@@ -388,7 +388,7 @@ struct __attribute__ ((packed)) _HfsPHeaderRecord {
uint32_t total_nodes;
uint32_t free_nodes; /* same as hfs btree until here */
uint16_t reserved1;
-
+
uint32_t clump_size;
uint8_t btree_type; /* must be 0 for HFS+ B-Tree */
uint8_t key_compare_type; /* hfsx => 0xCF = case folding */
@@ -440,7 +440,7 @@ struct __attribute__ ((packed)) _HfsPFile {
int8_t FXInfo[16]; /* used by Finder, handle as reserved */
uint32_t text_encoding;
uint32_t reserved2;
-
+
HfsPForkData data_fork;
HfsPForkData res_fork;
};
diff --git a/libparted/fs/hfs/journal.c b/libparted/fs/hfs/journal.c
index eaae69b..1d4d2df 100644
--- a/libparted/fs/hfs/journal.c
+++ b/libparted/fs/hfs/journal.c
@@ -114,7 +114,7 @@ hfsj_journal_read(PedGeometry* geom, HfsJJournalHeader* jh,
read_sect++;
if (read_sect == journ_length)
read_sect = 1; /* skip journal header
- which is asserted to be
+ which is asserted to be
1 sector long */
}
@@ -144,7 +144,7 @@ hfsj_replay_transaction(PedFileSystem* fs, HfsJJournalHeader* jh,
start = hfsj_journal_read(priv_data->plus_geom, jh, jsector,
jlength, start, blhdr_nbsect, blhdr);
if (!start) goto err_replay;
-
+
cksum = HFS_32_TO_CPU(blhdr->checksum, is_le);
blhdr->checksum = 0;
if (cksum!=hfsj_calc_checksum((uint8_t*)blhdr, sizeof(*blhdr))){
@@ -155,7 +155,7 @@ hfsj_replay_transaction(PedFileSystem* fs, HfsJJournalHeader* jh,
goto err_replay;
}
blhdr->checksum = HFS_CPU_TO_32(cksum, is_le);
-
+
for (i=1; i < HFS_16_TO_CPU(blhdr->num_blocks, is_le); ++i) {
size = HFS_32_TO_CPU(blhdr->binfo[i].bsize, is_le);
sector = HFS_64_TO_CPU(blhdr->binfo[i].bnum, is_le);
@@ -241,10 +241,10 @@ hfsj_replay_journal(PedFileSystem* fs)
if (!ped_geometry_read(priv_data->plus_geom, buf, sector, 1))
return 0;
jib = (HfsJJournalInfoBlock*) buf;
-
+
if ( (jib->flags & PED_CPU_TO_BE32(1 << HFSJ_JOURN_IN_FS))
&& !(jib->flags & PED_CPU_TO_BE32(1 << HFSJ_JOURN_OTHER_DEV)) ) {
- priv_data->jl_start_block = HFS_64_TO_CPU(jib->offset, is_le)
+ priv_data->jl_start_block = HFS_64_TO_CPU(jib->offset, is_le)
/ ( PED_SECTOR_SIZE_DEFAULT * binsect );
}
@@ -322,7 +322,7 @@ hfsj_replay_journal(PedFileSystem* fs)
_("The sector size stored in the journal is not 512 "
"bytes. Parted only supports 512 bytes length "
"sectors."));
- return 0;
+ return 0;
}
cksum = HFS_32_TO_CPU(jh->checksum, is_le);
diff --git a/libparted/fs/hfs/probe.c b/libparted/fs/hfs/probe.c
index 4da4594..aea0961 100644
--- a/libparted/fs/hfs/probe.c
+++ b/libparted/fs/hfs/probe.c
@@ -172,9 +172,9 @@ hfs_probe (PedGeometry* geom)
{
PedGeometry* geom_base;
PedGeometry* geom_plus = NULL;
-
+
PED_ASSERT (geom != NULL, return NULL);
-
+
if (!hfsc_can_use_geom (geom))
return NULL;
diff --git a/libparted/fs/hfs/reloc.c b/libparted/fs/hfs/reloc.c
index e07936c..3435802 100644
--- a/libparted/fs/hfs/reloc.c
+++ b/libparted/fs/hfs/reloc.c
@@ -76,7 +76,7 @@ hfs_effect_move_extent (PedFileSystem *fs, unsigned int *ptr_fblock,
}
ok = (stop-start == size);
}
-
+
/* Forward search */
/* 1 pass relocation in the gap merged with 2 pass reloc after source */
if (!ok && *ptr_to_fblock != *ptr_fblock) {
@@ -96,7 +96,7 @@ hfs_effect_move_extent (PedFileSystem *fs, unsigned int *ptr_fblock,
unsigned int j;
unsigned int start_block =
PED_BE16_TO_CPU (priv_data->mdb->start_block );
- unsigned int block_sz =
+ unsigned int block_sz =
(PED_BE32_TO_CPU (priv_data->mdb->block_size)
/ PED_SECTOR_SIZE_DEFAULT);
@@ -190,7 +190,7 @@ hfs_do_move (PedFileSystem* fs, unsigned int *ptr_src,
HfsCPrivateExtent* move;
int new_start;
- new_start = hfs_effect_move_extent (fs, ptr_src, ptr_dest,
+ new_start = hfs_effect_move_extent (fs, ptr_src, ptr_dest,
ref->ext_length);
if (new_start == -1) return -1;
@@ -200,13 +200,13 @@ hfs_do_move (PedFileSystem* fs, unsigned int *ptr_src,
/******** MDB *********/
case CR_PRIM_CAT :
priv_data->catalog_file
- ->first[ref->ref_index].start_block =
+ ->first[ref->ref_index].start_block =
PED_CPU_TO_BE16(new_start);
goto CR_PRIM;
case CR_PRIM_EXT :
priv_data->extent_file
- ->first[ref->ref_index].start_block =
- PED_CPU_TO_BE16(new_start);
+ ->first[ref->ref_index].start_block =
+ PED_CPU_TO_BE16(new_start);
CR_PRIM :
extent = ( HfsExtDescriptor* )
( (uint8_t*)priv_data->mdb + ref->ref_offset );
@@ -287,12 +287,12 @@ hfs_save_allocation(PedFileSystem* fs)
/* Generic search thanks to the file system cache */
static int
hfs_move_extent_starting_at (PedFileSystem *fs, unsigned int *ptr_fblock,
- unsigned int *ptr_to_fblock,
+ unsigned int *ptr_to_fblock,
HfsCPrivateCache* cache)
{
HfsCPrivateExtent* ref;
unsigned int old_start, new_start;
-
+
/* Reference search powered by the cache... */
/* This is the optimisation secret :) */
ref = hfsc_cache_search_extent(cache, *ptr_fblock);
@@ -405,7 +405,7 @@ hfs_cache_from_catalog(HfsCPrivateCache* cache, PedFileSystem* fs,
/* check for obvious error in FS */
if (((uint8_t*)catalog_key - node < HFS_FIRST_REC)
|| ((uint8_t*)catalog_data - node
- >= PED_SECTOR_SIZE_DEFAULT
+ >= PED_SECTOR_SIZE_DEFAULT
- 2 * (signed)(record_number+1))) {
ped_exception_throw (
PED_EXCEPTION_ERROR,
@@ -498,7 +498,7 @@ hfs_cache_from_extent(HfsCPrivateCache* cache, PedFileSystem* fs,
+ sizeof (HfsExtentKey));
/* check for obvious error in FS */
if (((uint8_t*)extent_key - node < HFS_FIRST_REC)
- || ((uint8_t*)extent - node
+ || ((uint8_t*)extent - node
>= PED_SECTOR_SIZE_DEFAULT
- 2 * (signed)(record_number+1))) {
ped_exception_throw (
diff --git a/libparted/fs/hfs/reloc_plus.c b/libparted/fs/hfs/reloc_plus.c
index 3a13b37..e9966b6 100644
--- a/libparted/fs/hfs/reloc_plus.c
+++ b/libparted/fs/hfs/reloc_plus.c
@@ -80,7 +80,7 @@ hfsplus_effect_move_extent (PedFileSystem *fs, unsigned int *ptr_fblock,
}
ok = (stop-start == size);
}
-
+
/* Forward search */
/* 1 pass relocation in the gap merged with 2 pass reloc after source */
if (!ok && *ptr_to_fblock != *ptr_fblock) {
@@ -195,13 +195,13 @@ hfsplus_do_move (PedFileSystem* fs, unsigned int *ptr_src,
ref->ext_length);
if (new_start == -1) return -1;
-
+
if (ref->ext_start != (unsigned) new_start) {
switch (ref->where) {
/************ VH ************/
case CR_PRIM_CAT :
priv_data->catalog_file
- ->first[ref->ref_index].start_block =
+ ->first[ref->ref_index].start_block =
PED_CPU_TO_BE32(new_start);
goto CR_PRIM;
case CR_PRIM_EXT :
@@ -283,7 +283,7 @@ hfsplus_do_move (PedFileSystem* fs, unsigned int *ptr_src,
CR_BTREE :
PED_ASSERT(PED_SECTOR_SIZE_DEFAULT * ref->sect_by_block
> ref->ref_offset, return -1 );
- if (!hfsplus_file_read(file, hfsp_block,
+ if (!hfsplus_file_read(file, hfsp_block,
(PedSector)ref->ref_block * ref->sect_by_block,
ref->sect_by_block))
return -1;
@@ -327,11 +327,11 @@ hfsplus_save_allocation(PedFileSystem *fs)
unsigned int map_sectors, i, j;
int ret = 1;
- map_sectors = ( PED_BE32_TO_CPU (priv_data->vh->total_blocks)
+ map_sectors = ( PED_BE32_TO_CPU (priv_data->vh->total_blocks)
+ PED_SECTOR_SIZE_DEFAULT * 8 - 1 ) / (PED_SECTOR_SIZE_DEFAULT * 8);
for (i = 0; i < map_sectors;) {
- for (j = i;
+ for (j = i;
(TST_BLOC_OCCUPATION(priv_data->dirty_alloc_map,j));
++j)
CLR_BLOC_OCCUPATION(priv_data->dirty_alloc_map,j);
@@ -658,7 +658,7 @@ hfsplus_cache_from_extent(HfsCPrivateCache* cache, PedFileSystem* fs,
free (node);
return -1;
}
-
+
switch (extent_key->file_ID) {
case PED_CPU_TO_BE32 (HFS_XTENT_ID) :
if (ped_exception_throw (
@@ -687,7 +687,7 @@ hfsplus_cache_from_extent(HfsCPrivateCache* cache, PedFileSystem* fs,
where = CR_BTREE_EXT_0;
break;
}
-
+
for (j = 0; j < HFSP_EXT_NB; ++j) {
if (!extent[j].block_count) break;
if (!hfsc_cache_add_extent(
@@ -706,7 +706,7 @@ hfsplus_cache_from_extent(HfsCPrivateCache* cache, PedFileSystem* fs,
}
}
}
-
+
free (node);
return 1;
}
diff --git a/libparted/fs/jfs/jfs_superblock.h b/libparted/fs/jfs/jfs_superblock.h
index 71fe3f1..ea13dfb 100644
--- a/libparted/fs/jfs/jfs_superblock.h
+++ b/libparted/fs/jfs/jfs_superblock.h
@@ -3,9 +3,9 @@
*
* 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
- * the Free Software Foundation; either version 3 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
@@ -30,8 +30,8 @@
#define LV_NAME_SIZE 11 /* MUST BE 11 for OS/2 boot sector */
-/*
- * aggregate superblock
+/*
+ * aggregate superblock
*
* The name superblock is too close to super_block, so the name has been
* changed to jfs_superblock. The utilities are still using the old name.
@@ -48,7 +48,7 @@ struct jfs_superblock
s64 s_size; /* 8: aggregate size in hardware/LVM blocks;
* VFS: number of blocks
*/
- s32 s_bsize; /* 4: aggregate block size in bytes;
+ s32 s_bsize; /* 4: aggregate block size in bytes;
* VFS: fragment size
*/
s16 s_l2bsize; /* 2: log2 of s_bsize */
@@ -62,7 +62,7 @@ struct jfs_superblock
u32 s_flag; /* 4: aggregate attributes:
* see jfs_filsys.h
*/
- u32 s_state; /* 4: mount/unmount/recovery state:
+ u32 s_state; /* 4: mount/unmount/recovery state:
* see jfs_filsys.h
*/
s32 s_compress; /* 4: > 0 if data compression */
@@ -83,11 +83,11 @@ struct jfs_superblock
struct timestruc_t s_time; /* 8: time last updated */
s32 s_fsckloglen; /* 4: Number of file system blocks reserved for
- * the fsck service log.
+ * the fsck service log.
* N.B. These blocks are divided among the
* versions kept. This is not a per
* version size.
- * N.B. These blocks are included in the
+ * N.B. These blocks are included in the
* length field of s_fsckpxd.
*/
s8 s_fscklog; /* 1: which fsck service log is most recent
@@ -95,7 +95,7 @@ struct jfs_superblock
* 1 => the first one
* 2 => the 2nd one
*/
- char s_fpack[11]; /* 11: file system volume name
+ char s_fpack[11]; /* 11: file system volume name
* N.B. This must be 11 bytes to
* conform with the OS/2 BootSector
* requirements
@@ -108,7 +108,7 @@ struct jfs_superblock
/* - 128 byte boundary - */
/*
- * DFS VFS support (preliminary)
+ * DFS VFS support (preliminary)
*/
char s_attach; /* 1: VFS: flag: set when aggregate is attached
*/
@@ -117,22 +117,22 @@ struct jfs_superblock
u64 totalUsable; /* 8: VFS: total of 1K blocks which are
* available to "normal" (non-root) users.
*/
- u64 minFree; /* 8: VFS: # of 1K blocks held in reserve for
+ u64 minFree; /* 8: VFS: # of 1K blocks held in reserve for
* exclusive use of root. This value can be 0,
- * and if it is then totalUsable will be equal
+ * and if it is then totalUsable will be equal
* to # of blocks in aggregate. I believe this
* means that minFree + totalUsable = # blocks.
- * In that case, we don't need to store both
+ * In that case, we don't need to store both
* totalUsable and minFree since we can compute
- * one from the other. I would guess minFree
- * would be the one we should store, and
- * totalUsable would be the one we should
+ * one from the other. I would guess minFree
+ * would be the one we should store, and
+ * totalUsable would be the one we should
* compute. (Just a guess...)
*/
- u64 realFree; /* 8: VFS: # of free 1K blocks can be used by
+ u64 realFree; /* 8: VFS: # of free 1K blocks can be used by
* "normal" users. It may be this is something
- * we should compute when asked for instead of
+ * we should compute when asked for instead of
* storing in the superblock. I don't know how
* often this information is needed.
*/
diff --git a/libparted/fs/linux_swap/linux_swap.c b/libparted/fs/linux_swap/linux_swap.c
index b89a0a2..16b869a 100644
--- a/libparted/fs/linux_swap/linux_swap.c
+++ b/libparted/fs/linux_swap/linux_swap.c
@@ -574,7 +574,7 @@ swap_get_create_constraint (const PedDevice* dev)
if (!ped_geometry_init (&full_dev, dev, 0, dev->length - 1))
return NULL;
-
+
return ped_constraint_new (ped_alignment_any, ped_alignment_any,
&full_dev, &full_dev,
getpagesize() / 512, dev->length);
diff --git a/libparted/fs/ntfs/ntfs.c b/libparted/fs/ntfs/ntfs.c
index e4c85d2..76a10ce 100644
--- a/libparted/fs/ntfs/ntfs.c
+++ b/libparted/fs/ntfs/ntfs.c
@@ -67,7 +67,7 @@ static PedFileSystemOps ntfs_ops = {
clobber: ntfs_clobber,
#else
clobber: NULL,
-#endif
+#endif
open: NULL,
create: NULL,
close: NULL,
diff --git a/libparted/fs/reiserfs/geom_dal.c b/libparted/fs/reiserfs/geom_dal.c
index 20653f7..3eeb7cc 100644
--- a/libparted/fs/reiserfs/geom_dal.c
+++ b/libparted/fs/reiserfs/geom_dal.c
@@ -27,8 +27,8 @@
static blk_t __len(dal_t *dal) {
PED_ASSERT(dal != NULL, return 0);
-
- return ((PedGeometry *)dal->dev)->length /
+
+ return ((PedGeometry *)dal->dev)->length /
(dal->block_size / PED_SECTOR_SIZE_DEFAULT);
}
@@ -36,13 +36,13 @@ static int __read(dal_t *dal, void *buff, blk_t block, blk_t count) {
blk_t k;
PedSector block_pos;
PedSector block_count;
-
+
PED_ASSERT(dal != NULL, return 0);
-
+
k = dal->block_size / PED_SECTOR_SIZE_DEFAULT;
block_pos = (PedSector)(block * k);
block_count = (PedSector)(count * k);
-
+
return ped_geometry_read((PedGeometry *)dal->dev, buff, block_pos, block_count);
}
@@ -50,14 +50,14 @@ static int __write(dal_t *dal, void *buff, blk_t block, blk_t count) {
blk_t k;
PedSector block_pos;
PedSector block_count;
-
+
PED_ASSERT(dal != NULL, return 0);
-
+
k = dal->block_size / PED_SECTOR_SIZE_DEFAULT;
block_pos = (PedSector)(block * k);
block_count = (PedSector)(count * k);
-
- return ped_geometry_write((PedGeometry *)dal->dev, buff, block_pos,
+
+ return ped_geometry_write((PedGeometry *)dal->dev, buff, block_pos,
block_count);
}
@@ -75,15 +75,15 @@ static int __equals(dal_t *dal1, dal_t *dal2) {
PED_ASSERT(dal1 != NULL, return 0);
PED_ASSERT(dal2 != NULL, return 0);
- return ped_geometry_test_equal((PedGeometry *)dal1->dev,
+ return ped_geometry_test_equal((PedGeometry *)dal1->dev,
(PedGeometry *)dal2->dev);
}
static int __stat(dal_t *dal, struct stat *st) {
-
+
PED_ASSERT(dal != NULL, return 0);
PED_ASSERT(st != NULL, return 0);
-
+
if (stat(((PedGeometry *)dal->dev)->dev->path, st))
return 0;
@@ -92,27 +92,27 @@ static int __stat(dal_t *dal, struct stat *st) {
static dev_t __dev(dal_t *dal) {
struct stat st;
-
+
if (!__stat(dal, &st))
return (dev_t)0;
-
+
return st.st_dev;
}
static struct dal_ops ops = {
- __len, __read, __write, __sync,
+ __len, __read, __write, __sync,
__flags, __equals, __stat, __dev
};
dal_t *geom_dal_create(PedGeometry *geom, size_t block_size, int flags) {
dal_t *dal;
- if (!geom)
+ if (!geom)
return NULL;
-
+
if (!(dal = ped_malloc(sizeof(dal_t))))
return NULL;
-
+
dal->ops = &ops;
dal->dev = geom;
dal->block_size = block_size;
@@ -126,7 +126,7 @@ int geom_dal_reopen(dal_t *dal, int flags) {
if (!dal) return 0;
dal->flags = flags;
-
+
return 1;
}
diff --git a/libparted/fs/reiserfs/reiserfs.c b/libparted/fs/reiserfs/reiserfs.c
index 664f5d8..3468ed9 100644
--- a/libparted/fs/reiserfs/reiserfs.c
+++ b/libparted/fs/reiserfs/reiserfs.c
@@ -265,8 +265,8 @@ static PedFileSystem *reiserfs_open(PedGeometry *geom)
goto error_fs_geom_free;
/*
- We are passing NULL as DAL for journal. Therefore we let libreiserfs know,
- that journal not available and parted will be working fine for reiserfs
+ We are passing NULL as DAL for journal. Therefore we let libreiserfs know,
+ that journal not available and parted will be working fine for reiserfs
with relocated journal too.
*/
if (!(fs = (PedFileSystem *) ped_malloc(sizeof(PedFileSystem))))
@@ -419,14 +419,14 @@ static int reiserfs_check(PedFileSystem *fs, PedTimer *timer)
#ifdef HAVE_REISERFS_FS_CHECK
ped_timer_reset(timer);
-
+
if (libreiserfs_gauge_create && libreiserfs_gauge_free) {
if (!
(gauge =
libreiserfs_gauge_create(NULL, gauge_handler, timer)))
return 0;
}
-
+
ped_timer_set_state_name(timer, _("checking"));
ped_timer_update(timer, 0.0);
@@ -437,13 +437,13 @@ static int reiserfs_check(PedFileSystem *fs, PedTimer *timer)
"Run reiserfsck --check first."));
return 0;
}
-
+
ped_timer_update(timer, 1.0);
if (gauge)
libreiserfs_gauge_free(gauge);
#endif
-
+
ped_exception_throw(PED_EXCEPTION_INFORMATION, PED_EXCEPTION_OK,
_("The reiserfs file system passed a basic check. "
"For a more comprehensive check, run "
@@ -559,9 +559,9 @@ static PedConstraint *reiserfs_get_resize_constraint(const PedFileSystem *
if (!ped_geometry_init(&start_sector, dev, fs->geom->start, 1))
return NULL;
- /*
- Minsize for reiserfs is area occupied by data blocks and
- metadata blocks minus free space blocks and minus bitmap
+ /*
+ Minsize for reiserfs is area occupied by data blocks and
+ metadata blocks minus free space blocks and minus bitmap
blocks which describes free space blocks.
*/
min_size = reiserfs_fs_min_size(fs_info) *
diff --git a/libparted/fs/reiserfs/reiserfs.h b/libparted/fs/reiserfs/reiserfs.h
index 3cd68c0..c10577e 100644
--- a/libparted/fs/reiserfs/reiserfs.h
+++ b/libparted/fs/reiserfs/reiserfs.h
@@ -98,7 +98,7 @@ typedef void * reiserfs_fs_t;
#define JOURNAL_DEF_RATIO 8
#define JOURNAL_MIN_RATIO 2
#define JOURNAL_MAX_BATCH 900
-#define JOURNAL_MAX_COMMIT_AGE 30
+#define JOURNAL_MAX_COMMIT_AGE 30
#define JOURNAL_MAX_TRANS_AGE 30
#define TEA_HASH 1
diff --git a/libparted/fs/ufs/ufs.c b/libparted/fs/ufs/ufs.c
index 6a39199..5f40d3a 100644
--- a/libparted/fs/ufs/ufs.c
+++ b/libparted/fs/ufs/ufs.c
@@ -138,7 +138,7 @@ struct ufs_super_block {
uint32_t fs_csp[UFS_MAXCSBUFS]; /* list of fs_cs info buffers */
uint32_t fs_maxcluster;
uint32_t fs_cpc; /* cyl per cycle in postbl */
- uint16_t fs_opostbl[16][8]; /* old rotation block list head */
+ uint16_t fs_opostbl[16][8]; /* old rotation block list head */
union {
struct {
int32_t fs_sparecon[53];/* reserved for future constants */
diff --git a/libparted/fs/xfs/xfs_sb.h b/libparted/fs/xfs/xfs_sb.h
index 139cd07..3484145 100644
--- a/libparted/fs/xfs/xfs_sb.h
+++ b/libparted/fs/xfs/xfs_sb.h
@@ -1,31 +1,31 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 3 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_SB_H__
@@ -134,7 +134,7 @@ typedef struct xfs_sb
uint8_t sb_shared_vn; /* shared version number */
xfs_extlen_t sb_inoalignmt; /* inode chunk alignment, fsblocks */
uint32_t sb_unit; /* stripe or raid unit */
- uint32_t sb_width; /* stripe or raid width */
+ uint32_t sb_width; /* stripe or raid width */
uint8_t sb_dirblklog; /* log2 of dir block size (fsbs) */
uint8_t sb_dummy[7]; /* padding */
} xfs_sb_t;
@@ -477,7 +477,7 @@ xfs_daddr_t xfs_fsb_to_daddr(struct xfs_mount *mp, xfs_fsblock_t fsbno);
#define XFS_B_TO_FSB(mp,b) \
((((uint64_t)(b)) + (mp)->m_blockmask) >> (mp)->m_sb.sb_blocklog)
#define XFS_B_TO_FSBT(mp,b) (((uint64_t)(b)) >> (mp)->m_sb.sb_blocklog)
-#define XFS_B_FSB_OFFSET(mp,b) ((b) & (mp)->m_blockmask)
+#define XFS_B_FSB_OFFSET(mp,b) ((b) & (mp)->m_blockmask)
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_SBP)
xfs_sb_t *xfs_buf_to_sbp(struct xfs_buf *bp);
diff --git a/libparted/fs/xfs/xfs_types.h b/libparted/fs/xfs/xfs_types.h
index 643a19b..89a0d61 100644
--- a/libparted/fs/xfs/xfs_types.h
+++ b/libparted/fs/xfs/xfs_types.h
@@ -1,31 +1,31 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 3 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_TYPES_H__
@@ -263,15 +263,15 @@ struct xfsstats {
/* juggle IRIX device numbers - still used in ondisk structures */
#define IRIX_DEV_BITSMAJOR 14
-#define IRIX_DEV_BITSMINOR 18
-#define IRIX_DEV_MAXMAJ 0x1ff
+#define IRIX_DEV_BITSMINOR 18
+#define IRIX_DEV_MAXMAJ 0x1ff
#define IRIX_DEV_MAXMIN 0x3ffff
#define IRIX_DEV_MAJOR(dev) ((int)(((unsigned)(dev)>>IRIX_DEV_BITSMINOR) \
& IRIX_DEV_MAXMAJ))
#define IRIX_DEV_MINOR(dev) ((int)((dev)&IRIX_DEV_MAXMIN))
#define IRIX_MKDEV(major,minor) ((xfs_dev_t)(((major)<<IRIX_DEV_BITSMINOR) \
| (minor&IRIX_DEV_MAXMIN)))
-
+
#define IRIX_DEV_TO_KDEVT(dev) MKDEV(IRIX_DEV_MAJOR(dev),IRIX_DEV_MINOR(dev))
#define IRIX_DEV_TO_DEVT(dev) ((IRIX_DEV_MAJOR(dev)<<8)|IRIX_DEV_MINOR(dev))
diff --git a/libparted/labels/aix.c b/libparted/labels/aix.c
index 465cb6c..de81270 100644
--- a/libparted/labels/aix.c
+++ b/libparted/labels/aix.c
@@ -115,7 +115,7 @@ static PedDisk*
aix_duplicate (const PedDisk* disk)
{
PedDisk* new_disk;
-
+
new_disk = ped_disk_new_fresh (disk->dev, &aix_disk_type);
if (!new_disk)
return NULL;
diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c
index 83e1709..3d6b5ab 100644
--- a/libparted/labels/bsd.c
+++ b/libparted/labels/bsd.c
@@ -74,7 +74,7 @@ struct _BSDRawLabel {
int16_t d_type; /* drive type */
int16_t d_subtype; /* controller/d_type specific */
int8_t d_typename[16]; /* type name, e.g. "eagle" */
- int8_t d_packname[16]; /* pack identifier */
+ int8_t d_packname[16]; /* pack identifier */
uint32_t d_secsize; /* # of bytes per sector */
uint32_t d_nsectors; /* # of data sectors per track */
uint32_t d_ntracks; /* # of tracks per cylinder */
@@ -97,7 +97,7 @@ struct _BSDRawLabel {
uint32_t d_spare[NSPARE]; /* reserved for future use */
uint32_t d_magic2; /* the magic number (again) */
uint16_t d_checksum; /* xor of data incl. partitions */
-
+
/* file system and partition information: */
uint16_t d_npartitions; /* number of partitions in following */
uint32_t d_bbsize; /* size of boot area at sn0, bytes */
@@ -123,7 +123,7 @@ static unsigned short
xbsd_dkcksum (BSDRawLabel *lp) {
unsigned short *start, *end;
unsigned short sum = 0;
-
+
lp->d_checksum = 0;
start = (u_short*) lp;
end = (u_short*) &lp->d_partitions [
@@ -138,7 +138,7 @@ static void
alpha_bootblock_checksum (char *boot) {
uint64_t *dp, sum;
int i;
-
+
dp = (uint64_t *)boot;
sum = 0;
for (i = 0; i < 63; i++)
@@ -164,7 +164,7 @@ bsd_probe (const PedDevice *dev)
label = (BSDRawLabel *) (boot + BSD_LABEL_OFFSET);
alpha_bootblock_checksum(boot);
-
+
/* check magic */
if (PED_LE32_TO_CPU (label->d_magic) != BSD_DISKMAGIC)
return 0;
@@ -209,18 +209,18 @@ bsd_alloc (const PedDevice* dev)
= PED_CPU_TO_LE32 (dev->bios_geom.sectors
* dev->bios_geom.heads
* dev->bios_geom.cylinders);
-
+
label->d_rpm = PED_CPU_TO_LE16 (3600);
label->d_interleave = PED_CPU_TO_LE16 (1);;
label->d_trackskew = 0;
label->d_cylskew = 0;
label->d_headswitch = 0;
label->d_trkseek = 0;
-
+
label->d_magic2 = PED_CPU_TO_LE32 (BSD_DISKMAGIC);
label->d_bbsize = PED_CPU_TO_LE32 (BSD_BBSIZE);
label->d_sbsize = PED_CPU_TO_LE32 (BSD_SBSIZE);
-
+
label->d_npartitions = 0;
label->d_checksum = xbsd_dkcksum (label);
return disk;
@@ -237,7 +237,7 @@ bsd_duplicate (const PedDisk* disk)
PedDisk* new_disk;
BSDDiskData* new_bsd_data;
BSDDiskData* old_bsd_data = (BSDDiskData*) disk->disk_specific;
-
+
new_disk = ped_disk_new_fresh (disk->dev, &bsd_disk_type);
if (!new_disk)
return NULL;
@@ -274,7 +274,7 @@ bsd_read (PedDisk* disk)
BSDDiskData* bsd_specific = (BSDDiskData*) disk->disk_specific;
BSDRawLabel* label;
int i;
-
+
ped_disk_delete_all (disk);
if (!ped_device_read (disk->dev, bsd_specific->boot_code, 0, 1))
@@ -302,7 +302,7 @@ bsd_read (PedDisk* disk)
bsd_part_data->type = label->d_partitions[i - 1].p_fstype;
part->num = i;
part->fs_type = ped_file_system_probe (&part->geom);
-
+
constraint_exact = ped_constraint_exact (&part->geom);
if (!ped_disk_add_partition (disk, part, constraint_exact))
goto error;
@@ -585,7 +585,7 @@ bsd_partition_enumerate (PedPartition* part)
{
int i;
PedPartition* p;
-
+
/* never change the partition numbers */
if (part->num != -1)
return 1;
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index a0044b7..d07dcbd 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -251,7 +251,7 @@ static PedDisk*
msdos_duplicate (const PedDisk* disk)
{
PedDisk* new_disk;
-
+
new_disk = ped_disk_new_fresh (disk->dev, &msdos_disk_type);
if (!new_disk)
return NULL;
@@ -333,7 +333,7 @@ sector_to_chs (const PedDevice* dev, const PedCHSGeometry* bios_geom,
PED_ASSERT (dev != NULL, return);
PED_ASSERT (chs != NULL, return);
-
+
if (!bios_geom)
bios_geom = &dev->bios_geom;
@@ -461,7 +461,7 @@ probe_filesystem_for_geom (const PedPartition* part, PedCHSGeometry* bios_geom)
return 0);
buf = ped_malloc (part->disk->dev->sector_size);
-
+
if (!buf)
return 0;
@@ -515,14 +515,14 @@ end:
*
* [ c h ] [ cyl_sectors ] = [ s - a ] = [ a_ ]
* [ C H ] [ head_sectors ] [ S - A ] [ A_ ].
- *
+ *
* (s - a is abbreviated to a_to simplify the notation.)
*
* This can be abbreviated into augmented matrix form:
*
* [ c h | a_ ]
* [ C H | A_ ].
- *
+ *
* Solving these equations requires following the row reduction algorithm. We
* need to be careful about a few things though:
* - the equations might be linearly dependent, in which case there
@@ -632,7 +632,7 @@ probe_partition_for_geom (const PedPartition* part, PedCHSGeometry* bios_geom)
head_size = ( a_ - c * cyl_size ) / h;
else if (H > 0)
head_size = ( A_ - C * cyl_size ) / H;
- else {
+ else {
/* should not happen because denum != 0 */
head_size = 0;
PED_ASSERT (0, return 0);
@@ -878,7 +878,7 @@ read_table (PedDisk* disk, PedSector sector, int is_extended_table)
* partitions, to make sure we get the order right.
*/
if (is_extended_table && raw_part_is_extended (raw_part))
- continue;
+ continue;
lba_offset = is_extended_table ? sector : 0;
@@ -1780,7 +1780,7 @@ _logical_min_start_head (const PedPartition* part,
* 2)*The partition table of part5 is always at the beginning of the ext_part
* so there is no need to leave a one sector gap before part5.
* *There always is a partition table at the beginning of each partition != 5.
- * We don't need to worry to much about consistency with
+ * We don't need to worry to much about consistency with
* _partition_get_overlap_constraint because missing it means we are in edge
* cases anyway, and we don't lose anything by just refusing to do the job in
* those cases.
@@ -2002,7 +2002,7 @@ msdos_partition_align (PedPartition* part, const PedConstraint* constraint)
return 1;
if (_align_no_geom (part, constraint))
return 1;
-
+
#ifndef DISCOVER_ONLY
ped_exception_throw (
PED_EXCEPTION_ERROR,
@@ -2143,7 +2143,7 @@ msdos_alloc_metadata (PedDisk* disk)
int i;
PedSector start, end;
PedCHSGeometry bios_geom;
-
+
for (i=5; 1; i++) {
PedPartition* log_part;
log_part = ped_disk_get_partition (disk, i);
diff --git a/libparted/labels/dvh.c b/libparted/labels/dvh.c
index 38b7569..93de8f9 100644
--- a/libparted/labels/dvh.c
+++ b/libparted/labels/dvh.c
@@ -474,8 +474,8 @@ dvh_write (const PedDisk* disk)
}
/* whole disk partition
- * This is only ever written here, and never modified
- * (or even shown) as it must contain the entire disk,
+ * This is only ever written here, and never modified
+ * (or even shown) as it must contain the entire disk,
* and parted does not like overlapping partitions
*/
vh.vh_pt[PNUM_VOLUME].pt_nblks = PED_CPU_TO_BE32 (disk->dev->length);
diff --git a/libparted/labels/dvh.h b/libparted/labels/dvh.h
index 992f3ee..4c25c99 100644
--- a/libparted/labels/dvh.h
+++ b/libparted/labels/dvh.h
@@ -26,7 +26,7 @@
* media (sector 0). It contains information pertaining to physical
* device parameters and logical partition information.
*
- * The volume header is manipulated by disk formatters/verifiers,
+ * The volume header is manipulated by disk formatters/verifiers,
* partition builders (e.g. fx, dvhtool, and mkfs), and disk drivers.
*
* Previous versions of IRIX wrote a copy of the volume header is
diff --git a/libparted/labels/efi_crc32.c b/libparted/labels/efi_crc32.c
index 327fb2d..bf1249f 100644
--- a/libparted/labels/efi_crc32.c
+++ b/libparted/labels/efi_crc32.c
@@ -1,4 +1,4 @@
-/*
+/*
* Dec 5, 2000 Matt Domsch <Matt_Domsch@dell.com>
* - Copied crc32.c from the linux/drivers/net/cipe directory.
* - Now pass seed as an arg
diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
index 2b876e5..40ba8c9 100644
--- a/libparted/labels/fdasd.c
+++ b/libparted/labels/fdasd.c
@@ -13,7 +13,7 @@
* 2001-06-26 '-a' option added, it is now possible to add a single
* partition in non-interactive mode
* 2001-06-26 long parameter support added
- *
+ *
*/
#include <config.h>
@@ -58,7 +58,7 @@ setpos (fdasd_anchor_t *anc, int dsn, int pos)
}
void
-fdasd_cleanup (fdasd_anchor_t *anchor)
+fdasd_cleanup (fdasd_anchor_t *anchor)
{
PDEBUG
int i;
@@ -85,8 +85,8 @@ fdasd_cleanup (fdasd_anchor_t *anchor)
}
}
-static void
-fdasd_error (fdasd_anchor_t *anc, enum fdasd_failure why, char * str)
+static void
+fdasd_error (fdasd_anchor_t *anc, enum fdasd_failure why, char * str)
{
PDEBUG
char error[2*LINE_LENGTH], *message = error;
@@ -110,23 +110,23 @@ fdasd_error (fdasd_anchor_t *anc, enum fdasd_failure why, char * str)
case api_version_mismatch:
sprintf(error, "fdasd: %s -- %s\n",
_("API version mismatch"), str);
- break;
+ break;
case wrong_disk_type:
sprintf(error, "fdasd: %s -- %s\n",
_("Unsupported disk type"), str);
- break;
+ break;
case wrong_disk_format:
sprintf(error, "fdasd: %s -- %s\n",
_("Unsupported disk format"), str);
- break;
+ break;
case disk_in_use:
sprintf(error, "fdasd: %s -- %s\n",
_("Disk is in use"), str);
- break;
+ break;
case config_syntax_error:
sprintf(error, "fdasd: %s -- %s\n",
_("Syntax error in config file"), str);
- break;
+ break;
case vlabel_corrupted:
sprintf(error, "fdasd: %s -- %s\n",
_("Volume label is corrupted"), str);
@@ -144,7 +144,7 @@ fdasd_error (fdasd_anchor_t *anc, enum fdasd_failure why, char * str)
_("Device verification failed"),
_("The specified device is not a valid DASD device"));
break;
- default:
+ default:
sprintf(error, "fdasd: %s: %s\n", _("Fatal error"), str);
}
@@ -154,8 +154,8 @@ fdasd_error (fdasd_anchor_t *anc, enum fdasd_failure why, char * str)
/*
* converts cyl-cyl-head-head-blk to blk
*/
-static unsigned long
-cchhb2blk (cchhb_t *p, struct fdasd_hd_geometry *geo)
+static unsigned long
+cchhb2blk (cchhb_t *p, struct fdasd_hd_geometry *geo)
{
PDEBUG
return (unsigned long) (p->cc * geo->heads * geo->sectors
@@ -167,7 +167,7 @@ cchhb2blk (cchhb_t *p, struct fdasd_hd_geometry *geo)
* memory for the labels
*/
void
-fdasd_initialize_anchor (fdasd_anchor_t * anc)
+fdasd_initialize_anchor (fdasd_anchor_t * anc)
{
PDEBUG
int i;
@@ -203,15 +203,15 @@ fdasd_initialize_anchor (fdasd_anchor_t * anc)
bzero(anc->confdata, sizeof(config_data_t));
anc->f4 = malloc(sizeof(format4_label_t));
- if (anc->f4 == NULL)
+ if (anc->f4 == NULL)
fdasd_error(anc, malloc_failed, "FMT4 DSCB.");
anc->f5 = malloc(sizeof(format5_label_t));
- if (anc->f5 == NULL)
+ if (anc->f5 == NULL)
fdasd_error(anc, malloc_failed, "FMT5 DSCB.");
anc->f7 = malloc(sizeof(format7_label_t));
- if (anc->f7 == NULL)
+ if (anc->f7 == NULL)
fdasd_error(anc, malloc_failed, "FMT7 DSCB.");
bzero(anc->f4, sizeof(format4_label_t));
@@ -219,7 +219,7 @@ fdasd_initialize_anchor (fdasd_anchor_t * anc)
bzero(anc->f7, sizeof(format7_label_t));
v = malloc(sizeof(volume_label_t));
- if (v == NULL)
+ if (v == NULL)
fdasd_error(anc, malloc_failed,
_("No room for volume label."));
bzero(v, sizeof(volume_label_t));
@@ -227,7 +227,7 @@ fdasd_initialize_anchor (fdasd_anchor_t * anc)
for (i=1; i<=USABLE_PARTITIONS; i++) {
p = malloc(sizeof(partition_info_t));
- if (p == NULL)
+ if (p == NULL)
fdasd_error(anc, malloc_failed,
_("No room for partition info."));
p->used = 0x00;
@@ -251,10 +251,10 @@ fdasd_initialize_anchor (fdasd_anchor_t * anc)
}
p->f1 = malloc(sizeof(format1_label_t));
- if (p->f1 == NULL)
+ if (p->f1 == NULL)
fdasd_error(anc, malloc_failed, "FMT1 DSCB.");
bzero(p->f1, sizeof(format1_label_t));
-
+
q = p;
}
}
@@ -264,13 +264,13 @@ fdasd_initialize_anchor (fdasd_anchor_t * anc)
*/
static void
fdasd_write_vtoc_labels (fdasd_anchor_t * anc, int fd)
-{
+{
PDEBUG
partition_info_t *p;
unsigned long b;
char dsno[6], s1[7], s2[45], *c1, *c2, *ch;
int i = 0, k = 0;
-
+
b = (cchhb2blk (&anc->vlabel->vtoc, &anc->geo) - 1) * anc->blksize;
if (b <= 0)
fdasd_error (anc, vlabel_corrupted, "");
@@ -297,13 +297,13 @@ fdasd_write_vtoc_labels (fdasd_anchor_t * anc, int fd)
vtoc_write_label (fd, b, p->f1, NULL, NULL, NULL);
continue;
}
-
+
strncpy (p->f1->DS1DSSN, anc->vlabel->volid, 6);
ch = p->f1->DS1DSNAM;
vtoc_ebcdic_dec (ch, ch, 44);
c1 = ch + 7;
-
+
if (getdsn (anc, i) > -1) {
/* re-use the existing data set name */
c2 = strchr (c1, '.');
@@ -389,7 +389,7 @@ fdasd_write_labels (fdasd_anchor_t * anc, int fd)
* writes all changes to dasd
*/
int
-fdasd_prepare_labels (fdasd_anchor_t *anc, int fd)
+fdasd_prepare_labels (fdasd_anchor_t *anc, int fd)
{
PDEBUG
partition_info_t *p = anc->first;
@@ -404,7 +404,7 @@ fdasd_prepare_labels (fdasd_anchor_t *anc, int fd)
ch = p->f1->DS1DSNAM;
vtoc_ebcdic_dec (ch, ch, 44);
c1 = ch + 7;
-
+
if (getdsn (anc, i) > -1) {
/* re-use the existing data set name */
c2 = strchr (c1, '.');
@@ -487,7 +487,7 @@ fdasd_recreate_vtoc (fdasd_anchor_t *anc)
vtoc_init_format5_label(anc->f5);
vtoc_init_format7_label(anc->f7);
- vtoc_set_freespace(anc->f4, anc->f5, anc->f7,
+ vtoc_set_freespace(anc->f4, anc->f5, anc->f7,
'+', anc->verbose,
FIRST_USABLE_TRK,
anc->geo.cylinders * anc->geo.heads - 1,
@@ -520,7 +520,7 @@ fdasd_recreate_vtoc (fdasd_anchor_t *anc)
* information provided in the labels
*/
static void
-fdasd_update_partition_info (fdasd_anchor_t *anc)
+fdasd_update_partition_info (fdasd_anchor_t *anc)
{
PDEBUG
partition_info_t *q = NULL, *p = anc->first;
@@ -580,11 +580,11 @@ fdasd_update_partition_info (fdasd_anchor_t *anc)
}
/*
- * reorganizes all FMT1s, after that all used FMT1s should be right in
+ * reorganizes all FMT1s, after that all used FMT1s should be right in
* front of all unused FMT1s
*/
static void
-fdasd_reorganize_FMT1s (fdasd_anchor_t *anc)
+fdasd_reorganize_FMT1s (fdasd_anchor_t *anc)
{
PDEBUG
int i, j;
@@ -693,7 +693,7 @@ fdasd_valid_vtoc_pointer(fdasd_anchor_t *anc, unsigned long b, int fd)
PDEBUG
char str[LINE_LENGTH];
- /* VOL1 label contains valid VTOC pointer */
+ /* VOL1 label contains valid VTOC pointer */
vtoc_read_label (fd, b, NULL, anc->f4, NULL, NULL);
if (anc->f4->DS4IDFMT != 0xf4) {
@@ -710,8 +710,8 @@ fdasd_valid_vtoc_pointer(fdasd_anchor_t *anc, unsigned long b, int fd)
/*
* check the dasd for a volume label
*/
-int
-fdasd_check_volume (fdasd_anchor_t *anc, int fd)
+int
+fdasd_check_volume (fdasd_anchor_t *anc, int fd)
{
PDEBUG
volume_label_t *v = anc->vlabel;
@@ -751,31 +751,31 @@ fdasd_check_api_version (fdasd_anchor_t *anc, int f)
PDEBUG
int api;
char s[LINE_LENGTH];
-
+
if (ioctl(f, DASDAPIVER, &api) != 0)
fdasd_error(anc, unable_to_ioctl,
_("Could not retrieve API version."));
-
+
if (api != DASD_MIN_API_VERSION) {
sprintf(s, _("The current API version '%d' doesn't " \
"match dasd driver API version " \
"'%d'!"), api, DASD_MIN_API_VERSION);
fdasd_error(anc, api_version_mismatch, s);
}
-}
+}
/*
* reads dasd geometry data
*/
-void
-fdasd_get_geometry (fdasd_anchor_t *anc, int f)
+void
+fdasd_get_geometry (fdasd_anchor_t *anc, int f)
{
PDEBUG
int blksize = 0;
dasd_information_t dasd_info;
char s[LINE_LENGTH];
- if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0)
+ if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0)
fdasd_error(anc, unable_to_ioctl,
_("Could not retrieve disk geometry information."));
@@ -784,8 +784,8 @@ fdasd_get_geometry (fdasd_anchor_t *anc, int f)
_("Could not retrieve blocksize information."));
/* get disk type */
- if (ioctl(f, BIODASDINFO, &dasd_info) != 0)
- fdasd_error(anc, unable_to_ioctl,
+ if (ioctl(f, BIODASDINFO, &dasd_info) != 0)
+ fdasd_error(anc, unable_to_ioctl,
_("Could not retrieve disk information."));
if (strncmp(dasd_info.type, "ECKD", 4) != 0)
@@ -804,12 +804,12 @@ fdasd_get_geometry (fdasd_anchor_t *anc, int f)
* returns unused partition info pointer if there
* is a free partition, otherwise NULL
*/
-static partition_info_t *
-fdasd_get_empty_f1_label (fdasd_anchor_t * anc)
+static partition_info_t *
+fdasd_get_empty_f1_label (fdasd_anchor_t * anc)
{
PDEBUG
- if (anc->used_partitions < USABLE_PARTITIONS)
- return anc->last;
+ if (anc->used_partitions < USABLE_PARTITIONS)
+ return anc->last;
else
return NULL;
}
@@ -817,10 +817,10 @@ fdasd_get_empty_f1_label (fdasd_anchor_t * anc)
/*
* asks for and sets some important partition data
*/
-static int
+static int
fdasd_get_partition_data (fdasd_anchor_t *anc, extent_t *part_extent,
partition_info_t *p, unsigned int *start_ptr,
- unsigned int *stop_ptr)
+ unsigned int *stop_ptr)
{
PDEBUG
unsigned int limit, cc, hh;
@@ -877,7 +877,7 @@ fdasd_get_partition_data (fdasd_anchor_t *anc, extent_t *part_extent,
vtoc_set_cchh(&llimit, cc, hh);
/* check for cylinder boundary */
- if (hh == 0)
+ if (hh == 0)
b1 = 0x81;
else
b1 = 0x01;
@@ -914,7 +914,7 @@ fdasd_get_partition_data (fdasd_anchor_t *anc, extent_t *part_extent,
}
static void
-fdasd_enqueue_new_partition (fdasd_anchor_t *anc)
+fdasd_enqueue_new_partition (fdasd_anchor_t *anc)
{
PDEBUG
partition_info_t *q = anc->first, *p = anc->last;
@@ -923,7 +923,7 @@ fdasd_enqueue_new_partition (fdasd_anchor_t *anc)
for (i=1; i<USABLE_PARTITIONS; i++) {
if ((q->end_trk == 0) || (p->start_trk < q->start_trk)) {
break;
- } else {
+ } else {
q = q->next;
k++;
}
@@ -931,7 +931,7 @@ fdasd_enqueue_new_partition (fdasd_anchor_t *anc)
if (anc->first == q)
anc->first = p;
-
+
if (p != q) {
anc->last->prev->next = NULL;
anc->last = anc->last->prev;
@@ -939,7 +939,7 @@ fdasd_enqueue_new_partition (fdasd_anchor_t *anc)
p->next = q;
p->prev = q->prev;
q->prev = p;
-
+
if (p->prev != NULL)
p->prev->next = p;
}
@@ -986,7 +986,7 @@ fdasd_enqueue_new_partition (fdasd_anchor_t *anc)
*/
partition_info_t *
fdasd_add_partition (fdasd_anchor_t *anc, unsigned int start,
- unsigned int stop)
+ unsigned int stop)
{
PDEBUG
cchhb_t hf1;
@@ -1010,7 +1010,7 @@ fdasd_add_partition (fdasd_anchor_t *anc, unsigned int start,
PDEBUG;
fdasd_enqueue_new_partition(anc);
-
+
PDEBUG;
anc->used_partitions += 1;
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index cc03b0b..765c8a5 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -172,9 +172,9 @@ struct __attribute__ ((packed)) _GuidPartitionEntry_t {
#define GPT_PMBR_SECTORS 1
#define GPT_PRIMARY_HEADER_LBA 1
#define GPT_HEADER_SECTORS 1
-#define GPT_PRIMARY_PART_TABLE_LBA 2
+#define GPT_PRIMARY_PART_TABLE_LBA 2
-/*
+/*
These values are only defaults. The actual on-disk structures
may define different sizes, so use those unless creating a new GPT disk!
*/
@@ -285,7 +285,7 @@ pth_new (const PedDevice* dev)
GuidPartitionTableHeader_t* pth = ped_malloc (
sizeof (GuidPartitionTableHeader_t)
+ sizeof (uint8_t));
-
+
pth->Reserved2 = ped_malloc ( pth_get_size_rsv2 (dev) );
return pth;
@@ -296,25 +296,25 @@ static GuidPartitionTableHeader_t*
pth_new_zeroed (const PedDevice* dev)
{
GuidPartitionTableHeader_t* pth = pth_new (dev);
-
+
memset (pth, 0, pth_get_size_static (dev));
- memset (pth->Reserved2, 0, pth_get_size_rsv2 (dev));
-
+ memset (pth->Reserved2, 0, pth_get_size_rsv2 (dev));
+
return (pth);
}
-
+
static GuidPartitionTableHeader_t*
pth_new_from_raw (const PedDevice* dev, const uint8_t* pth_raw)
{
- GuidPartitionTableHeader_t* pth = pth_new (dev);
+ GuidPartitionTableHeader_t* pth = pth_new (dev);
PED_ASSERT (pth_raw != NULL, return 0);
-
+
memcpy (pth, pth_raw, pth_get_size_static (dev));
memcpy (pth->Reserved2, pth_raw + pth_get_size_static (dev),
pth_get_size_rsv2 (dev));
-
+
return pth;
}
@@ -333,13 +333,13 @@ pth_get_raw (const PedDevice* dev, const GuidPartitionTableHeader_t* pth)
{
uint8_t* pth_raw = ped_malloc (pth_get_size (dev));
int size_static = pth_get_size_static (dev);
-
+
PED_ASSERT (pth != NULL, return 0);
PED_ASSERT (pth->Reserved2 != NULL, return 0);
-
+
memcpy (pth_raw, pth, size_static);
memcpy (pth_raw + size_static, pth->Reserved2, pth_get_size_rsv2 (dev));
-
+
return pth_raw;
}
@@ -350,7 +350,7 @@ pth_get_raw (const PedDevice* dev, const GuidPartitionTableHeader_t* pth)
*
* There are two different representations for Globally Unique Identifiers
* (GUIDs or UUIDs).
- *
+ *
* The RFC specifies a UUID as a string of 16 bytes, essentially
* a big-endian array of char.
* Intel, in their EFI Specification, references the same RFC, but
@@ -390,14 +390,14 @@ pth_crc32(const PedDevice* dev, const GuidPartitionTableHeader_t* pth)
{
uint8_t* pth_raw = pth_get_raw (dev, pth);
uint32_t crc32 = 0;
-
+
PED_ASSERT (dev != NULL, return 0);
PED_ASSERT (pth != NULL, return 0);
-
+
crc32 = efi_crc32 (pth_raw, PED_LE32_TO_CPU (pth->HeaderSize));
free (pth_raw);
-
+
return crc32;
}
@@ -440,13 +440,13 @@ gpt_probe (const PedDevice * dev)
if (gpt->Signature == PED_CPU_TO_LE64(GPT_HEADER_SIGNATURE))
gpt_sig_found = 1;
}
-
+
free (pth_raw);
if (gpt)
pth_free (gpt);
-
+
if (!gpt_sig_found)
return 0;
@@ -486,7 +486,7 @@ gpt_clobber(PedDevice * dev)
memset(&pmbr, 0, sizeof(pmbr));
memset(zeroed_pth_raw, 0, pth_get_size (dev));
-
+
/*
* TO DISCUSS: check whether checksum is correct?
* If not, we might get a wrong AlternateLBA field and destroy
@@ -497,7 +497,7 @@ gpt_clobber(PedDevice * dev)
goto error_free;
gpt = pth_new_from_raw (dev, pth_raw);
-
+
if (!ped_device_write(dev, &pmbr, GPT_PMBR_LBA, GPT_PMBR_SECTORS))
goto error_free_with_gpt;
if (!ped_device_write(dev, &zeroed_pth_raw,
@@ -513,11 +513,11 @@ gpt_clobber(PedDevice * dev)
GPT_HEADER_SECTORS))
return 0;
}
-
+
pth_free (gpt);
return 1;
-
+
error_free_with_gpt:
pth_free (gpt);
error_free:
@@ -623,9 +623,9 @@ _read_header (const PedDevice* dev, GuidPartitionTableHeader_t** gpt,
free (pth_raw);
return 0;
}
-
+
*gpt = pth_new_from_raw (dev, pth_raw);
-
+
free (pth_raw);
if (_header_is_valid (dev, *gpt))
@@ -636,9 +636,9 @@ _read_header (const PedDevice* dev, GuidPartitionTableHeader_t** gpt,
}
static int
-_parse_header (PedDisk* disk, GuidPartitionTableHeader_t* gpt,
+_parse_header (PedDisk* disk, GuidPartitionTableHeader_t* gpt,
int *update_needed)
-{
+{
GPTDiskData* gpt_disk_data = disk->disk_specific;
PedSector first_usable;
PedSector last_usable;
@@ -668,20 +668,20 @@ _parse_header (PedDisk* disk, GuidPartitionTableHeader_t* gpt,
/*
Need to check whether the volume has grown, the LastUsableLBA is
normally set to disk->dev->length - 2 - ptes_size (at least for parted
- created volumes), where ptes_size is the number of entries *
+ created volumes), where ptes_size is the number of entries *
size of each entry / sector size or 16k / sector size, whatever the greater.
If the volume has grown, offer the user the chance to use the new
- space or continue with the current usable area. Only ask once per
+ space or continue with the current usable area. Only ask once per
parted invocation.
*/
-
- last_usable_if_grown
+
+ last_usable_if_grown
= (disk->dev->length - 2 -
- ((PedSector)(PED_LE32_TO_CPU(gpt->NumberOfPartitionEntries)) *
- (PedSector)(PED_LE32_TO_CPU(gpt->SizeOfPartitionEntry)) /
+ ((PedSector)(PED_LE32_TO_CPU(gpt->NumberOfPartitionEntries)) *
+ (PedSector)(PED_LE32_TO_CPU(gpt->SizeOfPartitionEntry)) /
disk->dev->sector_size));
- last_usable_min_default = disk->dev->length - 2 -
+ last_usable_min_default = disk->dev->length - 2 -
GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE / disk->dev->sector_size;
if ( last_usable_if_grown > last_usable_min_default ) {
@@ -705,7 +705,7 @@ _parse_header (PedDisk* disk, GuidPartitionTableHeader_t* gpt,
_("Not all of the space available to %s appears "
"to be used, you can fix the GPT to use all of the "
"space (an extra %llu blocks) or continue with the "
- "current setting? "), disk->dev->path,
+ "current setting? "), disk->dev->path,
(uint64_t)(last_usable_if_grown - last_usable));
@@ -755,15 +755,15 @@ _parse_part_entry (PedDisk* disk, GuidPartitionEntry_t* pte)
gpt_part_data->name[i] = (efi_char16_t) PED_LE16_TO_CPU(
(uint16_t) pte->PartitionName[i]);
gpt_part_data->name[i] = 0;
-
- gpt_part_data->lvm = gpt_part_data->raid
+
+ gpt_part_data->lvm = gpt_part_data->raid
= gpt_part_data->boot = gpt_part_data->hp_service
= gpt_part_data->hidden = gpt_part_data->msftres
= gpt_part_data->bios_grub = 0;
if (pte->Attributes.RequiredToFunction & 0x1)
gpt_part_data->hidden = 1;
-
+
if (!guid_cmp (gpt_part_data->type, PARTITION_SYSTEM_GUID))
gpt_part_data->boot = 1;
else if (!guid_cmp (gpt_part_data->type, PARTITION_BIOS_GRUB_GUID))
@@ -776,7 +776,7 @@ _parse_part_entry (PedDisk* disk, GuidPartitionEntry_t* pte)
gpt_part_data->hp_service = 1;
else if (!guid_cmp (gpt_part_data->type, PARTITION_MSFT_RESERVED_GUID))
gpt_part_data->msftres = 1;
-
+
return part;
}
@@ -816,7 +816,7 @@ gpt_read (PedDisk * disk)
ped_disk_delete_all (disk);
- /*
+ /*
* motivation: let the user decide about the pmbr... during
* ped_disk_probe(), they probably didn't get a choice...
*/
@@ -966,7 +966,7 @@ _write_pmbr (PedDevice * dev)
pmbr.PartitionRecord[0].EndSector = 0xFF;
pmbr.PartitionRecord[0].EndTrack = 0xFF;
pmbr.PartitionRecord[0].StartingLBA = PED_CPU_TO_LE32(1);
- if ((dev->length - 1ULL) > 0xFFFFFFFFULL)
+ if ((dev->length - 1ULL) > 0xFFFFFFFFULL)
pmbr.PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32(0xFFFFFFFF);
else
pmbr.PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32(dev->length - 1UL);
@@ -982,9 +982,9 @@ _generate_header (const PedDisk* disk, int alternate, uint32_t ptes_crc,
GuidPartitionTableHeader_t* gpt;
*gpt_p = pth_new_zeroed (disk->dev);
-
+
gpt = *gpt_p;
-
+
gpt->Signature = PED_CPU_TO_LE64 (GPT_HEADER_SIGNATURE);
gpt->Revision = PED_CPU_TO_LE32 (GPT_HEADER_REVISION_V1_00);
@@ -1034,7 +1034,7 @@ _partition_generate_part_entry (PedPartition* part, GuidPartitionEntry_t* pte)
if (gpt_part_data->hidden)
pte->Attributes.RequiredToFunction = 1;
-
+
for (i = 0; i < 72 / sizeof(efi_char16_t); i++)
pte->PartitionName[i]
= (efi_char16_t) PED_CPU_TO_LE16(
@@ -1252,7 +1252,7 @@ gpt_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type)
gpt_part_data->type = PARTITION_MSFT_RESERVED_GUID;
return 1;
}
-
+
if (fs_type) {
if (strncmp (fs_type->name, "fat", 3) == 0
|| strcmp (fs_type->name, "ntfs") == 0) {
@@ -1340,7 +1340,7 @@ gpt_partition_set_flag(PedPartition *part,
case PED_PARTITION_BOOT:
gpt_part_data->boot = state;
if (state)
- gpt_part_data->raid
+ gpt_part_data->raid
= gpt_part_data->lvm
= gpt_part_data->bios_grub
= gpt_part_data->hp_service
@@ -1349,7 +1349,7 @@ gpt_partition_set_flag(PedPartition *part,
case PED_PARTITION_BIOS_GRUB:
gpt_part_data->bios_grub = state;
if (state)
- gpt_part_data->raid
+ gpt_part_data->raid
= gpt_part_data->lvm
= gpt_part_data->boot
= gpt_part_data->hp_service
@@ -1445,7 +1445,7 @@ gpt_partition_is_flag_available(const PedPartition * part,
case PED_PARTITION_BIOS_GRUB:
case PED_PARTITION_HPSERVICE:
case PED_PARTITION_MSFT_RESERVED:
- case PED_PARTITION_HIDDEN:
+ case PED_PARTITION_HIDDEN:
return 1;
case PED_PARTITION_SWAP:
case PED_PARTITION_ROOT:
diff --git a/libparted/labels/loop.c b/libparted/labels/loop.c
index c89a9ce..10ba29e 100644
--- a/libparted/labels/loop.c
+++ b/libparted/labels/loop.c
@@ -192,7 +192,7 @@ loop_partition_new (const PedDisk* disk, PedPartitionType part_type,
PedSector start, PedSector end)
{
PedPartition* part;
-
+
part = _ped_partition_alloc (disk, part_type, fs_type, start, end);
if (!part)
return NULL;
@@ -204,7 +204,7 @@ static PedPartition*
loop_partition_duplicate (const PedPartition* part)
{
PedPartition* result;
-
+
result = ped_partition_new (part->disk, part->type, part->fs_type,
part->geom.start, part->geom.end);
result->num = part->num;
diff --git a/libparted/labels/mac.c b/libparted/labels/mac.c
index e89dc20..c1f3dc7 100644
--- a/libparted/labels/mac.c
+++ b/libparted/labels/mac.c
@@ -46,11 +46,11 @@
* Apple_partition_map partition map (table)
* Apple_Driver device driver
* Apple_Driver43 SCSI Manager 4.3 device driver
- * Apple_MFS original Macintosh File System
+ * Apple_MFS original Macintosh File System
* Apple_HFS Hierarchical File System (and +)
* Apple_HFSX HFS+ with case sensitivity and more
* Apple_UNIX_SVR2 UNIX file system (UFS?)
- * Apple_PRODOS ProDOS file system
+ * Apple_PRODOS ProDOS file system
* Apple_Free unused space
* Apple_Scratch empty
* Apple_Void padding for iso9660
@@ -312,7 +312,7 @@ mac_duplicate (const PedDisk* disk)
MacDiskData* new_mac_data;
MacDiskData* old_mac_data = (MacDiskData*) disk->disk_specific;
PedPartition* partition_map;
-
+
new_disk = ped_disk_new_fresh (disk->dev, &mac_disk_type);
if (!new_disk)
goto error;
@@ -957,7 +957,7 @@ _generate_raw_part (PedDisk* disk, PedPartition* part,
return 1;
error:
- return 0;
+ return 0;
}
static int
@@ -992,7 +992,7 @@ _generate_raw_freespace_part (PedDisk* disk, PedGeometry* geom, int num,
return 1;
error:
- return 0;
+ return 0;
}
static int
diff --git a/libparted/labels/pc98.c b/libparted/labels/pc98.c
index 3ab7b03..f392bea 100644
--- a/libparted/labels/pc98.c
+++ b/libparted/labels/pc98.c
@@ -36,7 +36,7 @@
* http://www.kmc.kyoto-u.ac.jp/proj/linux98/index-english.html
*
* Partition types:
- *
+ *
* id0(mid):
* bit 7: 1=bootable, 0=not bootable
* # Linux uses this flag to make a distinction between ext2 and swap.
@@ -49,7 +49,7 @@
* 20H : DOS(data), Windows95/98/NT, Linux
* 21H..2FH : DOS(system#1 .. system#15)
* 40H : Minix
- *
+ *
* id1(sid):
* bit 7: 1=active, 0=sleep(hidden)
* # PC-UX uses this flag to make a distinction between its file system
@@ -139,7 +139,7 @@ static int
pc98_check_ipl_signature (const PC98RawTable *part_table)
{
return !memcmp (part_table->boot_code + 4, "IPL1", 4);
-}
+}
static int
check_partition_consistency (const PedDevice* dev,
@@ -603,7 +603,7 @@ static int
pc98_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type)
{
PC98PartitionData* pc98_data = part->disk_specific;
-
+
part->fs_type = fs_type;
pc98_data->system = 0x2062;
@@ -855,7 +855,7 @@ static PedDiskOps pc98_disk_ops = {
#else
write: NULL,
#endif
-
+
partition_new: pc98_partition_new,
partition_duplicate: pc98_partition_duplicate,
partition_destroy: pc98_partition_destroy,
diff --git a/libparted/labels/rdb.c b/libparted/labels/rdb.c
index 90acc2b..c39230d 100644
--- a/libparted/labels/rdb.c
+++ b/libparted/labels/rdb.c
@@ -51,7 +51,7 @@ static void _amiga_set_bstr (const char *cstr, char *bstr, int maxsize) {
static const char * _amiga_get_bstr (char * bstr) {
char * cstr = bstr + 1;
int size = bstr[0];
-
+
cstr[size] = '\0';
return cstr;
}
@@ -62,7 +62,7 @@ static const char * _amiga_get_bstr (char * bstr) {
#define IDNAME_FILESYSHEADER (uint32_t)0x46534844 /* 'FSHD' */
#define IDNAME_LOADSEG (uint32_t)0x4C534547 /* 'LSEG' */
#define IDNAME_BOOT (uint32_t)0x424f4f54 /* 'BOOT' */
-#define IDNAME_FREE (uint32_t)0xffffffff
+#define IDNAME_FREE (uint32_t)0xffffffff
static const char *
_amiga_block_id (uint32_t id) {
@@ -127,7 +127,7 @@ struct AmigaBlock {
uint32_t amiga_SummedLongss; /* Size of the structure for checksums */
int32_t amiga_ChkSum; /* Checksum of the structure */
};
-#define AMIGA(pos) ((struct AmigaBlock *)(pos))
+#define AMIGA(pos) ((struct AmigaBlock *)(pos))
static int
_amiga_checksum (struct AmigaBlock *blk) {
@@ -150,7 +150,7 @@ _amiga_calculate_checksum (struct AmigaBlock *blk) {
blk->amiga_ChkSum = PED_CPU_TO_BE32(
PED_BE32_TO_CPU(blk->amiga_ChkSum) -
_amiga_checksum((struct AmigaBlock *) blk));
- return;
+ return;
}
static struct AmigaBlock *
@@ -175,7 +175,7 @@ _amiga_read_block (const PedDevice *dev, struct AmigaBlock *blk,
return NULL;
case PED_EXCEPTION_IGNORE :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
return blk;
}
}
@@ -227,7 +227,7 @@ struct RigidDiskBlock {
uint32_t rdb_Reserved5[10];
};
-#define RDSK(pos) ((struct RigidDiskBlock *)(pos))
+#define RDSK(pos) ((struct RigidDiskBlock *)(pos))
#define AMIGA_RDB_NOT_FOUND ((uint32_t)0xffffffff)
#define RDB_LOCATION_LIMIT 16
@@ -339,7 +339,7 @@ amiga_probe (const PedDevice *dev)
return (found == AMIGA_RDB_NOT_FOUND ? 0 : 1);
}
-
+
static PedDisk*
amiga_alloc (const PedDevice* dev)
{
@@ -374,7 +374,7 @@ amiga_alloc (const PedDevice* dev)
rdb->rdb_FileSysHeaderList = PED_CPU_TO_BE32 (LINK_END);
rdb->rdb_DriveInit = PED_CPU_TO_BE32 (LINK_END);
rdb->rdb_BootBlockList = PED_CPU_TO_BE32 (LINK_END);
-
+
/* Physical drive characteristics */
rdb->rdb_Cylinders = PED_CPU_TO_BE32 (dev->hw_geom.cylinders);
rdb->rdb_Sectors = PED_CPU_TO_BE32 (dev->hw_geom.sectors);
@@ -408,7 +408,7 @@ amiga_alloc (const PedDevice* dev)
/* And calculate the checksum */
_amiga_calculate_checksum ((struct AmigaBlock *) rdb);
-
+
return disk;
}
@@ -423,7 +423,7 @@ amiga_duplicate (const PedDisk* disk)
PED_ASSERT(disk->disk_specific != NULL, return NULL);
old_rdb = (struct RigidDiskBlock *) disk->disk_specific;
-
+
if (!(new_disk = ped_disk_new_fresh (disk->dev, &amiga_disk_type)))
return NULL;
@@ -559,7 +559,7 @@ amiga_read (PedDisk* disk)
part->type = 0;
/* Let's probe what file system is present on the disk */
part->fs_type = ped_file_system_probe (&part->geom);
-
+
constraint_exact = ped_constraint_exact (&part->geom);
if (!ped_disk_add_partition (disk, part, constraint_exact)) {
ped_partition_destroy(part);
@@ -593,7 +593,7 @@ _amiga_find_free_blocks(const PedDisk *disk, uint32_t *table,
/* TODO : Need to add fixing code */
case PED_EXCEPTION_IGNORE :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
return 1;
}
}
@@ -610,7 +610,7 @@ _amiga_find_free_blocks(const PedDisk *disk, uint32_t *table,
/* TODO : to more subtile things here */
case PED_EXCEPTION_CANCEL :
case PED_EXCEPTION_UNHANDLED :
- default :
+ default :
return 0;
}
}
@@ -1000,9 +1000,9 @@ amiga_partition_is_flag_available (const PedPartition* part,
}
}
-static void
+static void
amiga_partition_set_name (PedPartition* part, const char* name)
-{
+{
struct PartitionBlock *partition;
PED_ASSERT (part != NULL, return);
@@ -1049,7 +1049,7 @@ amiga_partition_align (PedPartition* part, const PedConstraint* constraint)
{
PED_ASSERT (part != NULL, return 0);
PED_ASSERT (part->disk != NULL, return 0);
-
+
if (_ped_partition_attempt_align (part, constraint,
_amiga_get_constraint (part->disk)))
return 1;
@@ -1066,7 +1066,7 @@ amiga_partition_enumerate (PedPartition* part)
{
int i;
PedPartition* p;
-
+
PED_ASSERT (part != NULL, return 0);
PED_ASSERT (part->disk != NULL, return 0);
diff --git a/libparted/labels/sun.c b/libparted/labels/sun.c
index 389db47..41580a4 100644
--- a/libparted/labels/sun.c
+++ b/libparted/labels/sun.c
@@ -164,7 +164,7 @@ sun_clobber (PedDevice* dev)
if (!ped_device_read (dev, &label, 0, 1))
return 0;
-
+
label.magic = 0;
return ped_device_write (dev, &label, 0, 1);
}
@@ -234,7 +234,7 @@ sun_duplicate (const PedDisk* disk)
PedDisk* new_disk;
SunDiskData* new_sun_data;
SunDiskData* old_sun_data = (SunDiskData*) disk->disk_specific;
-
+
new_disk = ped_disk_new_fresh (disk->dev, &sun_disk_type);
if (!new_disk)
return NULL;
@@ -308,11 +308,11 @@ sun_read (PedDisk* disk)
PedPartition* part;
PedSector end, start, block;
PedConstraint* constraint_exact;
-
+
PED_ASSERT (disk != NULL, return 0);
PED_ASSERT (disk->dev != NULL, return 0);
PED_ASSERT (disk->disk_specific != NULL, return 0);
-
+
disk_data = (SunDiskData*) disk->disk_specific;
label = &disk_data->raw_label;
@@ -353,7 +353,7 @@ sun_read (PedDisk* disk)
part->num = i + 1;
part->fs_type = ped_file_system_probe (&part->geom);
-
+
constraint_exact = ped_constraint_exact (&part->geom);
if (!ped_disk_add_partition (disk, part, constraint_exact))
goto error;
@@ -414,7 +414,7 @@ sun_write (const PedDisk* disk)
label->infos[i].id = WHOLE_DISK_ID;
label->partitions[i].start_cylinder = 0;
- label->partitions[i].num_sectors =
+ label->partitions[i].num_sectors =
PED_CPU_TO_BE32(disk_data->length);
continue;
}
@@ -750,7 +750,7 @@ sun_partition_enumerate (PedPartition* part)
{
int i;
PedPartition* p;
-
+
/* never change the partition numbers */
if (part->num != -1)
return 1;
diff --git a/libparted/labels/vtoc.c b/libparted/labels/vtoc.c
index e81bf08..bdcb9f4 100644
--- a/libparted/labels/vtoc.c
+++ b/libparted/labels/vtoc.c
@@ -35,7 +35,7 @@ static const unsigned char EBCtoASC[256] =
-INP */
0x07, 0x07, 0x1C, 0x07, 0x07, 0x0A, 0x17, 0x1B,
/* 0x28 -SA -SFE -SM -CSP -MFA ENQ ACK BEL
- -SW */
+ -SW */
0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x06, 0x07,
/* 0x30 ---- ---- SYN -IR -PP -TRN -NBS EOT */
0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04,
@@ -51,7 +51,7 @@ static const unsigned char EBCtoASC[256] =
0x8D, 0xE1, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAA,
/* 0x60 - / ---- Ä ---- ---- ---- */
0x2D, 0x2F, 0x07, 0x8E, 0x07, 0x07, 0x07, 0x8F,
-/* 0x68 ---- , % _ > ? */
+/* 0x68 ---- , % _ > ? */
0x80, 0xA5, 0x07, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
/* 0x70 --- ---- ---- ---- ---- ---- ---- */
0x07, 0x90, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
@@ -152,8 +152,8 @@ enum failure {
static char buffer[85];
-static void
-vtoc_error (enum failure why, char *s1, char *s2)
+static void
+vtoc_error (enum failure why, char *s1, char *s2)
{
PDEBUG
char error[8192];
@@ -182,21 +182,21 @@ vtoc_error (enum failure why, char *s1, char *s2)
ped_exception_throw(PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL, error);
}
-char *
+char *
vtoc_ebcdic_enc (char source[LINE_LENGTH],
char target[LINE_LENGTH],
- int l)
+ int l)
{
PDEBUG
int i;
- for (i = 0; i < l; i++)
+ for (i = 0; i < l; i++)
target[i]=ASCtoEBC[(unsigned char)(source[i])];
return target;
}
-char *
+char *
vtoc_ebcdic_dec (char source[LINE_LENGTH],
char target[LINE_LENGTH],
int l)
@@ -204,16 +204,16 @@ vtoc_ebcdic_dec (char source[LINE_LENGTH],
PDEBUG
int i;
- for (i = 0; i < l; i++)
+ for (i = 0; i < l; i++)
target[i]=EBCtoASC[(unsigned char)(source[i])];
return target;
}
-void
+void
vtoc_set_extent (extent_t *ext, u_int8_t typeind, u_int8_t seqno,
- cchh_t *lower, cchh_t *upper)
-{
+ cchh_t *lower, cchh_t *upper)
+{
PDEBUG
ext->typeind = typeind;
ext->seqno = seqno;
@@ -221,24 +221,24 @@ vtoc_set_extent (extent_t *ext, u_int8_t typeind, u_int8_t seqno,
memcpy(&ext->ulimit,upper,sizeof(cchh_t));
}
-void
-vtoc_set_cchh (cchh_t *addr, u_int16_t cc, u_int16_t hh)
+void
+vtoc_set_cchh (cchh_t *addr, u_int16_t cc, u_int16_t hh)
{
PDEBUG
addr->cc = cc;
addr->hh = hh;
}
-static void
-vtoc_set_ttr (ttr_t *addr, u_int16_t tt, u_int8_t r)
+static void
+vtoc_set_ttr (ttr_t *addr, u_int16_t tt, u_int8_t r)
{
PDEBUG
addr->tt = tt;
addr->r = r;
}
-void
-vtoc_set_cchhb (cchhb_t *addr, u_int16_t cc, u_int16_t hh, u_int8_t b)
+void
+vtoc_set_cchhb (cchhb_t *addr, u_int16_t cc, u_int16_t hh, u_int8_t b)
{
PDEBUG
addr->cc = cc;
@@ -246,8 +246,8 @@ vtoc_set_cchhb (cchhb_t *addr, u_int16_t cc, u_int16_t hh, u_int8_t b)
addr->b = b;
}
-void
-vtoc_set_date (labeldate_t * d, u_int8_t year, u_int16_t day)
+void
+vtoc_set_date (labeldate_t * d, u_int8_t year, u_int16_t day)
{
PDEBUG
d->year = year;
@@ -262,16 +262,16 @@ vtoc_volume_label_init (volume_label_t *vlabel)
{
PDEBUG
sprintf(buffer, "%84s", " ");
- vtoc_ebcdic_enc(buffer, buffer, 84);
+ vtoc_ebcdic_enc(buffer, buffer, 84);
strncpy(vlabel->volkey, buffer, 84);
}
/*
* reads the volume label from dasd
*/
-int
+int
vtoc_read_volume_label (int f, unsigned long vlabel_start,
- volume_label_t *vlabel)
+ volume_label_t *vlabel)
{
PDEBUG
int rc;
@@ -295,9 +295,9 @@ vtoc_read_volume_label (int f, unsigned long vlabel_start,
/*
* writes the volume label to dasd
*/
-int
+int
vtoc_write_volume_label (int f, unsigned long vlabel_start,
- volume_label_t *vlabel)
+ volume_label_t *vlabel)
{
PDEBUG
int rc;
@@ -306,8 +306,8 @@ vtoc_write_volume_label (int f, unsigned long vlabel_start,
vtoc_error(unable_to_seek, "vtoc_write_volume_label",
_("Could not write volume label."));
- rc = write(f, vlabel, sizeof(volume_label_t));
- if (rc != sizeof(volume_label_t))
+ rc = write(f, vlabel, sizeof(volume_label_t));
+ if (rc != sizeof(volume_label_t))
vtoc_error(unable_to_write, "vtoc_write_volume_label",
_("Could not write volume label."));
@@ -345,7 +345,7 @@ vtoc_volume_label_set_volser (volume_label_t *vlabel, char *volser)
}
/*
- * returns the volume serial number right after it is translated
+ * returns the volume serial number right after it is translated
* to ASCII
*/
char *
@@ -366,12 +366,12 @@ vtoc_volume_label_set_key (volume_label_t *vlabel, char *key)
{
PDEBUG
char s[4];
-
+
vtoc_ebcdic_enc(key, s, 4);
strncpy(vlabel->volkey, s, 4);
-
+
return;
-}
+}
/*
* sets the volume label identifier right
@@ -406,27 +406,27 @@ vtoc_volume_label_get_label (volume_label_t *vlabel, char *lbl)
* reads either a format4 label or a format1 label
* from the specified position
*/
-void
+void
vtoc_read_label (int f, unsigned long position, format1_label_t *f1,
- format4_label_t *f4, format5_label_t *f5, format7_label_t *f7)
-{
+ format4_label_t *f4, format5_label_t *f5, format7_label_t *f7)
+{
PDEBUG
int t;
- if (lseek(f, position, SEEK_SET) == -1)
+ if (lseek(f, position, SEEK_SET) == -1)
vtoc_error(unable_to_seek, "vtoc_read_label",
_("Could not read VTOC labels."));
if (f1 != NULL) {
t = sizeof(format1_label_t);
- if (read(f, f1, t) != t)
+ if (read(f, f1, t) != t)
vtoc_error(unable_to_read, "vtoc_read_label",
_("Could not read VTOC FMT1 DSCB."));
}
if (f4 != NULL) {
t = sizeof(format4_label_t);
- if (read(f, f4, t) != t)
+ if (read(f, f4, t) != t)
vtoc_error(unable_to_read, "vtoc_read_label",
_("Could not read VTOC FMT4 DSCB."));
}
@@ -440,7 +440,7 @@ vtoc_read_label (int f, unsigned long position, format1_label_t *f1,
if (f7 != NULL) {
t = sizeof(format7_label_t);
- if (read(f, f7, t) != t)
+ if (read(f, f7, t) != t)
vtoc_error(unable_to_read, "vtoc_read_label",
_("Could not read VTOC FMT7 DSCB."));
}
@@ -451,40 +451,40 @@ vtoc_read_label (int f, unsigned long position, format1_label_t *f1,
* to the specified position
*/
void
-vtoc_write_label (int f, unsigned long position, format1_label_t *f1,
+vtoc_write_label (int f, unsigned long position, format1_label_t *f1,
format4_label_t *f4, format5_label_t *f5, format7_label_t *f7)
{
PDEBUG
int t;
- if (lseek(f, position, SEEK_SET) == -1)
+ if (lseek(f, position, SEEK_SET) == -1)
vtoc_error(unable_to_seek, "vtoc_write_label",
_("Could not write VTOC labels."));
if (f1 != NULL) {
t = sizeof(format1_label_t);
- if (write(f, f1, t) != t)
+ if (write(f, f1, t) != t)
vtoc_error(unable_to_write, "vtoc_write_label",
_("Could not write VTOC FMT1 DSCB."));
}
if (f4 != NULL) {
t = sizeof(format4_label_t);
- if (write(f, f4, t) != t)
+ if (write(f, f4, t) != t)
vtoc_error(unable_to_write, "vtoc_write_label",
_("Could not write VTOC FMT4 DSCB."));
}
if (f5 != NULL) {
t = sizeof(format5_label_t);
- if (write(f, f5, t) != t)
+ if (write(f, f5, t) != t)
vtoc_error(unable_to_write, "vtoc_write_label",
_("Could not write VTOC FMT5 DSCB."));
}
if (f7 != NULL) {
t = sizeof(format7_label_t);
- if (write(f, f7, t) != t)
+ if (write(f, f7, t) != t)
vtoc_error(unable_to_write, "vtoc_write_label",
_("Could not write VTOC FMT7 DSCB."));
}
@@ -493,11 +493,11 @@ vtoc_write_label (int f, unsigned long position, format1_label_t *f1,
/*
* initializes a format4 label
*/
-void
+void
vtoc_init_format4_label (format4_label_t *f4, unsigned int usable_partitions,
unsigned int cylinders, unsigned int tracks,
unsigned int blocks, unsigned int blksize,
- u_int16_t dev_type)
+ u_int16_t dev_type)
{
PDEBUG
int i;
@@ -566,7 +566,7 @@ vtoc_init_format4_label (format4_label_t *f4, unsigned int usable_partitions,
* initializes a format5 label
*/
void
-vtoc_init_format5_label (format5_label_t *f5)
+vtoc_init_format5_label (format5_label_t *f5)
{
PDEBUG
int i;
@@ -581,7 +581,7 @@ vtoc_init_format5_label (format5_label_t *f5)
* initializes a format7 label
*/
void
-vtoc_init_format7_label (format7_label_t *f7)
+vtoc_init_format7_label (format7_label_t *f7)
{
PDEBUG
int i;
@@ -595,9 +595,9 @@ vtoc_init_format7_label (format7_label_t *f7)
/*
* initializes a format1 label
*/
-void
+void
vtoc_init_format1_label (char *volid, unsigned int blksize,
- extent_t *part_extent, format1_label_t *f1)
+ extent_t *part_extent, format1_label_t *f1)
{
PDEBUG
struct tm * creatime;
@@ -653,7 +653,7 @@ vtoc_init_format1_label (char *volid, unsigned int blksize,
/*
* do some updates to the VTOC format4 label
*/
-void
+void
vtoc_update_format4_label (format4_label_t *f4, cchhb_t *highest_f1,
u_int16_t unused_update)
{
@@ -669,29 +669,29 @@ vtoc_update_format4_label (format4_label_t *f4, cchhb_t *highest_f1,
* reorganizes all extents within a FMT5 label
*/
static void
-vtoc_reorganize_FMT5_extents (format5_label_t *f5)
+vtoc_reorganize_FMT5_extents (format5_label_t *f5)
{
PDEBUG
ds5ext_t *ext, *last, tmp;
int i, j;
for (i=0; i<26; i++) {
- if (i==0)
- last = &f5->DS5AVEXT;
+ if (i==0)
+ last = &f5->DS5AVEXT;
else if ((i > 0) && (i < 8))
last = &f5->DS5EXTAV[i-1];
else
last = &f5->DS5MAVET[i-8];
for (j=i; j<26; j++) {
- if (j==0)
- ext = &f5->DS5AVEXT;
+ if (j==0)
+ ext = &f5->DS5AVEXT;
else if ((j > 0) && (j < 8))
ext = &f5->DS5EXTAV[j-1];
else
ext = &f5->DS5MAVET[j-8];
- if (((ext->t > 0) && (last->t == 0)) ||
+ if (((ext->t > 0) && (last->t == 0)) ||
((ext->t > 0) && (ext->t < last->t)))
{
tmp.t = last->t;
@@ -711,23 +711,23 @@ vtoc_reorganize_FMT5_extents (format5_label_t *f5)
/*
* add a free space extent description to the VTOC FMT5 DSCB
*/
-void
+void
vtoc_update_format5_label_add (format5_label_t *f5, int verbose, int cyl,
- int trk, u_int16_t a, u_int16_t b, u_int8_t c)
+ int trk, u_int16_t a, u_int16_t b, u_int8_t c)
{
PDEBUG
ds5ext_t *ext = NULL, *tmp = NULL;
- int i;
+ int i;
for (i=0; i<26; i++) {
- if (i==0)
- ext = &f5->DS5AVEXT;
+ if (i==0)
+ ext = &f5->DS5AVEXT;
else if ((i > 0) && (i < 8))
ext = &f5->DS5EXTAV[i-1];
else
ext = &f5->DS5MAVET[i-8];
- if (((a < ext->t) && (a + b*trk + c > ext->t)) ||
+ if (((a < ext->t) && (a + b*trk + c > ext->t)) ||
((a > ext->t) && (ext->t + ext->fc*trk + ext->ft > a)))
{
puts ("BUG: overlapping free space extents "
@@ -740,7 +740,7 @@ vtoc_update_format5_label_add (format5_label_t *f5, int verbose, int cyl,
ext->fc = b;
ext->ft = c;
tmp = ext;
- if (verbose)
+ if (verbose)
puts ("FMT5 add extent: add new extent");
break;
}
@@ -770,13 +770,13 @@ vtoc_update_format5_label_add (format5_label_t *f5, int verbose, int cyl,
bzero(tmp, sizeof(ds5ext_t));
tmp = ext;
- if (verbose)
+ if (verbose)
puts ("FMT5 add extent: "
"merge with predecessor");
i = -1;
continue;
- }
+ }
if ((tmp->t + tmp->fc*trk + tmp->ft) == ext->t) {
/* this extent succeeds the new one */
@@ -786,30 +786,30 @@ vtoc_update_format5_label_add (format5_label_t *f5, int verbose, int cyl,
bzero(tmp, sizeof(ds5ext_t));
tmp = ext;
- if (verbose)
+ if (verbose)
puts ("FMT5 add extent: "
"merge with successor");
i = -1;
continue;
- }
+ }
}
}
/*
* remove a free space extent description from the VTOC FMT5 DSCB
*/
-void
+void
vtoc_update_format5_label_del (format5_label_t *f5, int verbose, int cyl,
- int trk, u_int16_t a, u_int16_t b, u_int8_t c)
+ int trk, u_int16_t a, u_int16_t b, u_int8_t c)
{
PDEBUG
ds5ext_t *ext;
int i, counter=0;
-
+
for (i=0; i<26; i++) {
- if (i==0)
- ext = &f5->DS5AVEXT;
+ if (i==0)
+ ext = &f5->DS5AVEXT;
else if ((i > 0) && (i < 8))
ext = &f5->DS5EXTAV[i-1];
else
@@ -819,7 +819,7 @@ vtoc_update_format5_label_del (format5_label_t *f5, int verbose, int cyl,
/* fills up whole free space gap */
bzero(ext, sizeof(ds5ext_t));
- if (verbose)
+ if (verbose)
puts ("FMT5 del extent: fills whole gap");
counter++;
@@ -838,7 +838,7 @@ vtoc_update_format5_label_del (format5_label_t *f5, int verbose, int cyl,
ext->ft -= c;
}
- if (verbose)
+ if (verbose)
puts ("FMT5 del extent: left bounded");
counter++;
@@ -857,7 +857,7 @@ vtoc_update_format5_label_del (format5_label_t *f5, int verbose, int cyl,
ext->ft -= c;
}
- if (verbose)
+ if (verbose)
puts ("FMT5 del extent: right bounded");
counter++;
@@ -879,10 +879,10 @@ vtoc_update_format5_label_del (format5_label_t *f5, int verbose, int cyl,
ext->fc = (a - ext->t) / trk;
ext->ft = (a - ext->t) % trk;
- vtoc_update_format5_label_add(f5, verbose,
+ vtoc_update_format5_label_add(f5, verbose,
cyl, trk, x, y, z);
- if (verbose)
+ if (verbose)
puts ("FMT5 del extent: 2 pieces");
counter++;
@@ -897,7 +897,7 @@ vtoc_update_format5_label_del (format5_label_t *f5, int verbose, int cyl,
"in FMT5 DSCB!\nexiting...");
exit(1);
}
-
+
if ((a > ext->t) && (a < ext->t + ext->fc*trk + ext->ft)
&& (a + b*trk + c > ext->t + ext->fc*trk + ext->ft))
{
@@ -922,22 +922,22 @@ vtoc_update_format5_label_del (format5_label_t *f5, int verbose, int cyl,
* reorganizes all extents within a FMT7 label
*/
static void
-vtoc_reorganize_FMT7_extents (format7_label_t *f7)
+vtoc_reorganize_FMT7_extents (format7_label_t *f7)
{
PDEBUG
ds7ext_t *ext, *last, tmp;
int i, j;
for (i=0; i<16; i++) {
- if (i<5)
- last = &f7->DS7EXTNT[i];
- else
+ if (i<5)
+ last = &f7->DS7EXTNT[i];
+ else
last = &f7->DS7ADEXT[i-5];
for (j=i; j<16; j++) {
- if (j<5)
- ext = &f7->DS7EXTNT[j];
- else
+ if (j<5)
+ ext = &f7->DS7EXTNT[j];
+ else
ext = &f7->DS7ADEXT[j-5];
if (((ext->a > 0) && (last->a == 0))
@@ -957,18 +957,18 @@ vtoc_reorganize_FMT7_extents (format7_label_t *f7)
/*
* add a free space extent description to the VTOC FMT7 DSCB
*/
-void
+void
vtoc_update_format7_label_add (format7_label_t *f7, int verbose,
- u_int32_t a, u_int32_t b)
+ u_int32_t a, u_int32_t b)
{
PDEBUG
ds7ext_t *ext = NULL, *tmp = NULL;
- int i;
+ int i;
for (i=0; i<16; i++) {
- if (i<5)
- ext = &f7->DS7EXTNT[i];
- else
+ if (i<5)
+ ext = &f7->DS7EXTNT[i];
+ else
ext = &f7->DS7ADEXT[i-5];
if (((a < ext->a) && (b > ext->a) && (b < ext->b))
@@ -984,7 +984,7 @@ vtoc_update_format7_label_add (format7_label_t *f7, int verbose,
ext->b = b;
tmp = ext;
- if (verbose)
+ if (verbose)
puts ("FMT7 add extent: add new extent");
break;
@@ -998,9 +998,9 @@ vtoc_update_format7_label_add (format7_label_t *f7, int verbose,
}
for (i=0; i<16; i++) {
- if (i<5)
- ext = &f7->DS7EXTNT[i];
- else
+ if (i<5)
+ ext = &f7->DS7EXTNT[i];
+ else
ext = &f7->DS7ADEXT[i-5];
if ((ext->a + ext->b) == 0x00000000)
@@ -1012,13 +1012,13 @@ vtoc_update_format7_label_add (format7_label_t *f7, int verbose,
bzero(tmp, sizeof(ds7ext_t));
tmp = ext;
- if (verbose)
+ if (verbose)
puts ("FMT7 add extent: "
"merge with predecessor");
i = -1;
continue;
- }
+ }
if (ext->a == (tmp->b + 1)) {
/* this extent succeeds the new one */
@@ -1026,37 +1026,37 @@ vtoc_update_format7_label_add (format7_label_t *f7, int verbose,
bzero(tmp, sizeof(ds7ext_t));
tmp = ext;
- if (verbose)
+ if (verbose)
puts ("FMT7 add extent: merge with successor");
i = -1;
continue;
- }
+ }
}
}
/*
* remove a free space extent description from the VTOC FMT7 DSCB
*/
-void
+void
vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
- u_int32_t a, u_int32_t b)
+ u_int32_t a, u_int32_t b)
{
PDEBUG
ds7ext_t *ext;
int i, counter=0;
-
+
for (i=0; i<16; i++) {
- if (i<5)
- ext = &f7->DS7EXTNT[i];
- else
+ if (i<5)
+ ext = &f7->DS7EXTNT[i];
+ else
ext = &f7->DS7ADEXT[i-5];
if ((a == ext->a) && (b == ext->b)) {
/* fills up whole free space gap */
bzero(ext, sizeof(ds7ext_t));
- if (verbose)
+ if (verbose)
puts ("FMT7 del extent: fills whole gap");
counter++;
@@ -1067,7 +1067,7 @@ vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
/* left-bounded in free space gap */
ext->a = b + 1;
- if (verbose)
+ if (verbose)
puts ("FMT7 add extent: left-bounded");
counter++;
@@ -1078,7 +1078,7 @@ vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
/* right-bounded in free space gap */
ext->b = a - 1;
- if (verbose)
+ if (verbose)
puts ("FMT7 add extent: right-bounded");
counter++;
@@ -1090,7 +1090,7 @@ vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
vtoc_update_format7_label_add(f7, verbose, b+1, ext->b);
ext->b = a - 1;
- if (verbose)
+ if (verbose)
puts ("FMT7 add extent: 2 pieces");
counter++;
diff --git a/libparted/tests/common.c b/libparted/tests/common.c
index e7ce56f..f759745 100644
--- a/libparted/tests/common.c
+++ b/libparted/tests/common.c
@@ -69,6 +69,6 @@ _implemented_disk_label (const char *label)
/* Not implemented yet */
if (strncmp (label, "aix", 3) == 0)
return 0;
-
+
return 1;
}
diff --git a/libparted/timer.c b/libparted/timer.c
index a7981e5..caa09fd 100644
--- a/libparted/timer.c
+++ b/libparted/timer.c
@@ -21,23 +21,23 @@
/**
* \addtogroup PedTimer
*
- * \brief A PedTimer keeps track of the progress of a single (possibly
- * compound) operation.
+ * \brief A PedTimer keeps track of the progress of a single (possibly
+ * compound) operation.
*
- * The user of libparted constructs a PedTimer, and passes it to libparted
- * functions that are likely to be expensive operations
+ * The user of libparted constructs a PedTimer, and passes it to libparted
+ * functions that are likely to be expensive operations
* (like ped_file_system_resize). Use of timers is optional... you may
* pass NULL instead.
- *
+ *
* When you create a PedTimer, you must specify a timer handler function.
* This will be called when there's an update on how work is progressing.
- *
+ *
* Timers may be nested. When a timer is constructed, you can choose
* to assign it a parent, along with an estimate of what proportion of
* the total (parent's) time will be used in the nested operation. In
* this case, the nested timer's handler is internal to libparted,
* and simply updates the parent's progress, and calls its handler.
- *
+ *
* @{
*/
@@ -56,7 +56,7 @@ typedef struct {
/**
- * \brief Creates a timer.
+ * \brief Creates a timer.
*
* Context will be passed in the \p context
* argument to the \p handler, when it is invoked.
@@ -107,14 +107,14 @@ _nest_handler (PedTimer* timer, void* context)
}
-/**
- * \brief Creates a new nested timer.
+/**
+ * \brief Creates a new nested timer.
*
* This function creates a "nested" timer that describes the progress
- * of a subtask. \p parent is the parent timer, and \p nested_frac is
- * the estimated proportion (between 0 and 1) of the time that will be
- * spent doing the nested timer's operation. The timer should only be
- * constructed immediately prior to starting the nested operation.
+ * of a subtask. \p parent is the parent timer, and \p nested_frac is
+ * the estimated proportion (between 0 and 1) of the time that will be
+ * spent doing the nested timer's operation. The timer should only be
+ * constructed immediately prior to starting the nested operation.
* (It will be inaccurate, otherwise).
* Updates to the progress of the subtask are propagated
* back through to the parent task's timer.
@@ -156,12 +156,12 @@ ped_timer_destroy_nested (PedTimer* timer)
}
/**
- * \internal
+ * \internal
*
* \brief This function calls the update handler, making sure that it has
- * the latest time.
+ * the latest time.
*
- * First it updates \p timer->now and recomputes \p timer->predicted_end,
+ * First it updates \p timer->now and recomputes \p timer->predicted_end,
* and then calls the handler.
*/
void
@@ -177,11 +177,11 @@ ped_timer_touch (PedTimer* timer)
timer->handler (timer, timer->context);
}
-/**
+/**
* \internal
- *
+ *
* \brief This function sets the \p timer into a "start of task" position.
- *
+ *
* It resets the \p timer, by setting \p timer->start and \p timer->now
* to the current time.
*/
@@ -198,12 +198,12 @@ ped_timer_reset (PedTimer* timer)
ped_timer_touch (timer);
}
-/**
+/**
* \internal
- *
+ *
* \brief This function tells a \p timer what fraction \p frac of the task
* has been completed.
- *
+ *
* Sets the new \p timer->frac, and calls ped_timer_touch().
*/
void
@@ -224,11 +224,11 @@ ped_timer_update (PedTimer* timer, float frac)
}
/**
- * \internal
- *
+ * \internal
+ *
* \brief This function changes the description of the current task that the
* \p timer describes.
- *
+ *
* Sets a new name - \p state_name - for the current "phase" of the operation,
* and calls ped_timer_touch().
*/
diff --git a/libparted/unit.c b/libparted/unit.c
index c870fab..66bf571 100644
--- a/libparted/unit.c
+++ b/libparted/unit.c
@@ -20,26 +20,26 @@
/**
* \addtogroup PedUnit
- *
+ *
* \brief The PedUnit module provides a standard mechanism for describing
- * and parsing locations within devices in human-friendly plain text.
+ * and parsing locations within devices in human-friendly plain text.
*
- * Internally, libparted uses PedSector (which is typedef'ed to be long long
- * in <parted/device.h>) to describe device locations such as the start and
- * end of partitions. However, sector numbers are often long and unintuitive.
- * For example, my extended partition starts at sector 208845. PedUnit allows
- * this location to be represented in more intutitive ways, including "106Mb",
- * "0Gb" and "0%", as well as "208845s". PedUnit aims to provide facilities
+ * Internally, libparted uses PedSector (which is typedef'ed to be long long
+ * in <parted/device.h>) to describe device locations such as the start and
+ * end of partitions. However, sector numbers are often long and unintuitive.
+ * For example, my extended partition starts at sector 208845. PedUnit allows
+ * this location to be represented in more intutitive ways, including "106Mb",
+ * "0Gb" and "0%", as well as "208845s". PedUnit aims to provide facilities
* to provide a consistent system for describing device locations all
* throughout libparted.
- *
+ *
* PedUnit provides two basic services: converting a PedSector into a text
* representation, and parsing a text representation into a PedSector.
* PedUnit currently supports these units:
- *
+ *
* sectors, bytes, kilobytes, megabytes, gigabytes, terabytes, compact,
* cylinder and percent.
- *
+ *
* PedUnit has a global variable that contains the default unit for all
* conversions.
*
@@ -147,7 +147,7 @@ ped_unit_get_size (const PedDevice* dev, PedUnit unit)
/**
* Get a textual (non-internationalized) representation of a \p unit.
- *
+ *
* For example, the textual representation of PED_UNIT_SECTOR is "s".
*/
const char*
@@ -186,7 +186,7 @@ ped_strdup (const char *str)
/**
* \brief Get a string that describes the location of the \p byte on
* device \p dev.
- *
+ *
* The string is described with the desired \p unit.
* The returned string must be freed with free().
*/
@@ -199,7 +199,7 @@ ped_unit_format_custom_byte (const PedDevice* dev, PedSector byte, PedUnit unit)
int p;
PED_ASSERT (dev != NULL, return NULL);
-
+
/* CHS has a special comma-separated format. */
if (unit == PED_UNIT_CHS) {
const PedCHSGeometry *chs = &dev->bios_geom;
@@ -219,7 +219,7 @@ ped_unit_format_custom_byte (const PedDevice* dev, PedSector byte, PedUnit unit)
ped_unit_get_name (unit));
return ped_strdup (buf);
}
-
+
if (unit == PED_UNIT_COMPACT) {
if (byte >= 10LL * PED_TERABYTE_SIZE)
unit = PED_UNIT_TERABYTE;
@@ -258,7 +258,7 @@ ped_unit_format_custom_byte (const PedDevice* dev, PedSector byte, PedUnit unit)
/**
* \brief Get a string that describes the location of the \p byte on
* device \p dev.
- *
+ *
* The string is described with the default unit, which is set
* by ped_unit_set_default().
* The returned string must be freed with free().
@@ -272,7 +272,7 @@ ped_unit_format_byte (const PedDevice* dev, PedSector byte)
/**
* \brief Get a string that describes the location \p sector on device \p dev.
- *
+ *
* The string is described with the desired \p unit.
* The returned string must be freed with free().
*/
@@ -285,7 +285,7 @@ ped_unit_format_custom (const PedDevice* dev, PedSector sector, PedUnit unit)
/**
* \brief Get a string that describes the location \p sector on device \p dev.
- *
+ *
* The string is described with the default unit, which is set
* by ped_unit_set_default().
* The returned string must be freed with free().
@@ -299,13 +299,13 @@ ped_unit_format (const PedDevice* dev, PedSector sector)
}
/**
- * If \p str contains a valid description of a location on \p dev,
- * then \p *sector is modified to describe the location and a geometry
- * is created in \p *range describing a 2 units large area centered on
- * \p *sector. If the \p range as described here would be partially outside
- * the device \p dev, the geometry returned is the intersection between the
- * former and the whole device geometry. If no units are specified, then the
- * default unit is assumed.
+ * If \p str contains a valid description of a location on \p dev,
+ * then \p *sector is modified to describe the location and a geometry
+ * is created in \p *range describing a 2 units large area centered on
+ * \p *sector. If the \p range as described here would be partially outside
+ * the device \p dev, the geometry returned is the intersection between the
+ * former and the whole device geometry. If no units are specified, then the
+ * default unit is assumed.
*
* \return \c 1 if \p str is a valid location description, \c 0 otherwise
*/
@@ -464,9 +464,9 @@ parse_unit_suffix (const char* suffix, PedUnit suggested_unit)
case 'b': return PED_UNIT_BYTE;
case 'k': return PED_UNIT_KILOBYTE;
case 'm': return PED_UNIT_MEGABYTE;
- case 'g': return PED_UNIT_GIGABYTE;
+ case 'g': return PED_UNIT_GIGABYTE;
case 't': return PED_UNIT_TERABYTE;
- case 'c': return PED_UNIT_CYLINDER;
+ case 'c': return PED_UNIT_CYLINDER;
case '%': return PED_UNIT_PERCENT;
}
}
@@ -482,17 +482,17 @@ parse_unit_suffix (const char* suffix, PedUnit suggested_unit)
}
/**
- * If \p str contains a valid description of a location on \p dev, then
+ * If \p str contains a valid description of a location on \p dev, then
* \p *sector is modified to describe the location and a geometry is created
* in \p *range describing a 2 units large area centered on \p *sector. If the
* \p range as described here would be partially outside the device \p dev, the
* geometry returned is the intersection between the former and the whole
* device geometry. If no units are specified, then the default unit is
- * assumed.
+ * assumed.
*
* \throws PED_EXCEPTION_ERROR if \p str contains invalid description of a
* location
- * \throws PED_EXCEPTION_ERROR if location described by \p str
+ * \throws PED_EXCEPTION_ERROR if location described by \p str
* is outside of the device \p dev->path
*
* \return \c 1 if \p str is a valid location description, \c 0 otherwise.