checked in (request 30830)
OBS-URL: https://build.opensuse.org/package/show/Base:System/procps?expand=0&rev=15
This commit is contained in:
parent
5b10eca5a9
commit
e6a4f2c1f7
@ -1,66 +0,0 @@
|
||||
--- ps/global.c
|
||||
+++ ps/global.c 2009-11-17 16:59:38.279430039 +0000
|
||||
@@ -139,8 +139,12 @@ static void set_screen_size(void){
|
||||
screen_cols = ws.ws_col; // hmmm, NetBSD subtracts 1
|
||||
screen_rows = ws.ws_row;
|
||||
|
||||
- // TODO: delete this line
|
||||
- if(!isatty(STDOUT_FILENO)) screen_cols = OUTBUF_SIZE;
|
||||
+ // override COLUMNS setting if not a tty
|
||||
+ if(!isatty(STDOUT_FILENO)){
|
||||
+ screen_cols = OUTBUF_SIZE;
|
||||
+ screen_rows = OUTBUF_SIZE;
|
||||
+ if (personality&PER_UNIX_COLS) return; // SysV/UNIX98 based personality
|
||||
+ }
|
||||
|
||||
columns = getenv("COLUMNS");
|
||||
if(columns && *columns){
|
||||
@@ -286,6 +290,7 @@ static const char *set_personality(void)
|
||||
return NULL;
|
||||
|
||||
case_aix:
|
||||
+ personality |= PER_UNIX_COLS;
|
||||
bsd_j_format = "FB_j";
|
||||
bsd_l_format = "FB_l";
|
||||
/* bsd_s_format not used */
|
||||
@@ -313,6 +318,7 @@ static const char *set_personality(void)
|
||||
|
||||
case_sunos4:
|
||||
personality = PER_NO_DEFAULT_g;
|
||||
+ personality |= PER_UNIX_COLS;
|
||||
prefer_bsd_defaults = 1;
|
||||
bsd_j_format = "FB_j";
|
||||
bsd_l_format = "FB_l";
|
||||
@@ -337,12 +343,14 @@ static const char *set_personality(void)
|
||||
case_hp:
|
||||
case_hpux:
|
||||
personality = PER_BROKEN_o | PER_HPUX_x;
|
||||
+ personality |= PER_UNIX_COLS;
|
||||
return NULL;
|
||||
|
||||
case_svr4:
|
||||
case_sysv:
|
||||
case_sco:
|
||||
personality = PER_BROKEN_o | PER_SVR4_x;
|
||||
+ personality |= PER_UNIX_COLS;
|
||||
return NULL;
|
||||
|
||||
case_posix:
|
||||
@@ -351,6 +359,7 @@ static const char *set_personality(void)
|
||||
case_unix98:
|
||||
case_unix:
|
||||
personality = PER_BROKEN_o;
|
||||
+ personality |= PER_UNIX_COLS;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -361,8 +370,8 @@ void reset_global(void){
|
||||
double uptime_secs;
|
||||
reset_selection_list();
|
||||
look_up_our_self(&p);
|
||||
- set_screen_size();
|
||||
set_personality();
|
||||
+ set_screen_size();
|
||||
|
||||
all_processes = 0;
|
||||
bsd_c_option = 0;
|
@ -1,28 +0,0 @@
|
||||
--- sysctl.c
|
||||
+++ sysctl.c 2010-01-29 14:22:55.119429196 +0000
|
||||
@@ -146,8 +146,10 @@ static int ReadSetting(const char *restr
|
||||
slashdot(outname,'/','.'); /* change / to . */
|
||||
|
||||
if (stat(tmpname, &ts) < 0) {
|
||||
- perror(tmpname);
|
||||
- rc = -1;
|
||||
+ if (!IgnoreError) {
|
||||
+ perror(tmpname);
|
||||
+ rc = -1;
|
||||
+ }
|
||||
goto out;
|
||||
}
|
||||
if ((ts.st_mode & S_IRUSR) == 0)
|
||||
@@ -322,8 +324,10 @@ static int WriteSetting(const char *sett
|
||||
slashdot(outname,'/','.'); /* change / to . */
|
||||
|
||||
if (stat(tmpname, &ts) < 0) {
|
||||
- perror(tmpname);
|
||||
- rc = -1;
|
||||
+ if (!IgnoreError) {
|
||||
+ perror(tmpname);
|
||||
+ rc = -1;
|
||||
+ }
|
||||
goto out;
|
||||
}
|
||||
|
@ -1,10 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 29 15:24:32 CET 2010 - werner@suse.de
|
||||
|
||||
- Sysctl: ignore not existing directories in case of -e (bnc#559866)
|
||||
- Ps: Ignore the environment variable $COLUMS if stdout is not a
|
||||
terminal but only for $PS_PERSONALITY="posix" (bnc#497087)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 15 00:26:38 CET 2009 - jengelh@medozas.de
|
||||
|
||||
|
@ -63,8 +63,6 @@ Patch26: procps-3.2.8-pgrep_coption.dif
|
||||
Patch27: procps-3.2.7-terabyte.dif
|
||||
Patch28: procps-3.2.6-xen.dif
|
||||
Patch29: procps-3.2.8-fdleak.dif
|
||||
Patch30: procps-3.2.8-sysctlerr.dif
|
||||
Patch31: procps-3.2.8-columns.dif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -122,8 +120,6 @@ Authors:
|
||||
%patch27
|
||||
%patch28
|
||||
%patch29
|
||||
%patch30
|
||||
%patch31
|
||||
|
||||
%build
|
||||
make %{?jobs:-j%jobs} CFLAGS="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS -pipe" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user