Pad fat16/32 file system labels with spaces (#700228)
Mlabel sometimes writes uninitialised memory at the end of the label. This causes mlabel, and therefore GParted, to display extra junk at the end of the label. Depending on the bytes written GParted may also show the following error on stdout: (gpartedbin:18116): glibmm-CRITICAL **: unhandled exception (type Glib::Error) in signal handler: domain: g_convert_error code : 1 what : Invalid byte sequence in conversion input This is caused by a bug in mlabel, believed fixed in mtools 4.0.14. Effects at least Fedora 14, RHEL/CentOS 6.x and Debian 6. (Use label "1234567890" on Debian 6 to reproduce). Reproduction steps: # mkdosfs -F16 /dev/sda7 mkdosfs 3.0.9 (31 Jan 2010) # export MTOOLS_SKIP_CHECK=1 # mlabel ::123456 -i /dev/sda7 # mlabel -s :: -i /dev/sda7 Volume label is 123456~1t It is not possible to detect which characters are junk so they can't be trimmed. Instead just space pad labels so that at least newly written labels aren't effected. (Fat labels are space padded on the disk by definition anyway). Bug #700228 - FAT16/32 labels are sometimes shown corrupted
parent
519af1a7
Please register or sign in to comment