psmisc/psmisc-22.21.dif
2014-03-24 16:13:40 +00:00

56 lines
1.8 KiB
Plaintext

--- configure.ac
+++ configure.ac 2010-10-15 09:00:33.000000000 +0000
@@ -40,7 +40,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
@@ -121,7 +121,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc
struct user_regs_struct.rdi,
struct user_regs_struct.rsi,
struct user_regs_struct.rdx], [],[],
- [#include <bits/types.h>
+ [#include <sys/types.h>
#include <sys/user.h>])
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
--- src/fuser.c
+++ src/fuser.c 2014-03-24 15:56:40.134235583 +0000
@@ -901,6 +901,7 @@ int main(int argc, char *argv[])
struct option *optr;
char *nsptr;
int skip_argv;
+ int seen_file;
struct option options[] = {
{"all", 0, NULL, 'a'},
@@ -941,6 +942,7 @@ int main(int argc, char *argv[])
fill_unix_cache(&unixsockets);
#endif
+ seen_file = 0;
for (argc_cnt = 1; argc_cnt < argc; argc_cnt++) {
current_argv = argv[argc_cnt];
if (current_argv[0] == '-') { /* its an option */
@@ -1093,6 +1095,7 @@ int main(int argc, char *argv[])
}
}
this_name->matched_procs = NULL;
+ seen_file = 1;
if (opts & (OPT_MOUNTS | OPT_ISMOUNTPOINT)
&& this_name->name_space != NAMESPACE_FILE)
usage(_
@@ -1144,7 +1147,7 @@ int main(int argc, char *argv[])
names_tail->next = this_name;
names_tail = this_name;
} /* for across the argvs */
- if (names_head == NULL)
+ if (names_head == NULL && !seen_file)
usage(_("No process specification given"));
/* Check if -M flag was used and if so check mounts */