Skip to contentSkip to conversation

bug in parameter parsing mkfs

DISCUSSION Marcel Meyer 1 participant 1 message Jan 25, 2013 Util-Linux package

lore
Share & tools
lore
#0 lore raw

Hello,

we encountered a bug in the parameter parsing of mkfs after c&p of a wrongly written wiki article.

So

  $ mkfs.ext4 -Llabel /dev/device

and

  $ mkfs.ext4 -L label /dev/device

work as expected.

  $ mkfs ext4 -Llabel /dev/device       # note the missing "."

reports correctly "invalid blocks '/dev/device' on device 'ext4'" after invoking mkfs.ext2 as the default mkfs.

But when you enter the same wrong command line with an additional space in the label like

  $ mkfs ext4 -L label /dev/device

it formats /dev/device with an ext2 filesystem and the label "label".

Yours
Marcel