search for: error_fil

Displaying 20 results from an estimated 23 matches for "error_fil".

Did you mean: error_file
2017 Sep 20
1
Re: [PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
...b/lib/command.c > index bc469de59..7018c3ac0 100644 > --- a/lib/command.c > +++ b/lib/command.c > @@ -815,8 +815,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode) > if (guestfs_int_lazy_make_tmpdir (cmd->g) == -1) > goto error; > > - cmd->error_file = > - safe_asprintf (cmd->g, "%s/cmderr.%d", cmd->g->tmpdir, ++cmd->g->unique); > + cmd->error_file = guestfs_int_make_temp_path (cmd->g, "cmderr", "txt"); > + if (!cmd->error_file) > + goto error; > errfd = open (cmd-...
2012 Feb 27
4
[PATCH 0/4] Add various ntfs* tools and unify label setting.
This miscellaneous patch adds bindings for: - ntfsfix - ntfsclone - ntfslabel and unifies filesystem label setting through a single API 'set-label' which replaces 'set-e2label' and is also able to set labels on NTFS using the ntfslabel program. 'ntfsfix' has been added as a possible way to fix RHBZ#797760. However I have not found a way to fully fix this bug. See
2017 Sep 19
0
[PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
...cmd, varst); diff --git a/lib/command.c b/lib/command.c index bc469de59..7018c3ac0 100644 --- a/lib/command.c +++ b/lib/command.c @@ -815,8 +815,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode) if (guestfs_int_lazy_make_tmpdir (cmd->g) == -1) goto error; - cmd->error_file = - safe_asprintf (cmd->g, "%s/cmderr.%d", cmd->g->tmpdir, ++cmd->g->unique); + cmd->error_file = guestfs_int_make_temp_path (cmd->g, "cmderr", "txt"); + if (!cmd->error_file) + goto error; errfd = open (cmd->error_file,...
2019 Dec 03
7
[p2v PATCH 0/6] Use GLib a bit more
In an effort to reduce the code, start to use few bits of GLib: - replace the gnulib c-type module - replace the gnulib getprogname module - use g_spawn_sync to launch curl, and drop a file reading function Pino Toscano (6): Include glib.h in p2v.h Use g_ascii_isspace instead of c_isspace from gnulib Use g_get_prgname instead of getprogname from gnulib build: remove no more used gnulib
2019 Sep 23
6
[PATCH v2 0/5] remove unused gnulib modules
This is an extended version of: https://www.redhat.com/archives/libguestfs/2019-September/msg00178.html It adds a couple of simple code changes, so it makes it possible to drop more modules. In addition, more unused modules were dropped. Pino Toscano (5): tests: switch away from xgetcwd daemon: move read_whole_file to common utils daemon: switch from read_file to read_whole_file daemon:
2015 Sep 29
8
[PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and 1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for running commands asynchronously. It is only used by the copy-in and copy-out APIs. Unfortunately this made the command code very complex: it was almost impossible to redirect stderr to a file, and there were a lot of long-range dependencies through the file. It was also buggy:
2019 Nov 27
7
[PATCH v3 0/6] remove unused build stuff
This is an extended version of: https://www.redhat.com/archives/libguestfs/2019-September/msg00288.html Apparently I forgot it on my tree, so I'm posting that series again, adding an extra cleanup more due to the v2v/common splits. Pino Toscano (6): tests: switch away from xgetcwd daemon: move read_whole_file to common utils daemon: switch from read_file to read_whole_file daemon:
2017 Sep 19
7
[PATCH 0/6] Various clean ups in lib/
Miscellaneous small cleanups in lib/ directory. Rich.
2010 May 13
1
[PATCH] Improve errors from tar-in/tgz-in commands (RHBZ#591155 RHBZ#591250).
...quot; #include "actions.h" +/* Redirect errors from the tar command to the error file, then + * provide functions for reading it in. We overwrite the file each + * time, and since it's small and stored on the appliance we don't + * bother to delete it. + */ +static const char *error_file = "/tmp/error"; + +static char * +read_error_file (void) +{ + size_t len; + char *str = read_file (error_file, &len); + if (str == NULL) { + str = strdup ("(no error)"); + if (str == NULL) { + perror ("strdup"); + exit (EXIT_FAILURE); + } +...
2023 Jul 11
1
[libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()
...; extern void guestfs_int_cmd_close (struct command *); diff --git a/lib/command.c b/lib/command.c index 515ef624bd96..82a47bafa9e5 100644 --- a/lib/command.c +++ b/lib/command.c @@ -152,9 +152,6 @@ struct command /* When using the pipe_* APIs, stderr is pointed to a temporary file. */ char *error_file; - /* Close file descriptors (defaults to true). */ - bool close_files; - /* Supply a callback to receive stdout. */ cmd_stdout_callback stdout_callback; void *stdout_data; @@ -186,7 +183,6 @@ guestfs_int_new_command (guestfs_h *g) cmd = safe_calloc (g, 1, sizeof *cmd); cmd->...
2015 Jul 15
1
[PATCH 1/2] actions: tar_out: add xattrs and selinux optargs
Add additional arguments for tar, so extended attributes and/or SELinux contexts can be saved in output tars. --- daemon/tar.c | 18 +++++++++++++----- generator/actions.ml | 10 +++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/daemon/tar.c b/daemon/tar.c index d6f8f2f..68af749 100644 --- a/daemon/tar.c +++ b/daemon/tar.c @@ -311,7 +311,7 @@
2017 Sep 20
7
[PATCH v2] 0/6] Various clean ups in lib/
v1 -> v2: - Remove the unnecessary calls to guestfs_int_lazy_make_tmpdir in the final patch. Rich.
2016 Oct 13
1
[PATCH] tar-in: Add workaround because tar doesn't restore capabilities (RHBZ#1384241).
...771927. + */ + xattrs ? "--xattrs --xattrs-include='*' " : "", selinux ? "--selinux " : "", acls ? "--acls " : "", error_file) == -1) { -- 2.9.3
2003 Aug 30
0
Diagnostic message end up in STDERR
...use rsync with "-vv". Is this a known bug? Here is the full rsync command: rsync -e ssh -abvv --delete --exclude lost+found/ --exclude core --exclude *.o --exclude .netscape/cache --max-delete=250 --backup-dir=/some/path remote:/path/to/sent /path/to/receive >>log_file 2>>error_file Platforms: Receive: Linux PC, 2.4.21, rsync v 2.5.6 protocol version 26 Sent: Solaris, 2.8, rsync v2.3.1 protocol version 20 [I know the Solaris version is ancient but I am not the sys. admin. ...] Is there a way to avoid this and still get most of the diagnostics of -vv? Any help or comment...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...287edb..bf97eaf 100644 --- a/daemon/ntfsclone.c +++ b/daemon/ntfsclone.c @@ -30,6 +30,8 @@ #include "actions.h" #include "optgroups.h" +GUESTFSD_EXT_CMD(str_ntfsclone, ntfsclone); + /* Read the error file. Returns a string that the caller must free. */ static char * read_error_file (char *error_file) @@ -80,8 +82,8 @@ do_ntfsclone_in (const char *device) close (fd); /* Construct the command. */ - if (asprintf_nowarn (&cmd, "ntfsclone -O %s --restore-image - 2> %s", - device, error_file) == -1) { + if (asprintf_nowarn (&cmd...
2012 Aug 30
1
[PATCH] collect list of called external commands
...4287edb..e90b545 100644 --- a/daemon/ntfsclone.c +++ b/daemon/ntfsclone.c @@ -30,6 +30,8 @@ #include "actions.h" #include "optgroups.h" +GUESTFS_EXT_CMD(str_ntfsclone, ntfsclone); + /* Read the error file. Returns a string that the caller must free. */ static char * read_error_file (char *error_file) @@ -80,8 +82,8 @@ do_ntfsclone_in (const char *device) close (fd); /* Construct the command. */ - if (asprintf_nowarn (&cmd, "ntfsclone -O %s --restore-image - 2> %s", - device, error_file) == -1) { + if (asprintf_nowarn (&cmd...
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...278d..767065648 100644 --- a/daemon/ntfsclone.c +++ b/daemon/ntfsclone.c @@ -32,8 +32,6 @@ #include "actions.h" #include "optgroups.h" -GUESTFSD_EXT_CMD(str_ntfsclone, ntfsclone); - /* Read the error file. Returns a string that the caller must free. */ static char * read_error_file (char *error_file) @@ -83,7 +81,7 @@ do_ntfsclone_in (const char *device) /* Construct the command. */ if (asprintf (&cmd, "%s -O %s --restore-image - 2> %s", - str_ntfsclone, device, error_file) == -1) { + "ntfsclone", device, error...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...ne.c index a239111..f04017c 100644 --- a/daemon/ntfsclone.c +++ b/daemon/ntfsclone.c @@ -23,6 +23,8 @@ #include <inttypes.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include <error.h> #include "read-file.h" @@ -42,10 +44,8 @@ read_error_file (char *error_file) str = read_file (error_file, &len); if (str == NULL) { str = strdup ("(no error)"); - if (str == NULL) { - perror ("strdup"); - exit (EXIT_FAILURE); - } + if (str == NULL) + error (EXIT_FAILURE, errno, "strdup"...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...ot;) /* Read the error file. Returns a string that the caller must free. */ static char * @@ -83,7 +83,7 @@ do_ntfsclone_in (const char *device) /* Construct the command. */ if (asprintf (&cmd, "%s -O %s --restore-image - 2> %s", - str_ntfsclone, device, error_file) == -1) { + "ntfsclone", device, error_file) == -1) { err = errno; r = cancel_receive (); errno = err; @@ -161,8 +161,7 @@ do_ntfsclone_out (const char *device, } /* Construct the ntfsclone command. */ - if (asprintf (&cmd, "%s -o - --save-...