mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 17:19:22 +00:00
2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
Count partitions from 1 instead of 0 in the string representation
of partitions. Still use 0-based internally.
* partmap/sun.c (grub_sun_is_valid): A cosmetic change.
(sun_partition_map_iterate): Use grub_partition_t instead of
struct grub_partition *. Cast DESC->START_CYLINDER to
grub_uint64_t after converting the endian.
(sun_partition_map_probe): Subtract 1 for PARTNUM.
(sun_partition_map_get_name): Add 1 to P->INDEX.
* partmap/pc.c (grub_partition_parse): Subtract 1 for
PCDATA->DOS_PART.
(pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
* partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
zero instead of one.
(gpt_partition_map_probe): Subtract 1 for PARTNUM.
(gpt_partition_map_get_name): Add 1 into P->INDEX.
* partmap/apple.c (apple_partition_map_iterate): Change the type
of POS to unsigned.
(apple_partition_map_probe): Subtract 1 for PARTNUM.
(apple_partition_map_get_name): Add 1 into P->INDEX.
* partmap/amiga.c (amiga_partition_map_iterate): Change the type
of POS to unsigned.
(amiga_partition_map_iterate): Cast NEXT to grub_off_t to
calculate the offset of a partition.
(amiga_partition_map_probe): Subtract 1 for PARTNUM.
(amiga_partition_map_get_name): Add 1 into P->INDEX.
* partmap/acorn.c (acorn_partition_map_find): Change the type of
SECTOR to grub_disk_addr_t.
(acorn_partition_map_iterate): Likewise.
(acorn_partition_map_probe): Subtract 1 for PARTNUM.
Change the type of SECTOR to grub_disk_addr_t. Declare P on the
top.
(acorn_partition_map_get_name): Add 1 into P->INDEX.
* kern/i386/pc/init.c (make_install_device): Add 1 into
GRUB_INSTALL_DOS_PART.
* fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
conditional.
This commit is contained in:
1 parent
524a1e6a40
commit
deae281bfe
10 files changed
+131
-58
No files matched your search
+3
-3
@@ -236,7 +236,7 @@ grub_iso9660_mount (grub_disk_t disk)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (grub_strncmp ((char *) data->voldesc.voldesc.magic, "CD001", 5) == 0)
|
||||
if (grub_strncmp ((char *) data->voldesc.voldesc.magic, "CD001", 5) != 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
|
||||
goto fail;
|
||||
@@ -268,7 +268,7 @@ grub_iso9660_mount (grub_disk_t disk)
|
||||
sua_size = rootdir.len - sua_pos;
|
||||
|
||||
sua = grub_malloc (sua_size);
|
||||
if (!sua)
|
||||
if (! sua)
|
||||
goto fail;
|
||||
|
||||
if (grub_disk_read (disk, (grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
|
||||
@@ -622,7 +622,7 @@ grub_iso9660_dir (grub_device_t device, const char *path,
|
||||
#endif
|
||||
|
||||
data = grub_iso9660_mount (device->disk);
|
||||
if (!data)
|
||||
if (! data)
|
||||
goto fail;
|
||||
|
||||
rootnode.data = data;
|
||||
|
||||
Reference in new issue
Block a user