diff options
author | 2006-09-10 19:15:17 +0000 | |
---|---|---|
committer | 2006-09-10 19:15:17 +0000 | |
commit | b0b15382f10f54ba82db64c1b1f74cf8c49cc6b7 (patch) | |
tree | 200d122a7210511a23ccbedca037078e21e0d6fc /sys-process | |
parent | Version bump. (diff) | |
download | gentoo-2-b0b15382f10f54ba82db64c1b1f74cf8c49cc6b7.tar.gz gentoo-2-b0b15382f10f54ba82db64c1b1f74cf8c49cc6b7.tar.bz2 gentoo-2-b0b15382f10f54ba82db64c1b1f74cf8c49cc6b7.zip |
Ensure that fuser returns non zero if no files are found
(Portage version: 2.1.1_rc1-r5)
Diffstat (limited to 'sys-process')
-rw-r--r-- | sys-process/fuser-bsd/ChangeLog | 6 | ||||
-rw-r--r-- | sys-process/fuser-bsd/files/fuser-return.patch | 30 | ||||
-rw-r--r-- | sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild | 11 |
3 files changed, 44 insertions, 3 deletions
diff --git a/sys-process/fuser-bsd/ChangeLog b/sys-process/fuser-bsd/ChangeLog index 89ef39a627de..fc2a4f94b73f 100644 --- a/sys-process/fuser-bsd/ChangeLog +++ b/sys-process/fuser-bsd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-process/fuser-bsd # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/fuser-bsd/ChangeLog,v 1.1 2006/09/10 12:45:32 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/fuser-bsd/ChangeLog,v 1.2 2006/09/10 19:15:17 uberlord Exp $ + + 10 Sep 2006; Roy Marples <uberlord@gentoo.org> +files/fuser-return.patch, + fuser-bsd-1142334561.ebuild: + Ensure that fuser returns non zero if no files are found *fuser-bsd-1142334561 (10 Sep 2006) diff --git a/sys-process/fuser-bsd/files/fuser-return.patch b/sys-process/fuser-bsd/files/fuser-return.patch new file mode 100644 index 000000000000..f06f46b36a42 --- /dev/null +++ b/sys-process/fuser-bsd/files/fuser-return.patch @@ -0,0 +1,30 @@ +--- fuser.orig/fuser.c 2006-09-10 18:58:37 +0000 ++++ fuser/fuser.c 2006-09-10 19:00:12 +0000 +@@ -608,6 +608,7 @@ + char *ep; + char *kernimg = NULL; /* We are using curr. sys by default */ + char *mcore = NULL; ++ int retval = 1; /* Return 1 unless we find any open files */ + + while ((ch = getopt(argc, argv, "C:K:cfkms:u")) != -1) + switch(ch) { +@@ -694,6 +695,9 @@ + ufl = get_uflags(rfile, pinfo); + + if (ufl != 0) { ++ /* Found a file, so return 0 */ ++ retval = 0; ++ + print_file_info(pinfo->pid, \ + pinfo->uid, ufl); + if ((flags & KFLAG) != 0) +@@ -707,8 +711,7 @@ + SLIST_FREE(&prclist, next, pinfo_free); + (void)kvm_close(kd); + +- return 0; +- ++ return retval; + } + + /* diff --git a/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild b/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild index 8b2d8143c3d4..784042fad8e8 100644 --- a/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild +++ b/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild,v 1.1 2006/09/10 12:45:32 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild,v 1.2 2006/09/10 19:15:17 uberlord Exp $ -inherit base bsdmk +inherit base bsdmk eutils MY_P="${PN/-bsd/}-${PV}" @@ -20,6 +20,13 @@ RDEPEND="!sys-process/psmisc" S="${WORKDIR}/${PN/-bsd/}" +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/fuser-return.patch" +} + src_install() { into / dosbin fuser |