]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fdisk: Fix bad invalid flag 0x00000 warning message
authorFrancesco Cosoleto <cosoleto@gmail.com>
Thu, 15 Dec 2011 19:02:47 +0000 (20:02 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 16 Dec 2011 13:04:09 +0000 (14:04 +0100)
commit8db8295d824cd0c8cba9385e4635d6e311d69d3f
tree5880862daa2f59d8b70f9aea9843be50f858902e
parent4a96a62a093b1f07164334a5523e5942077a87e7
fdisk: Fix bad invalid flag 0x00000 warning message

This splits check_dos_label() and dos_init() off from get_boot() and gets
rid of the invalid flag 0x00000 warning message due to a check for MBR
signs in zeroized buffer:

memset(MBRbuffer, 0, 512);

if (what == create_empty_dos)
goto got_dos_table;
[...]
got_dos_table:
if (!valid_part_table_flag(MBRbuffer)) {
[...]
if (!valid_part_table_flag(pe->sectorbuffer))
fprintf(stderr, _("Warning: invalid flag 0x%04x of partition "
[...]

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
fdisk/fdisk.c
fdisk/fdisk.h