Displaying 11 results from an estimated 11 matches for "do_set_label".
2015 Jul 08
9
[PATCH 0/5] labels: rework
We should use the existing function from specific fs,
if not, move it to specific fs files.
Chen Hanxiao (5):
label: move btrfslabel to btrfs.c
label: move e2label to ext2.c and call it locally
label: move ntfslabel to ntfs.c
label: use existing do_xfs_admin for xfslabel
labels: return ENOTSUP if could not set label for specific fs
daemon/btrfs.c | 16 +++++++++++
daemon/daemon.h |
2015 Jul 08
5
[PATCH v2 0/4] labels: rework
We should use the existing function from specific fs,
if not, move it to specific fs files.
Chen Hanxiao (4):
labels: move e2label to ext2.c and call it directly
labels: move ntfslabel to ntfs.c
labels: use existing do_xfs_admin for xfslabel
labels: return ENOTSUP if could not set label for specific fs
daemon/daemon.h | 2 ++
daemon/ext2.c | 23 ++++++++++++-----
2015 Jul 08
0
[PATCH 2/5] labels: move e2label to ext2.c and call it locally
...eply_with_error ("%s", err);
+ return -1;
+ }
+
+ return 0;
+}
+
+int
do_set_e2label (const char *device, const char *label)
{
- const mountable_t mountable = {
- .type = MOUNTABLE_DEVICE,
- .device = /* not really ... */ (char *) device,
- .volume = NULL,
- };
- return do_set_label (&mountable, label);
+ return ext_set_label (device, label);
}
char *
diff --git a/daemon/labels.c b/daemon/labels.c
index eec5b96..1fadba4 100644
--- a/daemon/labels.c
+++ b/daemon/labels.c
@@ -28,7 +28,6 @@
#include "optgroups.h"
GUESTFSD_EXT_CMD(str_dosfslabel, dosfslabel)...
2015 Jul 08
0
[PATCH 1/5] labels: move btrfslabel to btrfs.c
...p;err, str_btrfs, "filesystem", "label",
- device, label, NULL);
- if (r == -1) {
- reply_with_error ("%s", err);
- return -1;
- }
-
- return 0;
-}
-
-static int
dosfslabel (const char *device, const char *label)
{
int r;
@@ -144,7 +127,7 @@ do_set_label (const mountable_t *mountable, const char *label)
return -1;
if (STREQ (vfs_type, "btrfs"))
- r = btrfslabel (mountable->device, label);
+ r = btrfs_set_label (mountable->device, label);
else if (STREQ (vfs_type, "msdos") ||
STREQ (vfs_type...
2015 Jul 08
0
[PATCH 3/5] labels: move ntfslabel to ntfs.c
...e the required libraries.
- */
- r = command (NULL, &err, str_ntfslabel, device, label, NULL);
- if (r == -1) {
- reply_with_error ("%s", err);
- return -1;
- }
-
- return 0;
-}
-
-static int
xfslabel (const char *device, const char *label)
{
int r;
@@ -116,7 +96,7 @@ do_set_label (const mountable_t *mountable, const char *label)
r = ext_set_label (mountable->device, label);
else if (STREQ (vfs_type, "ntfs"))
- r = ntfslabel (mountable->device, label);
+ r = ntfs_set_label (mountable->device, label);
else if (STREQ (vfs_type, "xfs...
2015 Jul 08
0
[PATCH 5/5] labels: return ENOTSUP if could not set label for specific fs
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
daemon/labels.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/daemon/labels.c b/daemon/labels.c
index 92d339c..a1a2f3b 100644
--- a/daemon/labels.c
+++ b/daemon/labels.c
@@ -85,11 +85,9 @@ do_set_label (const mountable_t *mountable, const char *label)
else if (STREQ (vfs_type, "xfs"))
r = xfslabel (mountable->device, label);
- else {
- reply_with_error ("don't know how to set the label for '%s' filesystems",
+ else
+ NOT_SUPPORTED(-1, "don...
2016 Nov 25
3
[PATCH 1/2] daemon: allow to change the labels of swap partitions
...vice, const char *label);
/* ordinary daemon functions use these to indicate errors
* NB: you don't need to prefix the string with the current command,
diff --git a/daemon/labels.c b/daemon/labels.c
index 20f27cb..aaa3eaf 100644
--- a/daemon/labels.c
+++ b/daemon/labels.c
@@ -85,6 +85,9 @@ do_set_label (const mountable_t *mountable, const char *label)
else if (STREQ (vfs_type, "xfs"))
r = xfslabel (mountable->device, label);
+ else if (STREQ (vfs_type, "swap"))
+ r = swap_set_label (mountable->device, label);
+
else
NOT_SUPPORTED (-1, "don'...
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but
don't update apis which must return mountables.
Matt
2012 Feb 27
4
[PATCH 0/4] Add various ntfs* tools and unify label setting.
This miscellaneous patch adds bindings for:
- ntfsfix
- ntfsclone
- ntfslabel
and unifies filesystem label setting through a single API 'set-label'
which replaces 'set-e2label' and is also able to set labels on NTFS
using the ntfslabel program.
'ntfsfix' has been added as a possible way to fix RHBZ#797760.
However I have not found a way to fully fix this bug. See
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...intf (&desc, "btrfsvol:%s/%s",
+ mountable->device, mountable->volume) == -1)
return NULL;
return desc;
diff --git a/daemon/labels.c b/daemon/labels.c
index 130f1db..20f27cb 100644
--- a/daemon/labels.c
+++ b/daemon/labels.c
@@ -86,8 +86,8 @@ do_set_label (const mountable_t *mountable, const char *label)
r = xfslabel (mountable->device, label);
else
- NOT_SUPPORTED(-1, "don't know how to set the label for '%s' filesystems",
- vfs_type);
+ NOT_SUPPORTED (-1, "don't know how to set...
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device.
---
generator/bindtests.ml | 2 +-
generator/c.ml | 7 +++++--
generator/csharp.ml | 6 ++++--
generator/daemon.ml | 4 ++--
generator/erlang.ml | 6 +++---
generator/fish.ml | 8 ++++----
generator/gobject.ml | 11 ++++++-----
generator/haskell.ml | 11 +++++++----
generator/java.ml | 10 +++++-----