search for: guestfs_inspect_get_roots

Displaying 20 results from an estimated 75 matches for "guestfs_inspect_get_roots".

2015 Mar 17
0
[PATCH] virt-ls: support drive letters on Windows
...e (dir); optind++; } @@ -409,6 +413,31 @@ main (int argc, char *argv[]) exit (errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } +static char * +from_maybe_windows_path (const char *dir) +{ + CLEANUP_FREE_STRING_LIST char **roots = NULL; + char *path = NULL; + char *root; + + roots = guestfs_inspect_get_roots (g); + assert (roots); + assert (roots[0] != NULL); + assert (roots[1] == NULL); + root = roots[0]; + + if (is_windows (g, root)) { + path = windows_path (g, root, dir, 1 /* readonly */ ); + if (path == NULL) { + guestfs_close (g); + exit (EXIT_FAILURE); + } + return path...
2015 Mar 17
2
[PATCH] RFE: support Windows drive letters in virt-ls
It is modelled after virt-cat. Fixes RHBZ#845234 Maros Zatko (1): virt-ls: support drive letters on Windows cat/ls.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) -- 1.9.3
2015 Mar 23
0
[PATCH v2] virt-ls: support drive letters on Windows
...case 0: /* no -l or -R option */ @@ -409,6 +421,24 @@ main (int argc, char *argv[]) exit (errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } +static const char * +get_windows_root (void) +{ + CLEANUP_FREE_STRING_LIST char **roots = NULL; + const char *root; + + roots = guestfs_inspect_get_roots (g); + assert (roots); + assert (roots[0] != NULL); + assert (roots[1] == NULL); + root = safe_strdup(g, roots[0]); + + if (is_windows (g, root)) + return root; + else + return NULL; +} + static int do_ls (const char *dir) { -- 1.9.3
2015 Mar 23
2
[PATCH v2] RFE: support Windows drive letters in virt-ls
It is modelled after virt-cat. Fixes RHBZ#845234 Ammended so it doesn't do inspection for every dir to list. Maros Zatko (1): virt-ls: support drive letters on Windows cat/ls.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) -- 1.9.3
2015 May 21
1
Re: [PATCH v3 1/3] virt-ls: support drive letters on Windows
...errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE); > } > > +static const char * Given a new string is returned, the return value needs to not be const. > +get_windows_root (void) > +{ > + CLEANUP_FREE_STRING_LIST char **roots = NULL; > + const char *root; > + > + roots = guestfs_inspect_get_roots (g); > + assert (roots); > + assert (roots[0] != NULL); > + assert (roots[1] == NULL); > + root = safe_strdup(g, roots[0]); safe_strdup could be delayed until the actual return later, otherwise if is_windows returns false that string is leaked. > + > + if (is_windows (g, ro...
2014 Jun 23
2
Re: [PATCH] edit: add -m option
On Mon, Jun 23, 2014 at 12:30:07PM +0100, Richard W.M. Jones wrote: > > Same comment about do_edit_simple as I previously posted about > do_cat_simple. I mean edit_files_simple ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows
2014 Jun 23
2
Re: [PATCH] cat: add -m option
On Monday 23 June 2014 12:29:07 Richard W.M. Jones wrote: > On Mon, Jun 23, 2014 at 01:00:11PM +0200, Pino Toscano wrote: > > static int > > > > +do_cat_simple (int argc, char *argv[]) > > +{ > > + unsigned errors = 0; > > + int i; > > + > > + for (i = 0; i < argc; ++i) { > > + if (guestfs_download (g, argv[i],
2015 May 20
6
[PATCH v3 0/3] RFE: support Windows drive letter in virt-ls
Fixes RHBZ#845234. v3 changes: Drive letters works if inspection is enabled (-m is not given) v2 changes: Ammended so it doesn't do inspection for every dir to list. Maros Zatko (3): virt-ls: support drive letters on Windows virt-ls: update usage for win drive letters docs: amend virt-ls manpage with win drive letters cat/ls.c | 41 +++++++++++++++++++++++++++++++++++++----
2015 May 20
0
[PATCH v3 1/3] virt-ls: support drive letters on Windows
...case 0: /* no -l or -R option */ @@ -409,6 +422,24 @@ main (int argc, char *argv[]) exit (errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } +static const char * +get_windows_root (void) +{ + CLEANUP_FREE_STRING_LIST char **roots = NULL; + const char *root; + + roots = guestfs_inspect_get_roots (g); + assert (roots); + assert (roots[0] != NULL); + assert (roots[1] == NULL); + root = safe_strdup(g, roots[0]); + + if (is_windows (g, root)) + return root; + else + return NULL; +} + static int do_ls (const char *dir) { -- 1.9.3
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.
2017 Mar 04
0
[PATCH] rescue: Implement escape sequences.
...uit virt-rescue\r\n")); + printf (_("to send the escape key to the rescue shell, type it twice\r\n")); + break; + + case 'i': + if (inspector) { + CLEANUP_FREE_STRING_LIST char **roots; + size_t i; + + roots = guestfs_inspect_get_roots (g); + if (roots) { + printf ("\r\n"); + for (i = 0; roots[i] != NULL; ++i) { + const char *root = roots[i]; + char *str; + + printf (_("root device: %s\r\n"), root); + str = guestfs...
2017 Mar 03
1
[PATCH] rescue: Implement --mount and -i options.
Depends on the previous 5 patches that modified virt-rescue to work without direct mode: https://www.redhat.com/archives/libguestfs/2017-March/msg00017.html Rich.
2017 Mar 04
7
[PATCH v3] Fix virt-rescue.
Version 3: - Tidies up the code further. - Implements correct handling of SIGTSTP and SIGCONT. - Adds: ^] s - sync filesystems - Adds: ^] z - suspend virt-rescue Rich.
2016 Oct 03
3
[PATCH v2 0/2] New tool: virt-tail.
Nothing new in the virt-tail command itself, but the second commit includes a simple test. Rich.
2016 Oct 03
0
[PATCH v2 1/2] New tool: virt-tail.
...E_STRING_LIST char **roots = NULL; + + add_drives (drvs, 'a'); + + if (guestfs_launch (g) == -1) + return -1; + + if (mps != NULL) + mount_mps (mps); + else + inspect_mount (); + + if (inspector) { + /* Get root mountpoint. See: fish/inspect.c:inspect_mount */ + roots = guestfs_inspect_get_roots (g); + + assert (roots); + assert (roots[0] != NULL); + assert (roots[1] == NULL); + root = roots[0]; + + /* Windows? Special handling is required. */ + windows = is_windows (g, root); + } + + *windows_ret = windows; + + return 0; +} + +/* Return the latest (highest) mtime of...
2016 Oct 01
1
[PATCH] New tool: virt-tail.
This adds a new tool which does a follow operation (ie. tail -f) on one or more log/text files inside the guest. I've only done limited testing, but it works for me for tailing various long-running builds inside guests which I'm doing at the moment. There are no tests at present. Rich.
2016 Oct 03
0
[PATCH v3 1/2] New tool: virt-tail.
...ct and mount. */ + add_drives (drvs, 'a'); + + if (guestfs_launch (g) == -1) + return -1; + + if (mps != NULL) + mount_mps (mps); + else + inspect_mount (); + + if (inspector) { + /* Get root mountpoint. See: fish/inspect.c:inspect_mount */ + roots = guestfs_inspect_get_roots (g); + + assert (roots); + assert (roots[0] != NULL); + assert (roots[1] == NULL); + root = roots[0]; + + /* Windows? Special handling is required. */ + windows = is_windows (g, root); + } + + /* Check files here. */ + processed = 0; + for (i = 0; i < a...
2016 Oct 03
1
Re: [PATCH v2 1/2] New tool: virt-tail.
...39;a'); > + > + if (guestfs_launch (g) == -1) > + return -1; > + > + if (mps != NULL) > + mount_mps (mps); > + else > + inspect_mount (); > + > + if (inspector) { > + /* Get root mountpoint. See: fish/inspect.c:inspect_mount */ > + roots = guestfs_inspect_get_roots (g); > + > + assert (roots); > + assert (roots[0] != NULL); > + assert (roots[1] == NULL); > + root = roots[0]; > + > + /* Windows? Special handling is required. */ > + windows = is_windows (g, root); > + } > + > + *windows_ret = windows; > +...
2017 Mar 03
6
[PATCH v2 0/6] Fix virt-rescue.
This supersedes the two previous patch series: https://www.redhat.com/archives/libguestfs/2017-March/msg00017.html https://www.redhat.com/archives/libguestfs/2017-March/msg00046.html Rich.
2016 Oct 03
3
[PATCH v3 0/2] New tool: virt-tail.
Since v2: - Fix the things that Pino mentioned, except the recursion. - Implement Windows support. For Windows support to be sane, I had to inline the add_and_mount code. Rich.