Page MenuHomeFreeBSD

compress(1): warn about link handling
ClosedPublic

Authored by fernape on Feb 9 2021, 9:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 8:39 PM
Unknown Object (File)
Mon, Oct 28, 10:41 AM
Unknown Object (File)
Oct 20 2024, 2:40 AM
Unknown Object (File)
Oct 20 2024, 2:40 AM
Unknown Object (File)
Oct 20 2024, 2:39 AM
Unknown Object (File)
Oct 20 2024, 2:19 AM
Unknown Object (File)
Oct 15 2024, 4:21 PM
Unknown Object (File)
Oct 4 2024, 3:04 PM
Subscribers

Details

Summary

compress(1) handles link badly and does not provide link-handling options.
Document this behavior.

PR: 84271
Submitted by: garys@opusnet.com

How to reproduce:

$ echo "AAAAAAAAAAAAAAAA" | tee file1 > file2                                                                                                                                                              

$ ls -latrh
total 16
drwxr-xr-x  100 fernape  fernape   4,0K  8 feb.  18:05 ../
-rw-r--r--    1 fernape  fernape    17B  8 feb.  18:09 file2
-rw-r--r--    1 fernape  fernape    17B  8 feb.  18:09 file1
drwxr-xr-x    2 fernape  fernape   512B  8 feb.  18:09 ./

$ ln -s file2 mylink

$ compress file1 mylink

$ ls -latrth
total 20
drwxr-xr-x  100 fernape  fernape   4,0K  8 feb.  18:05 ../
-rw-r--r--    1 fernape  fernape    11B  8 feb.  18:09 mylink.Z
-rw-r--r--    1 fernape  fernape    17B  8 feb.  18:09 file2
-rw-r--r--    1 fernape  fernape    11B  8 feb.  18:09 file1.Z
drwxr-xr-x    2 fernape  fernape   512B  8 feb.  18:09 ./
Test Plan
  • mandoc -Tlint clean
  • igor clean
  • aspell happy
  • man ./compress.1 renders the page properly

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

LGTM!

usr.bin/compress/compress.1
184

.Nm is enough, since compress.1 is the specified manpage. But that's only a nit.

This revision is now accepted and ready to land.Mar 3 2021, 7:45 PM
This revision was automatically updated to reflect the committed changes.

I committed the changes with your suggestion.

Thanks!