[Pkg-libvirt-commits] [libguestfs] 11/21: labels: return ENOTSUP if could not set label for specific fs

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:16:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.50
in repository libguestfs.

commit 46be6934fc86a5117fb0d36ff50123752e4390a1
Author: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
Date:   Wed Jul 8 17:34:45 2015 +0800

    labels: return ENOTSUP if could not set label for specific fs
    
    Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 daemon/labels.c      | 6 ++----
 generator/actions.ml | 4 ++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/daemon/labels.c b/daemon/labels.c
index 57c6e93..130f1db 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't know how to set the label for '%s' filesystems",
                       vfs_type);
-    r = -1;
-  }
 
   return r;
 }
diff --git a/generator/actions.ml b/generator/actions.ml
index 8136d7b..16aeb4b 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -9947,6 +9947,10 @@ The label is limited to 11 bytes.
 
 =back
 
+If there is no support for changing the label
+for the type of the specified filesystem,
+set_label will fail and set errno as ENOTSUP.
+
 To read the label on a filesystem, call C<guestfs_vfs_label>." };
 
   { defaults with

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list