search for: str_e2label

Displaying 10 results from an estimated 10 matches for "str_e2label".

Did you mean: set_e2label
2015 Jul 08
0
[PATCH 2/5] labels: move e2label to ext2.c and call it locally
...a/daemon/ext2.c b/daemon/ext2.c index e8d2655..7bb1221 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -38,6 +38,7 @@ GUESTFSD_EXT_CMD(str_resize2fs, resize2fs); GUESTFSD_EXT_CMD(str_mke2fs, mke2fs); GUESTFSD_EXT_CMD(str_lsattr, lsattr); GUESTFSD_EXT_CMD(str_chattr, chattr); +GUESTFSD_EXT_CMD(str_e2label, e2label); /* https://bugzilla.redhat.com/show_bug.cgi?id=978302#c1 */ int @@ -123,14 +124,30 @@ do_tune2fs_l (const char *device) } int +ext_set_label (const char *device, const char *label) +{ + int r; + CLEANUP_FREE char *err = NULL; + + if (strlen (label) > EXT2_LABEL_MAX) { +...
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 1/5] labels: move btrfslabel to btrfs.c
...a/daemon/labels.c b/daemon/labels.c index cfcb4df..eec5b96 100644 --- a/daemon/labels.c +++ b/daemon/labels.c @@ -27,29 +27,12 @@ #include "actions.h" #include "optgroups.h" -GUESTFSD_EXT_CMD(str_btrfs, btrfs); GUESTFSD_EXT_CMD(str_dosfslabel, dosfslabel); GUESTFSD_EXT_CMD(str_e2label, e2label); GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel); GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin); static int -btrfslabel (const char *device, const char *label) -{ - int r; - CLEANUP_FREE char *err = NULL; - - r = command (NULL, &err, str_btrfs, "filesystem", "label&quot...
2012 Aug 30
1
[PATCH] collect list of called external commands
...(r == -1) { reply_with_error ("%s", err); goto done; diff --git a/daemon/labels.c b/daemon/labels.c index b28d1b2..5c4a930 100644 --- a/daemon/labels.c +++ b/daemon/labels.c @@ -27,14 +27,16 @@ #include "actions.h" #include "optgroups.h" +GUESTFS_EXT_CMD(str_e2label, e2label); +GUESTFS_EXT_CMD(str_ntfslabel, ntfslabel); + static int e2label (const char *device, const char *label) { int r; char *err; - char prog[] = "e2label"; - if (e2prog (prog) == -1) + if (e2prog (str_e2label) == -1) return -1; if (strlen (label) > EXT2_L...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...f (r == -1) { reply_with_error ("%s", err); goto done; diff --git a/daemon/labels.c b/daemon/labels.c index 5c59a4c..ead6b46 100644 --- a/daemon/labels.c +++ b/daemon/labels.c @@ -27,6 +27,9 @@ #include "actions.h" #include "optgroups.h" +GUESTFSD_EXT_CMD(str_e2label, e2label); +GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel); + static int e2label (const char *device, const char *label) { @@ -39,7 +42,7 @@ e2label (const char *device, const char *label) return -1; } - r = command (NULL, &err, "e2label", device, label, NULL); + r = comman...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...3,14 +33,6 @@ #define MAX_ARGS 128 -GUESTFSD_EXT_CMD(str_tune2fs, tune2fs); -GUESTFSD_EXT_CMD(str_e2fsck, e2fsck); -GUESTFSD_EXT_CMD(str_resize2fs, resize2fs); -GUESTFSD_EXT_CMD(str_mke2fs, mke2fs); -GUESTFSD_EXT_CMD(str_lsattr, lsattr); -GUESTFSD_EXT_CMD(str_chattr, chattr); -GUESTFSD_EXT_CMD(str_e2label, e2label); - /* https://bugzilla.redhat.com/show_bug.cgi?id=978302#c1 */ int fstype_is_extfs (const char *fstype) @@ -57,7 +49,7 @@ do_tune2fs_l (const char *device) char *p, *pend, *colon; CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret); - r = command (&out, &err, str_tune2fs,...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...3,13 +33,8 @@ #define MAX_ARGS 128 -GUESTFSD_EXT_CMD(str_tune2fs, tune2fs); -GUESTFSD_EXT_CMD(str_e2fsck, e2fsck); -GUESTFSD_EXT_CMD(str_resize2fs, resize2fs); -GUESTFSD_EXT_CMD(str_mke2fs, mke2fs); -GUESTFSD_EXT_CMD(str_lsattr, lsattr); -GUESTFSD_EXT_CMD(str_chattr, chattr); -GUESTFSD_EXT_CMD(str_e2label, e2label); +DECLARE_EXTERNAL_COMMANDS ("tune2fs", "e2fsck", "resize2fs", + "mke2fs", "lsattr", "chattr", "e2label") /* https://bugzilla.redhat.com/show_bug.cgi?id=978302#c1 */ int @@ -57,7 +52,7 @@ d...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’