Rework of patch sets
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=89
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
---
|
||||
configure.ac | 4 ++--
|
||||
doc/Makefile.am | 2 +-
|
||||
src/fuser.c | 13 ++++++++-----
|
||||
3 files changed, 11 insertions(+), 8 deletions(-)
|
||||
src/fuser.c | 5 ++++-
|
||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac 2017-06-28 13:10:43.594188007 +0000
|
||||
@@ -42,7 +42,7 @@ fi
|
||||
+++ configure.ac 2017-07-05 13:18:18.806270222 +0000
|
||||
@@ -45,7 +45,7 @@ fi
|
||||
if test "$enable_timeout_stat" = "static"; then
|
||||
AC_DEFINE([WITH_TIMEOUT_STAT], [2], [Use timeout on stat calls])
|
||||
fi
|
||||
-AM_CONDITIONAL([WANT_TIMEOUT_STAT], [test "$enable_timeout_stat" = "static"])
|
||||
+AM_CONDITIONAL([WANT_TIMEOUT_STAT], [test "$enable_timeout_stat" != "no"])
|
||||
|
||||
# Use string search for network based file systems but only if the system
|
||||
# has /proc/self/mountinfo
|
||||
@@ -126,7 +126,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc
|
||||
# Use /proc/self/mountinfo if available
|
||||
if test -e /proc/self/mountinfo ; then
|
||||
@@ -142,7 +142,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc
|
||||
struct user_regs_struct.rdi,
|
||||
struct user_regs_struct.rsi,
|
||||
struct user_regs_struct.rdx], [],[],
|
||||
@@ -25,7 +25,7 @@
|
||||
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
|
||||
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
|
||||
--- doc/Makefile.am
|
||||
+++ doc/Makefile.am 2017-06-28 13:10:43.594188007 +0000
|
||||
+++ doc/Makefile.am 2017-07-05 13:18:18.806270222 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-man_MANS = killall.1 peekfd.1 prtstat.1 pstree.1
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
if WANT_FUSER
|
||||
--- src/fuser.c
|
||||
+++ src/fuser.c 2017-06-28 13:10:43.594188007 +0000
|
||||
@@ -1041,6 +1041,7 @@ int main(int argc, char *argv[])
|
||||
+++ src/fuser.c 2017-07-05 13:18:18.806270222 +0000
|
||||
@@ -1085,6 +1085,7 @@ int main(int argc, char *argv[])
|
||||
struct option *optr;
|
||||
char *nsptr;
|
||||
int skip_argv;
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
struct option options[] = {
|
||||
{"all", 0, NULL, 'a'},
|
||||
@@ -1084,6 +1085,7 @@ int main(int argc, char *argv[])
|
||||
@@ -1128,6 +1129,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
atexit(atexit_free_lists);
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
for (argc_cnt = 1; argc_cnt < argc; argc_cnt++) {
|
||||
current_argv = argv[argc_cnt];
|
||||
if (current_argv[0] == '-') { /* its an option */
|
||||
@@ -1235,6 +1237,7 @@ int main(int argc, char *argv[])
|
||||
@@ -1273,6 +1275,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
this_name->matched_procs = NULL;
|
||||
@@ -59,7 +59,7 @@
|
||||
if (opts & (OPT_MOUNTS | OPT_ISMOUNTPOINT)
|
||||
&& this_name->name_space != NAMESPACE_FILE) {
|
||||
free(this_name);
|
||||
@@ -1288,7 +1291,7 @@ int main(int argc, char *argv[])
|
||||
@@ -1326,7 +1329,7 @@ int main(int argc, char *argv[])
|
||||
names_tail->next = this_name;
|
||||
names_tail = this_name;
|
||||
} /* for across the argvs */
|
||||
@@ -68,25 +68,3 @@
|
||||
usage(_("No process specification given"));
|
||||
|
||||
/* Check if -M flag was used and if so check mounts */
|
||||
@@ -1552,17 +1555,17 @@ check_dir(const pid_t pid, const char *d
|
||||
struct device_list *dev_tmp;
|
||||
struct unixsocket_list *sock_tmp;
|
||||
struct stat st, lst;
|
||||
- char dirpath[MAX_PATHNAME];
|
||||
- char filepath[MAX_PATHNAME];
|
||||
+ char dirpath[PATH_MAX+1];
|
||||
+ char filepath[PATH_MAX+1];
|
||||
|
||||
- snprintf(dirpath, MAX_PATHNAME, "/proc/%d/%s", pid, dirname);
|
||||
+ snprintf(dirpath, PATH_MAX , "/proc/%d/%s", pid, dirname);
|
||||
if ((dirp = opendir(dirpath)) == NULL)
|
||||
return;
|
||||
while ((direntry = readdir(dirp)) != NULL) {
|
||||
if (direntry->d_name[0] < '0' || direntry->d_name[0] > '9')
|
||||
continue;
|
||||
|
||||
- snprintf(filepath, MAX_PATHNAME, "/proc/%d/%s/%s",
|
||||
+ snprintf(filepath, PATH_MAX, "/proc/%d/%s/%s",
|
||||
pid, dirname, direntry->d_name);
|
||||
|
||||
if (timeout(thestat, filepath, &st, 5) != 0) {
|
||||
|
Reference in New Issue
Block a user