Displaying 20 results from an estimated 22 matches for "do_xfs_admin".
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 |...
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 ++++++++++++
dae...
2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...diff --git a/daemon/xfs.c b/daemon/xfs.c
index fb7acb4..2c93311 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -463,6 +463,13 @@ xfs_set_uuid (const char *device, const char *uuid)
}
int
+xfs_set_uuid_random (const char *device)
+{
+ optargs_bitmask = GUESTFS_XFS_ADMIN_UUID_BITMASK;
+ return do_xfs_admin (device, 0, 0, 0, 0, 0, NULL, "generate");
+}
+
+int
do_xfs_admin (const char *device,
int extunwritten, int imgfile, int v2log,
int projid32bit,
diff --git a/generator/actions.ml b/generator/actions.ml
index b1865e0..fb4a174 100644
--- a/generator/actions.m...
2015 Jun 24
0
[PATCH 3/5] uuid: use newly introduced do_xfs_admin_uuid of xfs
...s(-)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index eeb4ff7..aba6ef2 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -261,6 +261,7 @@ extern int copy_xattrs (const char *src, const char *dest);
/*-- in xfs.c --*/
/* Documented in xfs_admin(8). */
#define XFS_LABEL_MAX 12
+extern int do_xfs_admin_uuid (const char *device, const char *uuid);
/*-- debug-bmap.c --*/
extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv);
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 8626884..0520113 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -27,7 +27,6 @@
#includ...
2015 Jun 30
0
[PATCH v4 3/7] uuid: use newly introduced xfs_set_uuid of xfs
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
v3: rename do_xfs_admin_uuid to xfs_set_uuid
daemon/daemon.h | 1 +
daemon/uuids.c | 12 +-----------
daemon/xfs.c | 7 +++++++
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index dd7798c..cbe8ada 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -262,6 +262,...
2016 Jan 26
2
[PATCH] daemon: fold xfs_admin stdout to stderr
...ce we only print something on failure, fold stdout to
stderr so we can see everything on failure.
---
daemon/xfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/xfs.c b/daemon/xfs.c
index abc2736..7f72e6a 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -537,7 +537,7 @@ do_xfs_admin (const char *device,
ADD_ARG (argv, i, device);
ADD_ARG (argv, i, NULL);
- r = commandv (NULL, &err, argv);
+ r = commandvf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR, argv);
if (r == -1) {
reply_with_error ("%s: %s", device, err);
return -1;
--
2.5.0
2014 Nov 12
1
[PATCH] daemon: check xfs label lengths (RHBZ#1162966).
...return -1;
+ }
+
r = command (NULL, &err, str_xfs_admin, "-L", label, device, NULL);
if (r == -1) {
reply_with_error ("%s", err);
diff --git a/daemon/xfs.c b/daemon/xfs.c
index 725f7b3..687013b 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -498,6 +498,12 @@ do_xfs_admin (const char *device,
}
if (optargs_bitmask & GUESTFS_XFS_ADMIN_LABEL_BITMASK) {
+ if (strlen (label) > XFS_LABEL_MAX) {
+ reply_with_error ("%s: xfs labels are limited to %d bytes",
+ label, XFS_LABEL_MAX);
+ return -1;
+ }
+
ADD_...
2015 Jun 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
...diff --git a/daemon/xfs.c b/daemon/xfs.c
index fb7acb4..2c93311 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -463,6 +463,13 @@ xfs_set_uuid (const char *device, const char *uuid)
}
int
+xfs_set_uuid_random (const char *device)
+{
+ optargs_bitmask = GUESTFS_XFS_ADMIN_UUID_BITMASK;
+ return do_xfs_admin (device, 0, 0, 0, 0, 0, NULL, "generate");
+}
+
+int
do_xfs_admin (const char *device,
int extunwritten, int imgfile, int v2log,
int projid32bit,
--
2.1.0
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...diff --git a/daemon/xfs.c b/daemon/xfs.c
index fb7acb4..2c93311 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -463,6 +463,13 @@ xfs_set_uuid (const char *device, const char *uuid)
}
int
+xfs_set_uuid_random (const char *device)
+{
+ optargs_bitmask = GUESTFS_XFS_ADMIN_UUID_BITMASK;
+ return do_xfs_admin (device, 0, 0, 0, 0, 0, NULL, "generate");
+}
+
+int
do_xfs_admin (const char *device,
int extunwritten, int imgfile, int v2log,
int projid32bit,
diff --git a/generator/actions.ml b/generator/actions.ml
index b1865e0..b214c37 100644
--- a/generator/actions.m...
2015 Jun 30
13
[PATCH v4 0/7] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- Introduce set_uuid_random
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existing functions.
v4: introduce get_random_uuid
improve testcases
squash internal API patches
v3.1: fix typos
v3: set errno if feature is not available.
Chen Hanxiao (7):
2015 Jul 01
5
[PATCH v5 0/3] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- Introduce set_uuid_random
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existing functions.
v5: use NOT_SUPPORTED macro
improve testcases
v4: introduce get_random_uuid
improve testcases
squash internal API patches
v3.1: fix typos
v3: set errno
2015 Jun 24
10
[PATCH 0/5] uuid: add btrfs uuid change support and some rework
...add support of this.
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existed functions.
-- Introduce new API: btrfstune_set_uuid_random
Chen Hanxiao (5):
uuid: add support to change uuid of btrfs partition
uuid: use existed function of ext2
uuid: use newly introduced do_xfs_admin_uuid of xfs
uuid: use existed do_mkswap_U
New API: btrfstune_set_uuid_random
daemon/btrfs.c | 81 ++++++++++++++++++++++++++++++++++++++++++
daemon/daemon.h | 6 ++++
daemon/uuids.c | 44 +++++------------------
daemon/xfs.c |...
2012 Aug 20
1
[PATCH] xfs: add new api xfs_admin
...| 1 +
src/MAX_PROC_NR | 2 +-
6 files changed, 106 insertions(+), 3 deletions(-)
diff --git a/daemon/xfs.c b/daemon/xfs.c
index b331b9b..b32d256 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -460,3 +460,81 @@ error:
if (out) free (out);
return NULL;
}
+
+char *
+do_xfs_admin (const char *device,
+ int extunwritten, int imgfile, int v2log,
+ int printlabel, int projid32bit, int printuuid,
+ int lazycounter, const char *label, const char *uuid)
+{
+ int r;
+ char *out = NULL, *err = NULL;
+ const char *argv[MAX_ARGS];
+ size_t i...
2015 Jul 08
0
Re: [PATCH 0/5] labels: rework
...ote:
> 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 ++++-----------------------------------------------------
> dae...
2015 Jun 26
5
[PATCH v3 0/4] uuid: add btrfs uuid change support and some rework
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existing functions.
v3: set errno if feature is not available.
Chen Hanxiao (4):
uuid: add support to change uuid of btrfs partition
uuid: use existing function of ext2
uuid: use newly introduced
2015 Jun 26
14
[PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- Introduce set_uuid_random
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existing functions.
v3.1: fix typos
v3: set errno if feature is not available.
Chen Hanxiao (9):
uuid: add support to change uuid of btrfs partition
uuid: use existing function of
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
..."%s", err);
@@ -374,7 +380,7 @@ do_xfs_growfs (const char *path,
return -1;
}
- ADD_ARG (argv, i, "xfs_growfs");
+ ADD_ARG (argv, i, str_xfs_growfs);
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_GROWFS_DATASEC_BITMASK))
@@ -471,7 +477,7 @@ do_xfs_admin (const char *device,
const char *argv[MAX_ARGS];
size_t i = 0;
- ADD_ARG (argv, i, "xfs_admin");
+ ADD_ARG (argv, i, str_xfs_admin);
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK))
@@ -548,7 +554,7 @@ do_xfs_repair (const cha...
2012 Aug 30
1
[PATCH] collect list of called external commands
..."%s", err);
@@ -374,7 +379,7 @@ do_xfs_growfs (const char *path,
return -1;
}
- ADD_ARG (argv, i, "xfs_growfs");
+ ADD_ARG (argv, i, str_xfs_growfs);
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_GROWFS_DATASEC_BITMASK))
@@ -471,7 +476,7 @@ do_xfs_admin (const char *device,
const char *argv[MAX_ARGS];
size_t i = 0;
- ADD_ARG (argv, i, "xfs_admin");
+ ADD_ARG (argv, i, str_xfs_admin);
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK))
diff --git a/daemon/zero.c b/daemon/zero.c
i...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...r);
return NULL;
@@ -376,7 +370,7 @@ do_xfs_growfs (const char *path,
return -1;
}
- ADD_ARG (argv, i, str_xfs_growfs);
+ ADD_ARG (argv, i, "xfs_growfs");
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_GROWFS_DATASEC_BITMASK))
@@ -487,7 +481,7 @@ do_xfs_admin (const char *device,
const char *argv[MAX_ARGS];
size_t i = 0;
- ADD_ARG (argv, i, str_xfs_admin);
+ ADD_ARG (argv, i, "xfs_admin");
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK))
@@ -564,7 +558,7 @@ do_xfs_repair (const cha...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...r);
return NULL;
@@ -376,7 +373,7 @@ do_xfs_growfs (const char *path,
return -1;
}
- ADD_ARG (argv, i, str_xfs_growfs);
+ ADD_ARG (argv, i, "xfs_growfs");
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_GROWFS_DATASEC_BITMASK))
@@ -487,7 +484,7 @@ do_xfs_admin (const char *device,
const char *argv[MAX_ARGS];
size_t i = 0;
- ADD_ARG (argv, i, str_xfs_admin);
+ ADD_ARG (argv, i, "xfs_admin");
/* Optional arguments */
if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK))
@@ -564,7 +561,7 @@ do_xfs_repair (const cha...