+2004-07-11 Marco Gerards <metgerards@student.han.nl>
+
+ * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
+ one block instead of two when looking for the initial partition.
+ (grub_partition_probe): Initialize the local variable `p' with 0.
+ Use base 10 for the grub_strtoul call.
+ * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
+ need for one local variable.
+ (grub_strtoul): Don't add the new value to `num', instead of that
+ just assign it.
+
2004-07-11 Marco Gerards <metgerards@student.han.nl>
* conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
struct grub_apple_part apart;
struct grub_disk raw;
int partno = 0;
- int pos = GRUB_DISK_SECTOR_SIZE * 2;
+ int pos = GRUB_DISK_SECTOR_SIZE;
/* Enforce raw disk access. */
raw = *disk;
grub_partition_t
grub_partition_probe (grub_disk_t disk, const char *str)
{
- grub_partition_t p;
+ grub_partition_t p = 0;
int partnum = 0;
char *s = (char *) str;
}
/* Get the partition number. */
- partnum = grub_strtoul (s, &s, 0);
+ partnum = grub_strtoul (s, 0, 10);
if (grub_errno)
{
grub_error (GRUB_ERR_BAD_FILENAME, "invalid partition");
grub_strncpy (char *dest, const char *src, int c)
{
char *p = dest;
- int pos = 0;
-
- while ((*p++ = *src++) != '\0' && c > pos)
- pos++;
+
+ while ((*p++ = *src++) != '\0' && --c)
+ ;
return dest;
}
return 0;
}
- num += num * base + digit;
+ num = num * base + digit;
str++;
}