代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/procps-ng 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6e59f5e746c15df4d4b53f2df85b64aa1f10d0c3 Mon Sep 17 00:00:00 2001
From: xuchunmei <xuchunmei@huawei.com>
Date: Fri, 11 Jan 2019 01:29:55 -0500
Subject: [PATCH] procps-ng: add -M and -N options for top
Signed-off-by: xuchunmei <xuchunmei@huawei.com>
---
top/top.c | 17 +++++++++++++++++
top/top_nls.c | 2 +-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/top/top.c b/top/top.c
index d890140..9bfc7f0 100644
--- a/top/top.c
+++ b/top/top.c
@@ -4139,6 +4139,23 @@ static void parse_args (char **args) {
args += ai;
if (pn) cp = pn + ci;
} continue;
+ case 'M':
+ {
+ Curwin->rc.sortindx = EU_MEM;
+ break;
+ }
+ case 'N':
+ {
+ if (cp[1])
+ cp++;
+ else if (*args)
+ cp = *args++;
+ else
+ error_exit("-N requires argument");
+ if (sscanf(cp, "%d", &Curwin->rc.maxtasks) != 1 || Curwin->rc.maxtasks < 0)
+ error_exit(fmtmk("bad iterations arg '%s'", cp));
+ break;
+ }
default :
error_exit(fmtmk(N_fmt(UNKNOWN_opts_fmt)
, *cp, Myname, N_txt(USAGE_abbrev_txt)));
diff --git a/top/top_nls.c b/top/top_nls.c
index 0af77ce..79a18e1 100644
--- a/top/top_nls.c
+++ b/top/top_nls.c
@@ -350,7 +350,7 @@ static void build_norm_nlstab (void) {
Norm_nlstab[OFF_one_word_txt] = _("Off");
/* Translation Hint: Only the following words should be translated
. secs (seconds), max (maximum), user, field, cols (columns)*/
- Norm_nlstab[USAGE_abbrev_txt] = _(" -hv | -bcEHiOSs1 -d secs -n max -u|U user -p pid(s) -o field -w [cols]");
+ Norm_nlstab[USAGE_abbrev_txt] = _(" -hv | -bcEHiOSs1 -d secs -n max -u|U user -p pid(s) -o field -w [cols] -M -N num");
Norm_nlstab[FAIL_statget_txt] = _("failed /proc/stat read");
Norm_nlstab[FOREST_modes_fmt] = _("Forest mode %s");
Norm_nlstab[FAIL_tty_get_txt] = _("failed tty get");
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。