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 +++++++++++-- apps/usage.c | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) 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']) { diff --git a/apps/usage.c b/apps/usage.c index 2f9667b..88f844a 100644 --- a/apps/usage.c +++ b/apps/usage.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.25 2008/05/09 12:19:18 james + * *** empty log message *** + * * Revision 1.24 2008/03/12 01:30:23 james * *** empty log message *** * @@ -103,6 +106,7 @@ usage (void) " [pty program] [pty program args]\n" "sympathy -c [-H] [-I string ] [-u] [-N] -k skt\n" "sympathy -r id [-H] [-I string ] [-u] [-N]\n" + "sympathy -C -d serialdev\n" "sympathy {-l|-ls}\n" "sympathy -v\n" "sympathy -h\n" @@ -120,6 +124,7 @@ usage (void) " ~/.sympathy/id or ~/.sympathy/hostname.id if id is an\n" " integer\n" " -l or -ls list active sockets in ~/.sympathy\n" + " -C clear inactive locks\n" " -v show version\n" " -h show help\n" "\n" -- cgit v1.2.3