From: David Zeuthen Date: Thu, 5 Jun 2008 21:22:36 +0000 (-0400) Subject: revert "rename FilesystemSetLabel to SetLabel; some non-fs devices supports labels... X-Git-Tag: upstream/2.1.2~993 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeed84ae23bcc8d57bd28f889a3b3bd6c24d866e;p=platform%2Fupstream%2Fudisks2.git revert "rename FilesystemSetLabel to SetLabel; some non-fs devices supports labels too" This reverts commit f7ad692c880c44dd9d52844f9963e08e24ec92cf. Hmm.. thinking about it, it's probably better to have SwapSetLabel(), LinuxMdSetLabel() and so forth. --- diff --git a/src/devkit-disks-device.c b/src/devkit-disks-device.c index 6b8b3fd..b9203fd 100644 --- a/src/devkit-disks-device.c +++ b/src/devkit-disks-device.c @@ -5611,7 +5611,7 @@ out: /*--------------------------------------------------------------------------------------------------------------*/ static void -set_label_completed_cb (DBusGMethodInvocation *context, +filesystem_set_label_completed_cb (DBusGMethodInvocation *context, DevkitDisksDevice *device, PolKitCaller *pk_caller, gboolean job_was_cancelled, @@ -5650,7 +5650,7 @@ set_label_completed_cb (DBusGMethodInvocation *context, } gboolean -devkit_disks_device_set_label (DevkitDisksDevice *device, +devkit_disks_device_filesystem_set_label (DevkitDisksDevice *device, const char *new_label, DBusGMethodInvocation *context) { @@ -5699,13 +5699,13 @@ devkit_disks_device_set_label (DevkitDisksDevice *device, error = NULL; if (!job_new (context, - "SetLabel", + "FilesystemSetLabel", FALSE, device, pk_caller, argv, NULL, - set_label_completed_cb, + filesystem_set_label_completed_cb, g_strdup (new_label), g_free)) { goto out; diff --git a/src/devkit-disks-device.h b/src/devkit-disks-device.h index 71faf20..49cad70 100644 --- a/src/devkit-disks-device.h +++ b/src/devkit-disks-device.h @@ -146,9 +146,9 @@ gboolean devkit_disks_device_luks_change_passphrase (DevkitDisksDevice *devi const char *new_secret, DBusGMethodInvocation *context); -gboolean devkit_disks_device_set_label (DevkitDisksDevice *device, - const char *new_label, - DBusGMethodInvocation *context); +gboolean devkit_disks_device_filesystem_set_label (DevkitDisksDevice *device, + const char *new_label, + DBusGMethodInvocation *context); gboolean devkit_disks_device_drive_smart_refresh_data (DevkitDisksDevice *device, char **options, diff --git a/src/org.freedesktop.DeviceKit.Disks.Device.xml b/src/org.freedesktop.DeviceKit.Disks.Device.xml index 3c96a00..e305614 100644 --- a/src/org.freedesktop.DeviceKit.Disks.Device.xml +++ b/src/org.freedesktop.DeviceKit.Disks.Device.xml @@ -454,26 +454,39 @@ - + - + - New label for device + The type of file system to + create. Pass empty to not create a file + system and just clear the areas of the device known to host + file system signatures. Use @TODO@ to get a list of file systems that can + be created. + + + + + Supports the erase= option for erasing the contents of the device. To set the + label use label=NAME. Labels may not be supported + for all file systems and the allowed length of a label may vary (see @TODO@). + To create the file system on an LUKS encrypted + block device, pass the luks_encrypt= option with the + value set to the passphrase to use. For file systems with the concept of owners (e.g. + ext3), the options take_ownership_uid= and + take_ownership_gid= are supported and can be used to set the + initial owner of the created file system. - Changes the label on the device; note that this depends on the - the type/contents of the device; see the properties - id-usage. - id-type and - id-version - for details. Most file systems supports labels; other known - device types that supports labels include Linux swap space - version 2. @TODO@ lists the file systems that supports - labels. + Create a file system on a device. If + the luks_encrypt= option is passed then an + LUKS encrypted block device will be created, then unlocked and + the file system will be created on the corresponding + cleartext device. @@ -495,49 +508,30 @@ if the caller lacks the appropriate PolicyKit authorization - if the device is busy and changing the label requires e.g. an unmounted file system + if the device is busy if incoming parameters are invalid or an unknown error occured if the job was cancelled - if the device type doesn't support labels - + - + - The type of file system to - create. Pass empty to not create a file - system and just clear the areas of the device known to host - file system signatures. Use @TODO@ to get a list of file systems that can - be created. - - - - - Supports the erase= option for erasing the contents of the device. To set the - label use label=NAME. Labels may not be supported - for all file systems and the allowed length of a label may vary (see @TODO@). - To create the file system on an LUKS encrypted - block device, pass the luks_encrypt= option with the - value set to the passphrase to use. For file systems with the concept of owners (e.g. - ext3), the options take_ownership_uid= and - take_ownership_gid= are supported and can be used to set the - initial owner of the created file system. + New label for file system. - Create a file system on a device. If - the luks_encrypt= option is passed then an - LUKS encrypted block device will be created, then unlocked and - the file system will be created on the corresponding - cleartext device. + Changes the file system label. See the options parameter of + FilesystemCreate() + method for details of what valid labels are valid. @@ -559,9 +553,10 @@ if the caller lacks the appropriate PolicyKit authorization - if the device is busy + if the device is busy and changing the label requires an unmounted file system if incoming parameters are invalid or an unknown error occured if the job was cancelled + if the contents of the device doesn't support labels