Date: Tue, 16 Dec 2008 16:00:09 GMT From: Jaakko Heinonen <jh@saunalahti.fi> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/129620: Incorrect bzip2 behavior Message-ID: <200812161600.mBGG09q1088559@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/129620; it has been noted by GNATS. From: Jaakko Heinonen <jh@saunalahti.fi> To: Alex Keda <admin@lissyara.su> Cc: bug-followup@FreeBSD.org Subject: Re: bin/129620: Incorrect bzip2 behavior Date: Tue, 16 Dec 2008 17:59:13 +0200 On 2008-12-13, Alex Keda wrote: > acer# bzip2 --best --keep vmcore.9 > bzip2: Input file vmcore.9 has 1 other link. > acer# bzip2 --best --keep --force vmcore.9 > acer# ll | grep core > -rw------- 2 root wheel 206M 13 дек 22:41 vmcore.9 > -rw------- 1 root wheel 15M 13 дек 22:41 vmcore.9.bz2 > acer# > ================ > I use '--keep' option. I think, not need check num links in this situation... This patch should do it: %%% Index: contrib/bzip2/bzip2.c =================================================================== --- contrib/bzip2/bzip2.c (revision 186035) +++ contrib/bzip2/bzip2.c (working copy) @@ -1208,7 +1208,7 @@ void compress ( Char *name ) return; } } - if ( srcMode == SM_F2F && !forceOverwrite && + if ( srcMode == SM_F2F && !forceOverwrite && !keepInputFiles && (n=countHardLinks ( inName )) > 0) { fprintf ( stderr, "%s: Input file %s has %d other link%s.\n", progName, inName, n, n > 1 ? "s" : "" ); %%% Could you report this to bzip2 upstream? Looks like this behavior exists in the latest upstream version. -- Jaakko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812161600.mBGG09q1088559>