Displaying 10 results from an estimated 10 matches for "remote_control".
2009 Aug 24
5
[0/5] guestfish: detect stdout-write failure
Nearly any program that writes to standard output can
benefit from this sort of fix.
Without it, running e.g., ./guestfish --version > /dev/full
would exit successfully, even though it got ENOSPC
when writing to the full device. That means regular
output redirected to a file on a full partition may also
fail to be written, and the error ignored.
Before:
$ guestfish --version >
2010 May 12
1
[PATCH] guestfish -i and virt-inspector work on filenames containing spaces (RHBZ#507810).
..._shell_quote (FILE *stream, const char *str);
/* Currently open libguestfs handle. */
guestfs_h *g;
@@ -362,9 +363,6 @@ main (int argc, char *argv[])
/* Inspector mode invalidates most of the other arguments. */
if (inspector) {
- char cmd[1024];
- int r;
-
if (drvs || mps || remote_control_listen || remote_control ||
guestfs_get_selinux (g)) {
fprintf (stderr, _("%s: cannot use -i option with -a, -m, -N, "
@@ -379,44 +377,90 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- strcpy (cmd, "a=`virt-inspector");
+ char *cmd;...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...failed to create handle\n"));
- exit (EXIT_FAILURE);
- }
+ if (g == NULL)
+ error (EXIT_FAILURE, errno, "guestfs_create");
for (;;) {
c = getopt_long (argc, argv, options, long_options, &option_index);
@@ -253,19 +251,15 @@ main (int argc, char *argv[])
remote_control_listen = 1;
else if (STREQ (long_options[option_index].name, "remote")) {
if (optarg) {
- if (sscanf (optarg, "%d", &remote_control) != 1) {
- fprintf (stderr, _("%s: --listen=PID: PID was not a number: %s\n"),
-...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did:
if (something_bad) {
perror (...);
exit (EXIT_FAILURE);
}
replace this with use of the error(3) function:
if (something_bad)
error (EXIT_FAILURE, errno, ...);
The error(3) function is supplied by glibc, or by gnulib on platforms
which don't have it, and is much more flexible than perror(3). Since
we already use error(3), there seems to be
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...editor = "emacs -nw";
else {
editor = getenv ("EDITOR");
diff --git a/fish/fish.c b/fish/fish.c
index 3ab09b5..9a89f55 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -843,40 +843,40 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd)
r = rc_remote (remote_control, cmd, argc, argv, exit_on_error);
/* Otherwise execute it locally. */
- else if (strcasecmp (cmd, "help") == 0) {
+ else if (STRCASEEQ (cmd, "help")) {
if (argc == 0)
list_commands ();
else
display_command (argv[0]);
r = 0;
}
- else if (str...
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...uestfs_create ();
if (g == NULL) {
fprintf (stderr, _("guestfs_create: failed to create handle\n"));
- exit (1);
+ exit (EXIT_FAILURE);
}
guestfs_set_autosync (g, 1);
@@ -222,7 +222,7 @@ main (int argc, char *argv[])
if (sscanf (optarg, "%d", &remote_control) != 1) {
fprintf (stderr, _("%s: --listen=PID: PID was not a number: %s\n"),
program_name, optarg);
- exit (1);
+ exit (EXIT_FAILURE);
}
} else {
p = getenv ("GUESTFISH_PID");
@@ -230,7 +230,...
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...r (EXIT_FAILURE, 0,
_("unknown long option: %s (%d)"),
@@ -496,6 +501,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);
/* Remote control? */
if (remote_control_listen && remote_control)
diff --git a/fish/guestfish.pod b/fish/guestfish.pod
index 4f24006b8..9df88845c 100644
--- a/fish/guestfish.pod
+++ b/fish/guestfish.pod
@@ -280,6 +280,23 @@ Using this flag is mostly equivalent to using the C<inspect-os>
command and then using other command...
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 +-
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...n"
+ "For more information, see the manpage guestfish(1).\n"));
}
int
@@ -191,31 +191,31 @@ main (int argc, char *argv[])
switch (c) {
case 0: /* options which are long only */
if (strcmp (long_options[option_index].name, "listen") == 0)
- remote_control_listen = 1;
+ remote_control_listen = 1;
else if (strcmp (long_options[option_index].name, "remote") == 0) {
- if (optarg) {
- if (sscanf (optarg, "%d", &remote_control) != 1) {
- fprintf (stderr, _("guestfish: --listen=PID: PID was not a number: %s\...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.