struct systypes {
- const unsigned char *name;
+ const char *name;
};
static uint sector_size = DEFAULT_SECTOR_SIZE,
#else
# define MBRbuffer bb_common_bufsiz1
#endif
-
+
#ifdef CONFIG_FEATURE_SUN_LABEL
static int sun_label; /* looking at sun disklabel */
#else
}
static int
-valid_part_table_flag(const unsigned char *b) {
+valid_part_table_flag(const char *mbuffer) {
+ const unsigned char *b = (const unsigned char *)mbuffer;
return (b[510] == 0x55 && b[511] == 0xaa);
}
puts(_("You may change all the disk params from the x menu"));
}
- snprintf(sunlabel->info, sizeof(sunlabel->info),
+ snprintf((char *)(sunlabel->info), sizeof(sunlabel->info),
"%s%s%s cyl %d alt %d hd %d sec %d",
p ? p->vendor : "", (p && *p->vendor) ? " " : "",
p ? p->model
const struct systypes *types = get_sys_types();
for (i=0; types[i].name; i++)
- if (types[i].name[0] == type)
+ if ((unsigned char )types[i].name[0] == type)
return types[i].name + 1;
return _("Unknown");
do {
printf("%c%2x %-15.15s", i ? ' ' : '\n',
- sys[next].name[0], partition_type(sys[next].name[0]));
+ (unsigned char)sys[next].name[0],
+ partition_type((unsigned char)sys[next].name[0]));
next = last[i++] + done;
if (i > 3 || next >= last[i]) {
i = 0;
static void
get_partition_table_geometry(void) {
- const unsigned char *bufp = MBRbuffer;
+ const unsigned char *bufp = (const unsigned char *)MBRbuffer;
struct partition *p;
int i, h, s, hh, ss;
int first = 1;