search for: commandv

Displaying 20 results from an estimated 206 matches for "commandv".

Did you mean: command
2015 Jun 16
1
[PATCH] btrfs: remove unused 'out' variables
...e) size_t i = 0; char *fs_buf = NULL; CLEANUP_FREE char *err = NULL; - CLEANUP_FREE char *out = NULL; int r = -1; fs_buf = mount (fs); @@ -1065,7 +1064,7 @@ do_btrfs_quota_enable (const mountable_t *fs, int enable) ADD_ARG (argv, i, fs_buf); ADD_ARG (argv, i, NULL); - r = commandv (&out, &err, argv); + r = commandv (NULL, &err, argv); if (r == -1) { reply_with_error ("%s: %s", fs_buf, err); goto error; @@ -1085,7 +1084,6 @@ do_btrfs_quota_rescan (const mountable_t *fs) size_t i = 0; char *fs_buf = NULL; CLEANUP_FREE char *err = NU...
2009 Nov 08
1
[PATCH] Fix prototype of commandv to match prototype of commandrv.
...upports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ -------------- next part -------------- >From 34ba249f8c9e3478cbff5a24ba958865106819a4 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones at redhat.com> Date: Sun, 8 Nov 2009 11:55:38 +0000 Subject: [PATCH] Fix prototype of commandv to match prototype of commandrv. --- daemon/blockdev.c | 2 +- daemon/command.c | 2 +- daemon/daemon.h | 2 +- daemon/guestfsd.c | 5 +++-- daemon/lvm.c | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/daemon/blockdev.c b/daemon/blockdev.c index 1aa...
2012 Feb 06
3
[PATCH 1/3] NEW API: add a new api zero_fs
...c b/daemon/zero.c index 398f844..348869f 100644 --- a/daemon/zero.c +++ b/daemon/zero.c @@ -73,6 +73,23 @@ do_zero (const char *device) } int +do_zero_fs (const char *device) +{ + int r; + char *err = NULL; + + const char *wipefs[] = {"wipefs", "-a", device, NULL}; + r = commandv (NULL, &err, wipefs); + if (r == -1) { + reply_with_error ("%s", err); + free (err); + return -1; + } + free (err); + return 0; +} + +int do_zero_device (const char *device) { int64_t ssize = do_blockdev_getsize64 (device); diff --git a/generator/generator_actions.ml...
2014 Dec 26
10
[PATCH 0/5] btrfs: add API for btrfs filesystem, check and scrub
Hi, There is one problem: btrfs_filesystem_set_label just doesnt work, giving error message: libguestfs: error: btrfs_filesystem_set_label: /: ERROR: unable to set label Bad address I'm almost sure the patch has no problem, but can't figure out what's the cause. So patch 5 is only for review. Other APIs have no problem. Regards, Hu Hu Tao (5): New API: btrfs_scrub New API:
2015 Jan 16
18
[PATCH 00/16] btrfs: add support to btrfs scrub, balance, rescue and inspect
Hi, This series adds new APIs to support btrfs scrub, balance, rescue and inspect. Some of them don't have tests because: - btrfs_scrub and btrfs_balance completes too early before we can test btrfs_scrub_cancel, btrfs_scrub_resume, btrfs_scrub_status, btrfs_balance_pause, btrfs_balance_cancel, btrfs_balance_resume and btrfs_balance_status. - can't
2015 Feb 21
7
[PATCH 0/4] btrfs: add support to btrfstune
This series adds new APIs to support btrfstune. Chen Hanxiao (4): New API: btrfstune_S_enable New API: btrfstune_S_disable New API: btrfstune_r New API: btrfstune_x daemon/btrfs.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 64 +++++++++++++++++++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 164 insertions(+), 1 deletion(-) --
2015 Jun 04
3
[PATCH RFC][Resend] New API: btrfs_convert
...err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + + ADD_ARG (argv, i, str_btrfsconvert); + ADD_ARG (argv, i, device); + + if ((optargs_bitmask & GUESTFS_BTRFS_CONVERT_ROLLBACK_BITMASK) && rollback) + ADD_ARG (argv, i, "-r"); + + ADD_ARG (argv, i, NULL); + + r = commandv (&out, &err, argv); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + return -1; + } + + return 0; +} + diff --git a/generator/actions.ml b/generator/actions.ml index 1a89869..e42f02d 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -12579,6 +1...
2014 Dec 02
21
[PATCH 0/8] btrfs support part2: qgroup commands
Hi, This series adds support to btrfs qgroup related commands, inclduing quota commands, and two leftover of subvolume commands. Regards, Hu Hu Tao (8): New API: btrfs_subvolume_get_default New API: btrfs_subvolume_show New API: btrfs_quota_enable New API: btrfs_quota_disable New API: btrfs_quota_rescan New API: btrfs_qgroup_limit New API: btrfs_qgroup_create New API:
2014 Dec 11
14
[PATCH v2 00/11] btrfs support part2: qgroup/quota commands
Hi, This is v2 series to add support to btrfs qgroup related commands, inclduing quota commands, and two leftover of subvolume commands. Regards, Hu changes: v2: - add tests for new APIs - combine btrfs_quota_enable and btrfs_quota_disable - following APIs changed to operate on Mountable_or_Path: btrfs_subvolume_get_default, btrfs_quota_enable, btrfs_quota_rescan. Hu Tao (11):
2011 Nov 10
5
[PATCH v2] Add tune2fs command.
The changes since the previous patch: - safe ADD_ARG macro for adding arguments to a fixed size stack array - support for testing functions that return RHashtable, ie. tune2fs-l. - add tests that set (tune2fs) and get (tune2fs-l) various parameters. - only one 'intervalbetweenchecks' parameter (in seconds) Rich.
2014 Dec 05
2
Re: [PATCH 1/8] New API: btrfs_subvolume_get_default
On Tue, Dec 02, 2014 at 05:33:31PM +0800, Hu Tao wrote: > + ADD_ARG (argv, i, str_btrfs); > + ADD_ARG (argv, i, "subvolume"); > + ADD_ARG (argv, i, "get-default"); > + ADD_ARG (argv, i, fs_buf); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s: %s", mountpoint, err); > + return -1; > + } > + r = xstrtol (out + 2, NULL, 10, &ret, NULL); Unfortunately even gnulib's "xstrtol" function is a minefield, and the code abo...
2015 Jan 05
3
Re: [PATCH 5/5] New API: btrfs_filesystem_set_label
...;); > + return -1; > + } > + > + ADD_ARG (argv, i, str_btrfs); > + ADD_ARG (argv, i, "filesystem"); > + ADD_ARG (argv, i, "label"); > + ADD_ARG (argv, i, path_buf); > + ADD_ARG (argv, i, label); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s: %s", path, err); > + return -1; > + } > + > + return 0; > +} Isn't this alredy covered by set_label? > diff --git a/generator/actions.ml b/generator/actions.ml > index 4b24f...
2014 Dec 12
15
[PATCH v3 00/11] btrfs support part2: qgroup/quota commands
Hi, This is v3 series to add support to btrfs qgroup related commands, inclduing quota commands, and two leftover of subvolume commands. Regards, Hu changes: v3: - don't intialize fs_buf (patch 1) - check the return value of sysroot_path (patch 1) - check fs_buf rather than fs (patch 1) - fprintf (stderr,...) -> reply_with_error() v2: - add tests for new APIs - combine
2015 Jan 07
2
Re: [PATCH 2/5] New API: btrfs_check
...ARGS]; > + size_t i = 0; > + CLEANUP_FREE char *err = NULL; > + CLEANUP_FREE char *out = NULL; > + int r; > + > + ADD_ARG (argv, i, str_btrfs); > + ADD_ARG (argv, i, "check"); > + ADD_ARG (argv, i, device); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s: %s", device, err); > + return -1; > + } > + > + return 0; > +} We do have already a "fsck" action; OTOH fsck.btrfs does nothing, so I would rather call `btrfs check` there, i...
2015 Feb 21
5
[PATCH v2 0/4] btrfs: add support to btrfs inspect-internal
This series adds new APIs to support btrfs inspect-internal. v2: - use full name of btrfs command as inspect-internal Hu Tao (4): New API: btrfs_inspect_internal_rootid New API: btrfs_inspect_internal_subvolid_resolve New API: btrfs_inspect_internal_inode_resolve New API: btrfs_inspect_internal_logical_resolve daemon/btrfs.c | 161
2015 Jan 07
2
Re: [PATCH 1/5] New API: btrfs_scrub
...reply_with_perror ("malloc"); > + return -1; > + } > + > + ADD_ARG (argv, i, str_btrfs); > + ADD_ARG (argv, i, "scrub"); > + ADD_ARG (argv, i, "start"); > + ADD_ARG (argv, i, path_buf); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s: %s", path, err); > + return -1; > + } > + > + return 0; > +} Reading the btrfs documentation, it seems like this is an asynchronous operation by default, so I'm not sure whether it...
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2015 Nov 19
5
[PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
...error ("/dev/null"); + return NULL; + } + if (bind_mount (&bind_state) == -1) return NULL; if (enable_network) { @@ -266,8 +279,10 @@ do_command (char *const *argv) return NULL; } + flags = COMMAND_FLAG_CHROOT_COPY_FILE_TO_STDIN | fd; + CHROOT_IN; - r = commandv (&out, &err, (const char * const *) argv); + r = commandvf (&out, &err, flags, (const char * const *) argv); CHROOT_OUT; free_bind_state (&bind_state); -- 2.1.0
2016 Jan 26
2
[PATCH] daemon: fold xfs_admin stdout to stderr
...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
2017 May 30
1
[PATCH] btrfs_replace: fix position of subcommand options
...ADD_ARG (argv, i, srcdev); - ADD_ARG (argv, i, targetdev); - ADD_ARG (argv, i, path_buf); ADD_ARG (argv, i, "-B"); ADD_ARG (argv, i, "-f"); + ADD_ARG (argv, i, srcdev); + ADD_ARG (argv, i, targetdev); + ADD_ARG (argv, i, path_buf); ADD_ARG (argv, i, NULL); r = commandv (NULL, &err, argv); -- 2.9.4