Displaying 20 results from an estimated 48 matches for "free_driv".
Did you mean:
free_priv
2007 Nov 22
3
Naming elements of a list
...ction just by giving its name, rather than specifying it as
an argument to the function. I am aware that there is an attach
function which you need to call. The attach function will accept a
list. However, I don't seem to be able to create the list properly. (Or
should I use a frame instead?)
free_driver <- function (){
i <- numeric (1)
attach (as.list (i))
i <- 25
free_test ()
}
free_test <- function (){
print ("i =")
print (i)
return ()
}
Anyway, here is the output, starting with the load operation:
------------------------------------------------------------------
&...
2017 Nov 03
2
[PATCH] diff: avoid potential null pointer dereference on error
...t a/diff/diff.c b/diff/diff.c
index 5851a1c9c..1f1ab6933 100644
--- a/diff/diff.c
+++ b/diff/diff.c
@@ -389,8 +389,10 @@ main (int argc, char *argv[])
errors++;
}
- free_tree (tree1);
- free_tree (tree2);
+ if (tree1)
+ free_tree (tree1);
+ if (tree2)
+ free_tree (tree2);
free_drives (drvs);
free_drives (drvs2);
--
2.13.6
2007 Nov 23
1
Problem with environments
...ill accept a
list. However, I don't seem to be able to create the list properly. (Or
should I use a frame instead?)
Anyway, here is the output, starting with the load operation;
----------------------------------------------------------------------------
> # function bar_driver
>
> free_driver <- function (){
+ i <- 25
+ attach_list <- list (i = i)
+ print1 ("attach_list = ", attach_list)
+ attach (attach_list)
+ free_test ()
+
+ }
> free_test <- function (){
+ print ("entering free_test")
+ print1 ("i")
+ return ()
+
+ }
>
[1] "att...
2015 Mar 23
0
[PATCH v2] virt-ls: support drive letters on Windows
...n))
usage (int status)
{
@@ -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 */ )...
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
2012 Aug 06
1
[PATCH V2] virt-diff: add new virt-diff tool
...se tools. Use the guestfish equivalent commands\n"
+ "(see the virt tool manual page).\n"),
+ program_name);
+ free_strings (roots);
+ exit (EXIT_FAILURE);
+ }
+
+ root = roots[0];
+ free (roots);
+
+ diff_inspect_mount_root (g, root);
+}
+
+static void
+free_drive (struct drv *drv)
+{
+ if (!drv) return;
+
+ free (drv->device);
+ free (drv);
+}
+
+int
+main (int argc, char *argv[])
+{
+ /* set global program name that is not polluted with libtool artifacts. */
+ set_program_name (argv[0]);
+ bindtextdomain (PACKAGE, LOCALEBASEDIR);
+ textdomain (P...
2017 Apr 28
2
[PATCH] common/options: Change drv struct to store drive index instead of device name.
...lt: /* keep GCC happy */
@@ -226,7 +216,7 @@ add_drives_handle (guestfs_h *g, struct drv *drv, char next_drive)
}
}
- return next_drive;
+ return drive_index;
}
static void display_mountpoints_on_failure (const char *mp_device, const char *user_supplied_options);
@@ -320,8 +310,6 @@ free_drives (struct drv *drv)
if (!drv) return;
free_drives (drv->next);
- free (drv->device);
-
switch (drv->type) {
case drv_a:
free (drv->a.filename);
diff --git a/common/options/options.h b/common/options/options.h
index 1598daf..7e4d269 100644
--- a/common/options/options...
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
..._options[option_index].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...
2015 May 21
1
Re: [PATCH v3 1/3] virt-ls: support drive letters on Windows
...> + } else {
> 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...
2012 Jan 31
2
[PATCH 1/2] examples: code cleanups
do a code cleanup by removing the tailing spaces
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
examples/create_disk.c | 2 +-
examples/inspect_vm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/create_disk.c b/examples/create_disk.c
index f4b9044..bcad6d8 100644
--- a/examples/create_disk.c
+++ b/examples/create_disk.c
@@ -7,7 +7,7
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.
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
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 +-
2015 May 20
0
[PATCH v3 1/3] virt-ls: support drive letters on Windows
..., char *argv[])
if (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 */ );
+ }...
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
...e command line. */
@@ -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) =...
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 Jul 01
2
Re: URI Handling Patch
Hi All,
Here's the latest patch. I think this should address the problem. The
query string is now only appended to the end of a URI in the HTTP and HTTPS
cases.
The add-uri test now passes, and 'make check' still passes.
-- Gabriel
2020 Feb 12
0
[common PATCH v2 1/1] options: add '--blocksize' option for C-based tools
...ize, struct drv **drvsp);
extern void option_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...
2020 Feb 11
1
[common PATCH] options: add '--blocksize' option for C-based tools
...ize, struct drv **drvsp);
extern void option_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...