On Tue, 12 Dec 2006, Otto Moerbeek wrote:

> 
> 
> On Tue, 12 Dec 2006, Mark Lumsden wrote:
> 
> > hi again...
> > 
> > man top diff attached
> 
> I'm assuming you are talking about the top(1) in base. It has no 'C'
> command line option.

Ah, somebody drew my attention to your other post. Why send this to
ports? 

You also missed to update usage().

Anyway, I never missed this option, but I guess it can go in if no
developer objects.

For ease reference, this is the complete diff.

        -Otto


Index: top.1
===================================================================
RCS file: /cvs/src/usr.bin/top/top.1,v
retrieving revision 1.33
diff -u -p -r1.33 top.1
--- top.1       5 Dec 2005 12:20:27 -0000       1.33
+++ top.1       12 Dec 2006 15:02:47 -0000
@@ -31,7 +31,7 @@
 .Nd display and update information about the top CPU processes
 .Sh SYNOPSIS
 .Nm top
-.Op Fl bIinqSTu
+.Op Fl bCIinqSTu
 .Op Fl d Ar count
 .Op Fl o Ar field
 .Op Fl p Ar pid
@@ -82,6 +82,10 @@ and
 .Ql ^\e )
 still have an effect.
 This is the default on a dumb terminal, or when the output is not a terminal.
+.It Fl C
+Show process
+.Em command
+line arguments.
 .It Fl d Ar count
 Show only
 .Ar count
Index: top.c
===================================================================
RCS file: /cvs/src/usr.bin/top/top.c,v
retrieving revision 1.43
diff -u -p -r1.43 top.c
--- top.c       4 Mar 2006 06:58:12 -0000       1.43
+++ top.c       12 Dec 2006 15:02:47 -0000
@@ -135,7 +135,7 @@ usage(void)
        extern char *__progname;
 
        fprintf(stderr,
-           "usage: %s [-bIinqSTu] [-d count] [-o field] [-p pid] [-s time] [-U 
username] [number]\n",
+           "usage: %s [-bCIinqSTu] [-d count] [-o field] [-p pid] [-s time] 
[-U username] [number]\n",
            __progname);
 }
 
@@ -145,8 +145,12 @@ parseargs(int ac, char **av)
        char *endp;
        int i;
 
-       while ((i = getopt(ac, av, "STIbinqus:d:p:U:o:")) != -1) {
+       while ((i = getopt(ac, av, "STICbinqus:d:p:U:o:")) != -1) {
                switch (i) {
+               case 'C':
+                       show_args = Yes;
+                       break;
+
                case 'u':       /* toggle uid/username display */
                        do_unames = !do_unames;
                        break;
        

Reply via email to