search for: xfslabel

Displaying 8 results from an estimated 8 matches for "xfslabel".

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 ++++++++++++----- daemon/labels.c | 70 ++++------------------------------------------------ daemon/ntfs.c | 19 ++++++++++++++ daemon/xfs.c | 7 ++++++ ge...
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 | 4 +++ daemon/ext2.c | 29 +++++++++++++++---- daemon/labels.c | 89 ++++----------------------------------------------------- daemon/ntfs.c | 19 ++++++++++++ daemon/xfs.c...
2015 Jul 08
0
[PATCH 3/5] labels: move ntfslabel to ntfs.c
...characters and return an error. This is not so easy since we - * don't have 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 = n...
2014 Nov 12
1
[PATCH] daemon: check xfs label lengths (RHBZ#1162966).
...hese to indicate errors * NB: you don't need to prefix the string with the current command, * it is added automatically by the client-side RPC stubs. diff --git a/daemon/labels.c b/daemon/labels.c index f417c57..cfcb4df 100644 --- a/daemon/labels.c +++ b/daemon/labels.c @@ -118,6 +118,12 @@ xfslabel (const char *device, const char *label) return -1; } + if (strlen (label) > XFS_LABEL_MAX) { + reply_with_error ("%s: xfs labels are limited to %d bytes", + label, XFS_LABEL_MAX); + return -1; + } + r = command (NULL, &err, str_xfs_admin, &...
2015 Jul 08
0
[PATCH 5/5] labels: return ENOTSUP if could not set label for specific fs
...hanged, 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't know how to set the label for '%s' filesystems", vfs_type); - r = -1;...
2015 Jul 08
0
Re: [PATCH 0/5] labels: rework
...ld 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 | 4 +++ > daemon/ext2.c | 29 +++++++++++++++---- > daemon/labels.c | 89 ++++----------------------------------------------------- > daemon/ntfs.c...
2016 Nov 25
3
[PATCH 1/2] daemon: allow to change the labels of swap partitions
...efix 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't know how to set the label for '%s' filesystems", vfs_type); diff --git a/daemon/...
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...ble->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 the label for '%s' filesystems", + v...