search for: guestfs_command_lin

Displaying 20 results from an estimated 67 matches for "guestfs_command_lin".

Did you mean: guestfs_command_lines
2020 Aug 27
1
Re: Weird results from g.sh()
...g.command([self.mkconfig, '-o', self.config])" shouldn't > > have the appliances /sys available (I looked briefly in command.c and > > I don't see the same bind-mount code), or maybe I'm missing something. > > guestfs_sh, guestfs_sh_lines, guestfs_command, guestfs_command_lines > all attempt to bind-mount /sys and other directories into the chroot > while running the command. (See daemon/sh.c) > > Anyway I misunderstood before - I thought you were trying to run grub > to install the bootloader. Running grub2-mkconfig as done in virt-v2v > should be f...
2020 Aug 27
2
Re: Weird results from g.sh()
On Thu, Aug 27, 2020 at 11:08 AM Richard W.M. Jones <rjones@redhat.com> wrote: > > On Thu, Aug 27, 2020 at 10:50:12AM +0300, Sam Eiderman wrote: > > Hi, > > > > I'm using libguestfs 1.42, > > > > When I run the following python3 commands on a rhel7.8: > > > > print(g.ls('/sys')) > > [] > > This lists the files in /sys in
2020 Aug 27
0
Re: Weird results from g.sh()
...gt; However, "g.command([self.mkconfig, '-o', self.config])" shouldn't > have the appliances /sys available (I looked briefly in command.c and > I don't see the same bind-mount code), or maybe I'm missing something. guestfs_sh, guestfs_sh_lines, guestfs_command, guestfs_command_lines all attempt to bind-mount /sys and other directories into the chroot while running the command. (See daemon/sh.c) Anyway I misunderstood before - I thought you were trying to run grub to install the bootloader. Running grub2-mkconfig as done in virt-v2v should be fine since AIUI it's just...
2016 Feb 03
0
[PATCH 2/3] daemon: glob: add option for not returning dirs with trailing slash
...n, flags, NULL, &buf); CHROOT_OUT; if (r == GLOB_NOMATCH) { /* Return an empty list instead of an error. */ diff --git a/generator/actions.ml b/generator/actions.ml index 4078082..9efa732 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -5967,27 +5967,34 @@ See also: C<guestfs_command_lines>" }; * start with "/". There is no concept of "cwd" in libguestfs, * hence no "."-relative names. *) - style = RStringList "paths", [Pathname "pattern"], []; + style = RStringList "paths", [Pathname &quot...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2012 Dec 13
1
[PATCH] daemon: fix directory outside current root when executing commands
...e received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* This program, which must be statically linked, is used to test the + * guestfs_command and guestfs_command_lines functions. + */ + +#include <config.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +int +main (int argc, char *argv[]) +{ + char *cwd = get_current_dir_name(); + printf("%s", cwd); + + exit (EXIT_SUCCESS); +} -- 1.7.11.7
2016 Feb 04
2
[PATCH v2 1/2] daemon: glob: add optarg to control trailing slash for dirs
...n, flags, NULL, &buf); CHROOT_OUT; if (r == GLOB_NOMATCH) { /* Return an empty list instead of an error. */ diff --git a/generator/actions.ml b/generator/actions.ml index 0755fef..36b8680 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -5969,27 +5969,34 @@ See also: C<guestfs_command_lines>" }; * start with "/". There is no concept of "cwd" in libguestfs, * hence no "."-relative names. *) - style = RStringList "paths", [Pathname "pattern"], []; + style = RStringList "paths", [Pathname &quot...
2016 Feb 03
6
[PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
Help the OCaml compiler by expliciting Guestfs.guestfs as type for 'g' in some functions. --- get-kernel/get_kernel.ml | 2 +- sysprep/sysprep_operation_abrt_data.ml | 2 +- sysprep/sysprep_operation_bash_history.ml | 2 +- sysprep/sysprep_operation_ca_certificates.ml | 2 +- sysprep/sysprep_operation_crash_data.ml
2009 Aug 03
1
use gnulib, and begin to pass its "make syntax-check" tests
...| 1 + ocaml/guestfs_c.c | 1 + 4 files changed, 4 insertions(+), 0 deletions(-) diff --git a/capitests/test-command.c b/capitests/test-command.c index 1e29ee9..d451ebe 100644 --- a/capitests/test-command.c +++ b/capitests/test-command.c @@ -20,6 +20,7 @@ * guestfs_command and guestfs_command_lines functions. */ +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/examples/hello.c b/examples/hello.c index a4cc43d..a8649f3 100644 --- a/examples/hello.c +++ b/examples/hello.c @@ -4,6 +4,7 @@ * hello guest.img /dev/VolGr...
2017 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in: https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html Rich.
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...;], []; + style = RStringList "lines", [String (PlainString, "command")], []; shortdesc = "run a command via the shell returning lines"; longdesc = "\ This is the same as C<guestfs_sh>, but splits the result @@ -3639,7 +3639,7 @@ See also: C<guestfs_command_lines>" }; * start with "/". There is no concept of "cwd" in libguestfs, * hence no "."-relative names. *) - style = RStringList "paths", [Pathname "pattern"], [OBool "directoryslash"]; + style = RStringList &q...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2011 Jan 04
0
builder-debian libguestfs success 7ce627fce02eae8c7db36b4090fa0ce1bf69bf44
...../src/guestfs.h:490: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1command_1lines': com_redhat_et_libguestfs_GuestFS.c:3021: warning: passing argument 2 of 'guestfs_command_lines' from incompatible pointer type ../src/guestfs.h:492: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug': com_redhat_et_libguestfs_GuestFS.c:3619: warnin...
2011 Jan 25
0
builder-debian libguestfs success 36fe0acf8a2e72c223d7a9f7a93815ff276a3cc1
...../src/guestfs.h:490: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1command_1lines': com_redhat_et_libguestfs_GuestFS.c:3096: warning: passing argument 2 of 'guestfs_command_lines' from incompatible pointer type ../src/guestfs.h:492: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug': com_redhat_et_libguestfs_GuestFS.c:3694: warnin...
2010 Dec 10
0
builder-debian libguestfs success 363978fa7fc055da380d31103c7de378a08b71fb
...../src/guestfs.h:490: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1command_1lines': com_redhat_et_libguestfs_GuestFS.c:3021: warning: passing argument 2 of 'guestfs_command_lines' from incompatible pointer type ../src/guestfs.h:492: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug': com_redhat_et_libguestfs_GuestFS.c:3619: warnin...
2011 Jan 04
0
builder-ubuntu libguestfs success 7ce627fce02eae8c7db36b4090fa0ce1bf69bf44
...c/guestfs.h:490:14: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1command_1lines': com_redhat_et_libguestfs_GuestFS.c:3021:3: warning: passing argument 2 of 'guestfs_command_lines' from incompatible pointer type ../src/guestfs.h:492:15: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug': com_redhat_et_libguestfs_GuestFS.c:3619:3: w...
2011 Jan 25
0
builder-ubuntu libguestfs success 36fe0acf8a2e72c223d7a9f7a93815ff276a3cc1
...c/guestfs.h:490:14: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1command_1lines': com_redhat_et_libguestfs_GuestFS.c:3096:3: warning: passing argument 2 of 'guestfs_command_lines' from incompatible pointer type ../src/guestfs.h:492:15: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug': com_redhat_et_libguestfs_GuestFS.c:3694:3: w...
2010 Dec 21
0
builder-debian libguestfs success 49b2ae2e69e1a273b4d4a8746a872ec00b91c86f
...../src/guestfs.h:490: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1command_1lines': com_redhat_et_libguestfs_GuestFS.c:3021: warning: passing argument 2 of 'guestfs_command_lines' from incompatible pointer type ../src/guestfs.h:492: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug': com_redhat_et_libguestfs_GuestFS.c:3619: warnin...