search for: str_mount

Displaying 20 results from an estimated 28 matches for "str_mount".

2014 Jan 28
3
[PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.
...bs->sysroot_dev_pts); free (bs->sysroot_proc); + free (bs->sysroot_selinux); free (bs->sysroot_sys); free (bs->sysroot_sys_fs_selinux); return -1; @@ -97,6 +100,11 @@ bind_mount (struct bind_state *bs) bs->dev_pts_ok = r != -1; r = command (NULL, NULL, str_mount, "--bind", "/proc", bs->sysroot_proc, NULL); bs->proc_ok = r != -1; + /* Note on the next line we have to bind-mount /sys/fs/selinux (appliance + * kernel) on top of /selinux (where guest is expecting selinux). + */ + r = command (NULL, NULL, str_mount, "--bi...
2016 Jan 21
0
[PATCH v3 1/6] daemon: Rename daemon/command.c -> daemon/sh.c.
...e <string.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <fcntl.h> - -#include "guestfs_protocol.h" -#include "daemon.h" -#include "actions.h" - -#include "ignore-value.h" - -GUESTFSD_EXT_CMD(str_cp, cp); -GUESTFSD_EXT_CMD(str_mount, mount); -GUESTFSD_EXT_CMD(str_umount, umount); - -#ifdef HAVE_ATTRIBUTE_CLEANUP -#define CLEANUP_BIND_STATE __attribute__((cleanup(free_bind_state))) -#define CLEANUP_RESOLVER_STATE __attribute__((cleanup(free_resolver_state))) -#else -#define CLEANUP_BIND_STATE -#define CLEANUP_RESOLVER_STATE -#e...
2014 Jan 28
0
Re: [PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.
...(bs->sysroot_proc); > + free (bs->sysroot_selinux); > free (bs->sysroot_sys); > free (bs->sysroot_sys_fs_selinux); > return -1; > @@ -97,6 +100,11 @@ bind_mount (struct bind_state *bs) > bs->dev_pts_ok = r != -1; > r = command (NULL, NULL, str_mount, "--bind", "/proc", bs->sysroot_proc, NULL); > bs->proc_ok = r != -1; > + /* Note on the next line we have to bind-mount /sys/fs/selinux (appliance > + * kernel) on top of /selinux (where guest is expecting selinux). > + */ > + r = command (NULL, NU...
2017 Jul 14
0
[PATCH 09/27] daemon: Reimplement ‘mount’, ‘mount_ro’, ‘mount_options’, ‘mount_vfs’ APIs in OCaml.
...c b/daemon/btrfs.c index 5f1e5d1d0..4f52b71e8 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -37,6 +37,7 @@ GUESTFSD_EXT_CMD(str_btrfs, btrfs); GUESTFSD_EXT_CMD(str_btrfstune, btrfstune); GUESTFSD_EXT_CMD(str_btrfsck, btrfsck); GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs); +GUESTFSD_EXT_CMD(str_mount, mount); GUESTFSD_EXT_CMD(str_umount, umount); GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image); @@ -387,6 +388,48 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid) return 0; } +static int +mount_vfs_nochroot (const char *options, const char *vfstype, +...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...device, NULL); if (r != 0 &amp;&amp; r != 2) { diff --git a/daemon/9p.c b/daemon/9p.c index 8c0eeb6..49efafc 100644 --- a/daemon/9p.c +++ b/daemon/9p.c @@ -33,6 +33,7 @@ #include "actions.h" #define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio" +GUESTFSD_EXT_CMD(str_mount, mount); static char *read_whole_file (const char *filename); @@ -211,7 +212,7 @@ do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options) } r = command (NULL, &err, - "mount", "-o", opts, "-t", "9p", mou...
2012 Aug 30
1
[PATCH] collect list of called external commands
...device, NULL); if (r != 0 &amp;&amp; r != 2) { diff --git a/daemon/9p.c b/daemon/9p.c index 8c0eeb6..5124a52 100644 --- a/daemon/9p.c +++ b/daemon/9p.c @@ -33,6 +33,7 @@ #include "actions.h" #define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio" +GUESTFS_EXT_CMD(str_mount, mount); static char *read_whole_file (const char *filename); @@ -211,7 +212,7 @@ do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options) } r = command (NULL, &err, - "mount", "-o", opts, "-t", "9p", mou...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...7 files changed, 306 insertions(+), 484 deletions(-) diff --git a/daemon/9p.c b/daemon/9p.c index fc5b01736..55644249d 100644 --- a/daemon/9p.c +++ b/daemon/9p.c @@ -33,7 +33,6 @@ #include "actions.h" #define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio" -GUESTFSD_EXT_CMD(str_mount, mount); static char *read_whole_file (const char *filename); @@ -215,7 +214,7 @@ do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options) } r = command (NULL, &err, - str_mount, "-o", opts, "-t", "9p", mount_tag,...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...0 files changed, 479 insertions(+), 430 deletions(-) diff --git a/daemon/9p.c b/daemon/9p.c index fc5b01736..b29d41d85 100644 --- a/daemon/9p.c +++ b/daemon/9p.c @@ -33,7 +33,8 @@ #include "actions.h" #define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio" -GUESTFSD_EXT_CMD(str_mount, mount); + +DECLARE_EXTERNAL_COMMANDS ("mount") static char *read_whole_file (const char *filename); @@ -215,7 +216,7 @@ do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options) } r = command (NULL, &err, - str_mount, "-o",...
2014 Jan 24
2
[PATCH 0/2] Implement virt-builder --selinux-relabel option.
Do SELinux relabelling properly.
2014 Jan 19
1
[PATCH] daemon: add missing GUESTFSD_EXT_CMD usage
...", "btrfs device add --help", err); return -1; diff --git a/daemon/command.c b/daemon/command.c index 02e1dd4..066c773 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -30,6 +30,7 @@ #include "ignore-value.h" +GUESTFSD_EXT_CMD(str_cp, cp); GUESTFSD_EXT_CMD(str_mount, mount); GUESTFSD_EXT_CMD(str_umount, umount); @@ -179,7 +180,7 @@ set_up_etc_resolv_conf (struct resolver_state *rs) /* Now that the guest's <sysroot>/etc/resolv.conf is out the way, we * can create our own copy of the appliance /etc/resolv.conf. */ - ignore_value (command...
2013 Aug 18
3
missing chdir before chroot in guestfsd
daemon.c does just a chroot, without chdir. The result is that pwd does not work correctly (it causes fs/dcache.c:prepend_unreachable() to add the unreachable string). A workaround is to add "cd /" before each sh command. ><fs> mount /dev/sda2 / ><fs> sh "cd / ; chroot / ; /bin/pwd" / ><fs> sh "/bin/pwd" (unreachable)/ ><fs> sh
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’
2015 Dec 05
6
[PATCH 0/6 v2] [FOR COMMENTS ONLY] Rework inspection.
This is a more working version. Inspection (partially) succeeds on a real guest this time :-) You can test it out on a real guest (in this case, a CentOS disk image located at /tmp/centos-6.img) by doing: $ ./run guestfish -v -x -a /tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection --verbose" which will print lots of debugging, and at the end the
2016 Jan 21
8
[PATCH v3 0/6] [FOR COMMENTS ONLY] Rework inspection.
For background on this change, see: https://rwmj.wordpress.com/2015/12/06/inspection-now-with-added-prolog/ v2 was previously posted here: https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html To test this patch series on a real guest, you can do: $ ./run guestfish -v -x -a /var/tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...mli \ @@ -267,6 +268,7 @@ SOURCES_ML = \ mountable.ml \ chroot.ml \ blkid.ml \ + btrfs.ml \ devsparts.ml \ file.ml \ filearch.ml \ diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 4f52b71e8..d9043d53c 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -41,11 +41,6 @@ GUESTFSD_EXT_CMD(str_mount, mount); GUESTFSD_EXT_CMD(str_umount, umount); GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image); -COMPILE_REGEXP (re_btrfs_subvolume_list, - "ID\\s+(\\d+).*\\s" - "top level\\s+(\\d+).*\\s" - "path\\s(.*)", -...
2017 Jul 14
0
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...mli \ @@ -280,6 +281,7 @@ SOURCES_ML = \ mountable.ml \ chroot.ml \ blkid.ml \ + btrfs.ml \ devsparts.ml \ file.ml \ filearch.ml \ diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 4f52b71e8..d9043d53c 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -41,11 +41,6 @@ GUESTFSD_EXT_CMD(str_mount, mount); GUESTFSD_EXT_CMD(str_umount, umount); GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image); -COMPILE_REGEXP (re_btrfs_subvolume_list, - "ID\\s+(\\d+).*\\s" - "top level\\s+(\\d+).*\\s" - "path\\s(.*)", -...
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device. --- generator/bindtests.ml | 2 +- generator/c.ml | 7 +++++-- generator/csharp.ml | 6 ++++-- generator/daemon.ml | 4 ++-- generator/erlang.ml | 6 +++--- generator/fish.ml | 8 ++++---- generator/gobject.ml | 11 ++++++----- generator/haskell.ml | 11 +++++++---- generator/java.ml | 10 +++++-----
2017 Jun 03
12
[PATCH v2 00/12] Allow APIs to be implemented in OCaml.
Version 1 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00003.html This patch series reimplements a few more APIs in OCaml, including some very important core APIs like ?list_filesystems? and ?mount?. All the tests pass after this. The selection of APIs that I have moved may look a little random, but in fact they are all APIs consumed by the inspection code (and some more