ALT Linux Bugzilla
– Attachment 960 Details for
Bug 7246
w: non-truncated listing
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
procps-3.2.2-w-notruncate.diff
procps-3.2.2-w-notruncate.diff (text/plain), 2.78 KB, created by
Anton Farygin
on 2005-06-29 17:24:53 MSD
(
hide
)
Description:
procps-3.2.2-w-notruncate.diff
Filename:
MIME Type:
Creator:
Anton Farygin
Created:
2005-06-29 17:24:53 MSD
Size:
2.78 KB
patch
obsolete
>Only in procps-3.2.0/proc: .depend >Only in procps-3.2.0/proc: alloc.o >Only in procps-3.2.0/proc: devname.o >Only in procps-3.2.0/proc: escape.o >Only in procps-3.2.0/proc: ksym.o >Only in procps-3.2.0/proc: libproc.a >Only in procps-3.2.0/proc: prof.o >Only in procps-3.2.0/proc: pwcache.o >Only in procps-3.2.0/proc: readproc.o >Only in procps-3.2.0/proc: sig.o >Only in procps-3.2.0/proc: slab.o >Only in procps-3.2.0/proc: status.o >Only in procps-3.2.0/proc: sysinfo.o >Only in procps-3.2.0/proc: version.o >Only in procps-3.2.0/proc: whattime.o >Only in procps-3.2.0: w >diff -ur procps-3.2.0.orig/w.c procps-3.2.0/w.c >--- procps-3.2.0.orig/w.c 2003-09-20 08:42:26.000000000 +0200 >+++ procps-3.2.0/w.c 2004-03-03 16:55:17.895644502 +0100 >@@ -191,7 +191,25 @@ > return; > > strncpy(uname, u->ut_user, USERSZ); /* force NUL term for printf */ >- if (formtype) { >+ switch(formtype) { >+ case 2: >+ printf("%s %s", uname, u->ut_line); >+ if (from) >+ print_host(u->ut_host, sizeof u->ut_host); >+ print_logintime(u->ut_time, stdout); >+ if (*u->ut_line == ':') /* idle unknown for xdm logins */ >+ printf(" ?xdm? "); >+ else >+ print_time_ival7(idletime(tty), 0, stdout); >+ print_time_ival7(jcpu/Hertz, (jcpu%Hertz)*(100./Hertz), stdout); >+ if (best) { >+ unsigned long long pcpu = best->utime + best->stime; >+ print_time_ival7(pcpu/Hertz, (pcpu%Hertz)*(100./Hertz), stdout); >+ } else >+ printf(" ? "); >+ break; >+ >+ case 1: > printf("%-9.8s%-9.8s", uname, u->ut_line); > if (from) > print_host(u->ut_host, sizeof u->ut_host); >@@ -206,7 +224,8 @@ > print_time_ival7(pcpu/Hertz, (pcpu%Hertz)*(100./Hertz), stdout); > } else > printf(" ? "); >- } else { >+ break; >+ case 0: > printf("%-9.8s%-9.8s", u->ut_user, u->ut_line); > if (from) > print_host(u->ut_host, sizeof u->ut_host); >@@ -214,6 +233,8 @@ > printf(" ?xdm? "); > else > print_time_ival7(idletime(tty), 0, stdout); >+ >+ break; > } > fputs(" ", stdout); > if (likely(best)) { >@@ -238,11 +259,12 @@ > #endif > > setlocale(LC_ALL, ""); >- for (args=0; (ch = getopt(argc, argv, "hlusfV")) != EOF; args++) >+ for (args=0; (ch = getopt(argc, argv, "hlusnfV")) != EOF; args++) > switch (ch) { > case 'h': header = 0; break; > case 'l': longform = 1; break; > case 's': longform = 0; break; >+ case 'n': longform = 2; header=0; break; > case 'f': from = !from; break; > case 'V': display_version(); exit(0); > case 'u': ignoreuser = 1; break; >@@ -251,6 +273,7 @@ > " -h skip header\n" > " -l long listing (default)\n" > " -s short listing\n" >+ " -n non truncated listing (large)\n" > " -u ignore uid of processes\n" > " -f toggle FROM field (default %s)\n" > " -V display version\n", FROM_STRING); >Only in procps-3.2.0: w.o
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 7246
: 960