When moving NTFS partition to a new location we need to update its boot sector
as well as backup boot sector. Otherwise ntfslabel --new-serial won't work.
FAT label is interpreted according to current OEM DOS codepage which is
system dependent setting. But most DOS codepages have same characters in
printable ASCII range, so this is the only safe range of characters which
are interpreted in same way by most programs and operating systems. Also
all DOS codepages are only 8bit, so characters above U+FF cannot be stored
to FAT label.
When libparted scans luks partitions it calls detectFileSystem
regardless of whether luks is open or closed. This results in
mapperNode being empty, so we need to prevent detectFileSystem
from reporting anything in this case.
This would rapidly simplify UDF code if all checks are done by caller.
Also checks for MIN_UDF_BLOCKS/MAX_UDF_BLOCKS are removed as they should be
covered by udf::minCapacity() and udf::maxCapacity().
Mkudffs from udftools prior to version 1.1 damages the label if it contains
non-ASCII characters.
The Volume Identifier (--vid) can only contain 30 bytes, either 30
ISO-8859-1 (Latin 1) characters or 15 UCS-2BE characters. Store the most
characters possible in the Volume Identifier.
Some file systems such as UDF or F2FS only support writing labels when creating
them.
At the moment this only works in new partition dialog and not in the partition
properties dialog.
For reading UDF label and UUID is needed blkid >= 2.30. For creating new
UDF filesystem is needed mkudffs binary from the udftools package.
When creating new UDF fileystem, revision 2.01 for hard disk media is used.
Therefore it is not possible to use it for optical (or other) medias.
Problems:
* Check for min and max capacity is incorrect as it depends on logical
(sector) size of the disk.
* Check for max label length is incorrect too as it depends on characters
itself in label.
* Specifying label is not working yet as FileSystem::create() does not get
label parameter.
* UDF filesystem should be used on unpartitioned disk, without MBR or GPT
and spanning whole disk, but KDE Partition Manager does not support it.
* When MBR is used, MBR partition id should be 0x07, but currently it is
incorrect 0x83. See: https://serverfault.com/a/829172 (same for GPT)
Some filesystems require mountpoint while some deviceNode to change file system
label only. So split writeLabel action into online and offline actions.