summaryrefslogtreecommitdiffstats
path: root/fish/rc.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-03 11:10:13 -0400
committerJim Meyering <meyering@redhat.com>2009-08-03 17:17:57 +0200
commit2f1a50d81671810256dce0852e6b1e0810ac44af (patch)
treec6058422a2f177f7c55ddaa22e329699a9d21e20 /fish/rc.c
parent72c829395bb6a4800516d4f535e18af48195585b (diff)
downloadlibguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.tar.gz
libguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.tar.xz
libguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.zip
Convert all TABs-as-indentation to spaces.
Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'fish/rc.c')
-rw-r--r--fish/rc.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/fish/rc.c b/fish/rc.c
index 0d67a62b..e88716c7 100644
--- a/fish/rc.c
+++ b/fish/rc.c
@@ -131,52 +131,52 @@ rc_listen (void)
xdrstdio_create (&xdr, fp, XDR_DECODE);
if (!xdr_guestfish_hello (&xdr, &hello)) {
- fprintf (stderr, _("guestfish: protocol error: could not read 'hello' message\n"));
- goto error;
+ fprintf (stderr, _("guestfish: protocol error: could not read 'hello' message\n"));
+ goto error;
}
if (strcmp (hello.vers, PACKAGE_VERSION) != 0) {
- fprintf (stderr, _("guestfish: protocol error: version mismatch, server version '%s' does not match client version '%s'. The two versions must match exactly.\n"),
- PACKAGE_VERSION,
- hello.vers);
- xdr_free ((xdrproc_t) xdr_guestfish_hello, (char *) &hello);
- goto error;
+ fprintf (stderr, _("guestfish: protocol error: version mismatch, server version '%s' does not match client version '%s'. The two versions must match exactly.\n"),
+ PACKAGE_VERSION,
+ hello.vers);
+ xdr_free ((xdrproc_t) xdr_guestfish_hello, (char *) &hello);
+ goto error;
}
xdr_free ((xdrproc_t) xdr_guestfish_hello, (char *) &hello);
while (xdr_guestfish_call (&xdr, &call)) {
- /* We have to extend and NULL-terminate the argv array. */
- argc = call.args.args_len;
- argv = realloc (call.args.args_val, (argc+1) * sizeof (char *));
- if (argv == NULL) {
- perror ("realloc");
- exit (1);
- }
- call.args.args_val = argv;
- argv[argc] = NULL;
-
- if (verbose) {
- fprintf (stderr, "guestfish(%d): %s", pid, call.cmd);
- for (i = 0; i < argc; ++i)
- fprintf (stderr, " %s", argv[i]);
- fprintf (stderr, "\n");
- }
-
- /* Run the command. */
- reply.r = issue_command (call.cmd, argv, NULL);
-
- xdr_free ((xdrproc_t) xdr_guestfish_call, (char *) &call);
-
- /* Send the reply. */
- xdrstdio_create (&xdr2, fp, XDR_ENCODE);
- (void) xdr_guestfish_reply (&xdr2, &reply);
- xdr_destroy (&xdr2);
-
- /* Exit on error? */
- if (call.exit_on_error && reply.r == -1) {
- unlink (sockpath);
- exit (1);
- }
+ /* We have to extend and NULL-terminate the argv array. */
+ argc = call.args.args_len;
+ argv = realloc (call.args.args_val, (argc+1) * sizeof (char *));
+ if (argv == NULL) {
+ perror ("realloc");
+ exit (1);
+ }
+ call.args.args_val = argv;
+ argv[argc] = NULL;
+
+ if (verbose) {
+ fprintf (stderr, "guestfish(%d): %s", pid, call.cmd);
+ for (i = 0; i < argc; ++i)
+ fprintf (stderr, " %s", argv[i]);
+ fprintf (stderr, "\n");
+ }
+
+ /* Run the command. */
+ reply.r = issue_command (call.cmd, argv, NULL);
+
+ xdr_free ((xdrproc_t) xdr_guestfish_call, (char *) &call);
+
+ /* Send the reply. */
+ xdrstdio_create (&xdr2, fp, XDR_ENCODE);
+ (void) xdr_guestfish_reply (&xdr2, &reply);
+ xdr_destroy (&xdr2);
+
+ /* Exit on error? */
+ if (call.exit_on_error && reply.r == -1) {
+ unlink (sockpath);
+ exit (1);
+ }
}
error:
@@ -192,7 +192,7 @@ rc_listen (void)
/* Remote control client. */
int
rc_remote (int pid, const char *cmd, int argc, char *argv[],
- int exit_on_error)
+ int exit_on_error)
{
guestfish_hello hello;
guestfish_call call;