summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/devkit-disks-daemon.c2
-rw-r--r--src/job-change-filesystem-label.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/devkit-disks-daemon.c b/src/devkit-disks-daemon.c
index 114423c..fcd777d 100644
--- a/src/devkit-disks-daemon.c
+++ b/src/devkit-disks-daemon.c
@@ -314,7 +314,7 @@ static const DevkitDisksFilesystem known_file_systems[] = {
FALSE, /* supports_unix_owners */
TRUE, /* can_mount */
TRUE, /* can_create */
- 11, /* max_label_len */
+ 254, /* max_label_len */
TRUE, /* supports_label_rename */
FALSE, /* supports_online_label_rename*/
TRUE, /* supports_fsck */
diff --git a/src/job-change-filesystem-label.c b/src/job-change-filesystem-label.c
index e83775d..9edaad9 100644
--- a/src/job-change-filesystem-label.c
+++ b/src/job-change-filesystem-label.c
@@ -77,9 +77,12 @@ main (int argc, char **argv)
command_line = g_strdup_printf ("xfs_admin -L \"%s\" %s", new_label, device);
} else if (strcmp (fstype, "vfat") == 0) {
- if (!validate_and_escape_label (&new_label, 11))
+ if (!validate_and_escape_label (&new_label, 254))
goto out;
- command_line = g_strdup_printf ("dosfslabel %s \"%s\"", device, new_label);
+ if (strlen (new_label) == 0)
+ command_line = g_strdup_printf ("mlabel -c -i %s ::", device);
+ else
+ command_line = g_strdup_printf ("mlabel -i %s \"::%s\"", device, new_label);
} else {
g_printerr ("fstype %s not supported\n", fstype);