OSDN Git Service

* server.c (usage): Don't include the entire pathname in the usage
authorjimb <jimb>
Wed, 20 Oct 2004 19:19:39 +0000 (19:19 +0000)
committerjimb <jimb>
Wed, 20 Oct 2004 19:19:39 +0000 (19:19 +0000)
message.

rda/unix/ChangeLog
rda/unix/server.c

index 4505e02..1ced402 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-20  Jim Blandy  <jimb@redhat.com>
+
+       * server.c (usage): Don't include the entire pathname in the usage
+       message.
+
 2004-10-19  Jim Blandy  <jimb@redhat.com>
 
        * thread-db.c (get_thread_signals): Doc fix.
index dc27f55..0f9bc30 100644 (file)
@@ -250,6 +250,10 @@ parse_speed (char *str)
 static void
 usage (char *progname)
 {
+  /* Remove any leading slashes from the executable name.  */
+  if (strrchr (progname, '/'))
+    progname = strrchr (progname, '/') + 1;
+
   fprintf (stderr,
     "Usage: %s [-v] tcp-port-num executable-file [arguments ...]\n"
     "   or: %s -a [-v] tcp-port-num process-id\n"