Page MenuHomeFreeBSD

compress(1): warn about link handling
ClosedPublic

Authored by fernape on Feb 9 2021, 9:23 AM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

LGTM!

usr.bin/compress/compress.1
183

.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!