diff --git a/pkgs/os-specific/linux/psmisc/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/pkgs/os-specific/linux/psmisc/0001-Typo-in-fuser-makes-M-on-all-the-time.patch new file mode 100644 index 000000000000..2bb93955aeae --- /dev/null +++ b/pkgs/os-specific/linux/psmisc/0001-Typo-in-fuser-makes-M-on-all-the-time.patch @@ -0,0 +1,44 @@ +From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001 +From: Brad Jorsch +Date: Fri, 28 Feb 2014 21:55:02 +1100 +Subject: [PATCH] Typo in fuser makes -M on all the time + +Brad found that fuser had the -M option on all the time. +A simple but significant typo caused this, thanks the the patch. + +Bug-Debian: http://bugs.debian.org/740275 + +Signed-off-by: Craig Small +--- + ChangeLog | 4 ++++ + src/fuser.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index fd1cccf..e5f784c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++Changes in 22.22 ++================ ++ * Fixed typo in fuser which has -M on Debian #740275 ++ + Changes in 22.21 + ================ + * Missing comma in fuser(1) added Debian #702391 +diff --git a/src/fuser.c b/src/fuser.c +index b485f65..389b302 100644 +--- a/src/fuser.c ++++ b/src/fuser.c +@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[]) + usage(_("No process specification given")); + + /* Check if -M flag was used and if so check mounts */ +- if (opts * OPT_ISMOUNTPOINT) { ++ if (opts & OPT_ISMOUNTPOINT) { + check_mountpoints(&mounts, &names_head, &names_tail); + } + +-- +1.9.2 + diff --git a/pkgs/os-specific/linux/psmisc/default.nix b/pkgs/os-specific/linux/psmisc/default.nix index 1215c5261f4f..5cf5e9a542d1 100644 --- a/pkgs/os-specific/linux/psmisc/default.nix +++ b/pkgs/os-specific/linux/psmisc/default.nix @@ -12,6 +12,9 @@ stdenv.mkDerivation rec { buildInputs = [ncurses]; + # From upstream, will be in next release. + patches = [ ./0001-Typo-in-fuser-makes-M-on-all-the-time.patch ]; + meta = { homepage = http://psmisc.sourceforge.net/; description = "A set of small useful utilities that use the proc filesystem (such as fuser, killall and pstree)";