aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/pmap.c4
-rw-r--r--procps/ps.c4
-rw-r--r--procps/pstree.c2
-rw-r--r--procps/watch.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/procps/pmap.c b/procps/pmap.c
index fd995a54d..aa221cfb8 100644
--- a/procps/pmap.c
+++ b/procps/pmap.c
@@ -20,7 +20,7 @@
20//usage:#define pmap_trivial_usage 20//usage:#define pmap_trivial_usage
21//usage: "[-xq] PID" 21//usage: "[-xq] PID"
22//usage:#define pmap_full_usage "\n\n" 22//usage:#define pmap_full_usage "\n\n"
23//usage: "Display detailed process memory usage" 23//usage: "Display process memory usage"
24//usage: "\n" 24//usage: "\n"
25//usage: "\n -x Show details" 25//usage: "\n -x Show details"
26//usage: "\n -q Quiet" 26//usage: "\n -q Quiet"
@@ -66,7 +66,7 @@ static int procps_get_maps(pid_t pid, unsigned opt)
66 int ret; 66 int ret;
67 char buf[256]; 67 char buf[256];
68 68
69 read_cmdline(buf, sizeof(buf), pid, "no such process"); 69 read_cmdline(buf, sizeof(buf), pid, NULL);
70 printf("%u: %s\n", (int)pid, buf); 70 printf("%u: %s\n", (int)pid, buf);
71 71
72 if (!(opt & OPT_q) && (opt & OPT_x)) 72 if (!(opt & OPT_q) && (opt & OPT_x))
diff --git a/procps/ps.c b/procps/ps.c
index 07ff7568f..8c373376d 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -638,7 +638,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
638 * and such large widths */ 638 * and such large widths */
639 terminal_width = MAX_WIDTH; 639 terminal_width = MAX_WIDTH;
640 if (isatty(1)) { 640 if (isatty(1)) {
641 get_terminal_width_height(0, &terminal_width, NULL); 641 terminal_width = get_terminal_width(0);
642 if (--terminal_width > MAX_WIDTH) 642 if (--terminal_width > MAX_WIDTH)
643 terminal_width = MAX_WIDTH; 643 terminal_width = MAX_WIDTH;
644 } 644 }
@@ -688,7 +688,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
688 if (w_count) { 688 if (w_count) {
689 terminal_width = (w_count == 1) ? 132 : MAX_WIDTH; 689 terminal_width = (w_count == 1) ? 132 : MAX_WIDTH;
690 } else { 690 } else {
691 get_terminal_width_height(0, &terminal_width, NULL); 691 terminal_width = get_terminal_width(0);
692 /* Go one less... */ 692 /* Go one less... */
693 if (--terminal_width > MAX_WIDTH) 693 if (--terminal_width > MAX_WIDTH)
694 terminal_width = MAX_WIDTH; 694 terminal_width = MAX_WIDTH;
diff --git a/procps/pstree.c b/procps/pstree.c
index ed1a41289..c5fb83688 100644
--- a/procps/pstree.c
+++ b/procps/pstree.c
@@ -381,7 +381,7 @@ int pstree_main(int argc UNUSED_PARAM, char **argv)
381 381
382 INIT_G(); 382 INIT_G();
383 383
384 get_terminal_width_height(0, &G.output_width, NULL); 384 G.output_width = get_terminal_width(0);
385 385
386 opt_complementary = "?1"; 386 opt_complementary = "?1";
387 getopt32(argv, "p"); 387 getopt32(argv, "p");
diff --git a/procps/watch.c b/procps/watch.c
index 0397f21bf..97aa04767 100644
--- a/procps/watch.c
+++ b/procps/watch.c
@@ -72,7 +72,7 @@ int watch_main(int argc UNUSED_PARAM, char **argv)
72 72
73 // STDERR_FILENO is procps3 compat: 73 // STDERR_FILENO is procps3 compat:
74 // "watch ls 2>/dev/null" does not detect tty size 74 // "watch ls 2>/dev/null" does not detect tty size
75 get_terminal_width_height(STDERR_FILENO, &new_width, NULL); 75 new_width = get_terminal_width(STDERR_FILENO);
76 if (new_width != width) { 76 if (new_width != width) {
77 width = new_width; 77 width = new_width;
78 free(header); 78 free(header);