Signed-off-by: Karel Zak <kzak@redhat.com>
if (!mbr_is_valid_magic(pe->sectorbuffer)) {
fprintf(stderr,
- _("Warning: invalid flag 0x%04x of partition "
+ _("Warning: invalid flag 0x%02x%02x of partition "
"table %zd will be corrected by w(rite)\n"),
- pt_entry_flag(pe->sectorbuffer), i + 1);
+ pe->sectorbuffer[510],
+ pe->sectorbuffer[511],
+ i + 1);
pe->changed = 1;
fdisk_label_set_changed(cxt->label, 1);
}
extern sector_t extended_offset;
-/* A valid partition table sector ends in 0x55 0xaa */
-static inline unsigned int pt_entry_flag(unsigned char *b)
-{
- return ((unsigned int) b[510]) + (((unsigned int) b[511]) << 8);
-}
-
static inline int is_cleared_partition(struct dos_partition *p)
{
return !(!p || p->boot_ind || p->bh || p->bs || p->bc ||