search for: str_ntfslabel

Displaying 13 results from an estimated 13 matches for "str_ntfslabel".

2015 Jan 15
1
[PATCH 2/2] daemon: use ntfslabel(1) to get ntfs labels
...RPC stubs. diff --git a/daemon/ntfs.c b/daemon/ntfs.c index 762ca88..f1d12e0 100644 --- a/daemon/ntfs.c +++ b/daemon/ntfs.c @@ -33,6 +33,7 @@ GUESTFSD_EXT_CMD(str_ntfs3g_probe, ntfs-3g.probe); GUESTFSD_EXT_CMD(str_ntfsresize, ntfsresize); GUESTFSD_EXT_CMD(str_ntfsfix, ntfsfix); +GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel); int optgroup_ntfs3g_available (void) @@ -46,6 +47,29 @@ optgroup_ntfsprogs_available (void) return prog_exists (str_ntfsresize); } +char * +ntfs_get_label (const char *device) +{ + int r; + CLEANUP_FREE char *err = NULL; + char *out = NULL; + size_t len; + + r = command...
2015 Jul 08
0
[PATCH 3/5] labels: move ntfslabel to ntfs.c
...n int swap_set_uuid (const char *device, const char *uuid); diff --git a/daemon/labels.c b/daemon/labels.c index 1fadba4..d3e3f55 100644 --- a/daemon/labels.c +++ b/daemon/labels.c @@ -28,7 +28,6 @@ #include "optgroups.h" GUESTFSD_EXT_CMD(str_dosfslabel, dosfslabel); -GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel); GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin); static int @@ -47,25 +46,6 @@ dosfslabel (const char *device, const char *label) } static int -ntfslabel (const char *device, const char *label) -{ - int r; - CLEANUP_FREE char *err = NULL; - - /* XXX We should check if the label i...
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
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 Jan 14
2
[PATCH] daemon: use btrfs(1) to get btrfs labels
blkid(1) (or actually, libblkid) seems to handle file system labels up to 127 characters. Considering that btrfs labels can be up to 255 characters, this means long labels are not read correctly (i.e. get truncated) by blkid. Get the file system type, and if btrfs is available invoke `btrfs filesystem` to get the label of btrfs file systems. --- daemon/blkid.c | 6 ++++++ daemon/btrfs.c | 24
2015 Jul 08
0
[PATCH 1/5] labels: move btrfslabel to btrfs.c
...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", - device, label, NULL); -...
2015 Jul 08
0
[PATCH 2/5] labels: move e2label to ext2.c and call it locally
...bel); } 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); -GUESTFSD_EXT_CMD(str_e2label, e2label); GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel); GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin); @@ -48,27 +47,6 @@ dosfslabel (const char *device, const char *label) } static int -e2label (const char *device, const char *label) -{ - int r; - CLEANUP_FREE char *err = NULL; - - if (strlen (label) > EXT2_LABEL_MAX) { - repl...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...ntfs.c b/daemon/ntfs.c index 3b759fef9..878f6e58a 100644 --- a/daemon/ntfs.c +++ b/daemon/ntfs.c @@ -31,21 +31,16 @@ #define MAX_ARGS 64 -GUESTFSD_EXT_CMD(str_ntfs3g_probe, ntfs-3g.probe); -GUESTFSD_EXT_CMD(str_ntfsresize, ntfsresize); -GUESTFSD_EXT_CMD(str_ntfsfix, ntfsfix); -GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel); - int optgroup_ntfs3g_available (void) { - return prog_exists (str_ntfs3g_probe); + return prog_exists ("ntfs3g.probe"); } int optgroup_ntfsprogs_available (void) { - return prog_exists (str_ntfsresize); + return prog_exists ("ntfsresize"); } char *...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...ntfs.c b/daemon/ntfs.c index 3b759fef9..c13bcc70c 100644 --- a/daemon/ntfs.c +++ b/daemon/ntfs.c @@ -31,21 +31,19 @@ #define MAX_ARGS 64 -GUESTFSD_EXT_CMD(str_ntfs3g_probe, ntfs-3g.probe); -GUESTFSD_EXT_CMD(str_ntfsresize, ntfsresize); -GUESTFSD_EXT_CMD(str_ntfsfix, ntfsfix); -GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel); +DECLARE_EXTERNAL_COMMANDS ("ntfs-3g.probe", + "ntfsresize", "ntfsfix", "ntfslabel") int optgroup_ntfs3g_available (void) { - return prog_exists (str_ntfs3g_probe); + return prog_exists ("ntfs3g.probe");...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...t;%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 = command (NULL, &err, str_e2label, device, lab...
2012 Aug 30
1
[PATCH] collect list of called external commands
...t;%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_LABEL_MAX) { @@ -43,7 +45,7 @@ e2label (con...
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’