From 6be498e83d337e98f2f15d50c776773f345b3ff7 Mon Sep 17 00:00:00 2001 From: james <> Date: Fri, 9 May 2008 12:19:18 +0000 Subject: *** empty log message *** --- apps/sympathy.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'apps/sympathy.c') diff --git a/apps/sympathy.c b/apps/sympathy.c index 4d4512f..7821ce5 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.46 2008/05/09 12:19:18 james + * *** empty log message *** + * * Revision 1.45 2008/03/15 01:44:31 james * *** empty log message *** * @@ -495,7 +498,7 @@ main (int argc, char *argv[]) memset (oflags, 0, sizeof (oflags)); memset (oargs, 0, sizeof (oargs)); - while ((c = getopt (argc, argv, "I:NRP:vw:utscr:lKHd:pb:fL:Fk:n:")) != EOF) { + while ((c = getopt (argc, argv, "I:NCRP:vw:utscr:lKHd:pb:fL:Fk:n:")) != EOF) { switch (c) { case ':': case 'h': @@ -528,6 +531,7 @@ main (int argc, char *argv[]) sum += oflags['r']; sum += oflags['l']; sum += oflags['v']; + sum += oflags['C']; if (!sum) { /* If no mode is specified behave like screen */ @@ -538,7 +542,7 @@ main (int argc, char *argv[]) if (sum != 1) fatal_moan - ("specifiy exactly one of ( -c and or -s ), -t, -r, -l and -v"); + ("specifiy exactly one of ( -c and or -s ), -t, -r, -C, -l and -v"); } if (oflags['v']) { @@ -768,6 +772,11 @@ main (int argc, char *argv[]) oflags['K'] ? SERIAL_LOCK_ACTIVE : SERIAL_LOCK_PASSIVE); if (!ctx->t) fatal_moan ("unable to open serial port %s", oargs['d']); + + if (oflags['C']) { + serial_close(ctx->t); + return 0; + } } if (oflags['b']) { -- cgit v1.2.3