Displaying 20 results from an estimated 31 matches for "free_mp".
Did you mean:
freeamp
2020 Feb 13
1
[common PATCH v4 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
v4 fixes issues found during code review:
- whitespace-change-only hunks are removed
- options are alphabetically orderred now
v3 is just a spelling correction spotted by Eric Blake
https://www.redhat.com/archives/libguestfs/2020-February/msg00111.html
In v2 I've moved '--blocksize' parameter description into the separate
file called
2015 Mar 23
0
[PATCH v2] virt-ls: support drive letters on Windows
...{
@@ -176,6 +179,7 @@ main (int argc, char *argv[])
#define MODE_LS_R 2
#define MODE_LS_LR (MODE_LS_L|MODE_LS_R)
int mode = 0;
+ CLEANUP_FREE const char * win_root;
g = guestfs_create ();
if (g == NULL) {
@@ -371,10 +375,18 @@ main (int argc, char *argv[])
free_drives (drvs);
free_mps (mps);
+ win_root = get_windows_root ();
+
unsigned errors = 0;
while (optind < argc) {
- const char *dir = argv[optind];
+ CLEANUP_FREE const char *dir;
+
+ if (win_root != NULL) {
+ dir = windows_path (g, win_root, argv[optind], 1 /* readonly */ );
+ } else {
+...
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
...inspect_mount ();
> + win_root = get_windows_root ();
> + }
Hm why doing that only when inspecting? Other tools (e.g. virt-cat)
do this also when specifying mount points.
>
> /* Free up data structures, no longer needed after this point. */
> free_drives (drvs);
> free_mps (mps);
>
> +
> unsigned errors = 0;
>
> while (optind < argc) {
> - const char *dir = argv[optind];
> + CLEANUP_FREE const char *dir;
> +
> + if (inspector == 1 && win_root != NULL) {
> + dir = windows_path (g, win_root, argv[optind]...
2020 Feb 12
0
[common PATCH v2 1/1] options: add '--blocksize' option for C-based tools
...n_d (const char *arg, struct drv **drvsp);
extern char add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index);
#define add_drives(drv) add_drives_handle (g, drv, 0)
@@ -164,76 +166,87 @@ extern void mount_mps (struct mp *mp);
extern void free_drives (struct drv *drv);
extern void free_mps (struct mp *mp);
-#define OPTION_a \
- do { \
- option_a (optarg, format, &drvs); \
- format_consumed = true; \
+#define OPTION_a \
+ do {...
2020 Feb 11
1
[common PATCH] options: add '--blocksize' option for C-based tools
...n_d (const char *arg, struct drv **drvsp);
extern char add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index);
#define add_drives(drv) add_drives_handle (g, drv, 0)
@@ -164,76 +166,87 @@ extern void mount_mps (struct mp *mp);
extern void free_drives (struct drv *drv);
extern void free_mps (struct mp *mp);
-#define OPTION_a \
- do { \
- option_a (optarg, format, &drvs); \
- format_consumed = true; \
+#define OPTION_a \
+ do {...
2020 Feb 12
1
[common PATCH v3 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
v3 is just a spelling correction spotted by Eric Blake
In v2 I've moved '--blocksize' parameter description into the separate
file called blocksize-option.pod so we can include it everywhere we need
similar to key-option.pod.
https://www.redhat.com/archives/libguestfs/2020-February/msg00099.html
v1 was here:
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 +++++++++++++++++++++++++++++++++++++----
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...name, "key")) {
+ OPTION_key;
} else
error (EXIT_FAILURE, 0,
_("unknown long option: %s (%d)"),
@@ -249,6 +254,7 @@ main (int argc, char *argv[])
/* Free up data structures, no longer needed after this point. */
free_drives (drvs);
free_mps (mps);
+ free_key_store (ks);
r = do_cat (argc - optind, &argv[optind]);
diff --git a/cat/log.c b/cat/log.c
index d6e98cb4c..afba541ca 100644
--- a/cat/log.c
+++ b/cat/log.c
@@ -81,6 +81,7 @@ usage (int status)
" --echo-keys Don't turn off echo for pas...
2020 Feb 12
3
[common PATCH v2 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
In v2 I've moved '--blocksize' parameter description into the separate
file called blocksize-option.pod so we can include it everywhere we need
similar to key-option.pod.
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html
Nikolay Ivanets (1):
options: add '--blocksize' option for C-based
2015 May 20
0
[PATCH v3 1/3] virt-ls: support drive letters on Windows
...guestfs_launch (g) == -1)
exit (EXIT_FAILURE);
- if (mps != NULL)
+ if (mps != NULL) {
mount_mps (mps);
- else
+ } else {
inspect_mount ();
+ win_root = get_windows_root ();
+ }
/* Free up data structures, no longer needed after this point. */
free_drives (drvs);
free_mps (mps);
+
unsigned errors = 0;
while (optind < argc) {
- const char *dir = argv[optind];
+ CLEANUP_FREE const char *dir;
+
+ if (inspector == 1 && win_root != NULL) {
+ dir = windows_path (g, win_root, argv[optind], 1 /* readonly */ );
+ } else {
+ dir = s...
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi,
the following series adds a --key option in the majority of tools: this
makes it possible to pass LUKS credentials programmatically, avoid the
need to manually input them, or unsafely pass them via stdin.
Thanks,
Pino Toscano (2):
mltools: create a cmdline_options struct
Introduce a --key option in tools that accept keys
builder/cmdline.ml | 2 +-
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
[PATCH] edit: add -m option
...268,12 +280,19 @@ main (int argc, char *argv[])
if (guestfs_launch (g) == -1)
exit (EXIT_FAILURE);
- inspect_mount ();
+ if (mps != NULL)
+ mount_mps (mps);
+ else
+ inspect_mount ();
/* Free up data structures, no longer needed after this point. */
free_drives (drvs);
+ free_mps (mps);
- edit_files (argc - optind, &argv[optind]);
+ if (inspector)
+ edit_files (argc - optind, &argv[optind]);
+ else
+ edit_files_simple (argc - optind, &argv[optind]);
/* Cleanly unmount the disks after editing. */
if (guestfs_shutdown (g) == -1)
@@ -304,6 +323,...
2014 Jun 23
2
[PATCH] cat: add -m option
...mount. */
add_drives (drvs, 'a');
if (guestfs_launch (g) == -1)
exit (EXIT_FAILURE);
- inspect_mount ();
+ if (mps != NULL)
+ mount_mps (mps);
+ else
+ inspect_mount ();
/* Free up data structures, no longer needed after this point. */
free_drives (drvs);
+ free_mps (mps);
- r = do_cat (argc - optind, &argv[optind]);
+ if (inspector)
+ r = do_cat (argc - optind, &argv[optind]);
+ else
+ r = do_cat_simple (argc - optind, &argv[optind]);
guestfs_close (g);
@@ -283,6 +300,20 @@ do_cat (int argc, char *argv[])
}
static int
+do_ca...
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.
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],
2014 Nov 26
5
[PATCH] tools: implement --short-options
...tions[option_index].name, "listen"))
remote_control_listen = 1;
else if (STREQ (long_options[option_index].name, "remote")) {
diff --git a/fish/options.c b/fish/options.c
index f7870a4..9ffcc6b 100644
--- a/fish/options.c
+++ b/fish/options.c
@@ -340,6 +340,20 @@ free_mps (struct mp *mp)
free (mp);
}
+/* Implements the internal 'tool --short-options' flag, which just
+ * lists out the short options available. Used by bash completion.
+ */
+void
+display_short_options (const char *format)
+{
+ while (*format) {
+ if (*format != ':')
+...
2016 Aug 25
7
[PATCH 0/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
This implements most of RHBZ#1367738. I didn't bother
with virt-v2v-copy-to-local and virt-win-reg, but all the
other tools now have full bash completion.
Rich.
2017 Apr 28
2
[PATCH] common/options: Change drv struct to store drive index instead of device name.
...) add_drives_handle (g, drv, next_drive)
+extern char add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index);
+#define add_drives(drv, drive_index) add_drives_handle (g, drv, drive_index)
extern void mount_mps (struct mp *mp);
extern void free_drives (struct drv *drv);
extern void free_mps (struct mp *mp);
diff --git a/df/main.c b/df/main.c
index 19ae77a..1c8159d 100644
--- a/df/main.c
+++ b/df/main.c
@@ -278,7 +278,7 @@ main (int argc, char *argv[])
CLEANUP_FREE char *name = NULL;
/* Add domains/drives from the command line (for a single guest). */
- add_drives (drvs...