Commit Graph

10 Commits

Author SHA1 Message Date
Xin LI
216f72f141 Set errno to EFTYPE instead of EINVAL to be more consistent with the
rest of code.

MFC after:	1 month
2017-11-25 09:03:38 +00:00
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Xin LI
60e5655540 Correct buffer size.
Submitted by:	Sascha Wildner <swildner dragonflybsd org>
MFC after:	2 weeks
2014-06-26 00:31:58 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
Xin LI
f13a03d89e Sync RCS id with NetBSD, this was intentionally omitted from the advisory
in order to reduce patchset size.

MFC after:	3 days
2011-09-28 18:03:53 +00:00
Bjoern A. Zeeb
a06534c3c2 Fix handling of corrupt compress(1)ed data. [11:04]
Add missing length checks on unix socket addresses. [11:05]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-11:04.compress
Security:	CVE-2011-2895 [11:04]
Security:	FreeBSD-SA-11:05.unix
2011-09-28 08:47:17 +00:00
Xin LI
be07528c53 Diff reduction against NetBSD. The most notable change is to zdiff(1) to
handle more file formats including bzip2 and xz.

MFC after:	2 weeks
2011-05-23 09:02:44 +00:00
Benedict Reuschling
c4fadc2b78 Correct some typos in comments, no functional changes. 2010-10-16 15:24:04 +00:00
Xin LI
b47ed83de8 Sync with NetBSD:
- gzip -n does not store timestamp; [1]
 - Reduce diff against NetBSD by moving some casts in our local
   versions.

PR:		bin/134955
Obtained from:	NetBSD
MFC after:	1 month
2009-06-24 21:51:02 +00:00
Xin LI
9a9ea25f4a Replace the GNU gzip with a slightly modified NetBSD gzip. The
NetBSD version is a feature-to-feature re-implementation of GNU
gzip using the freely-redistributable zlib and this version is
expected to be mostly bug-to-bug compatible with the GNU
implementation.

 - Because this is a piece of mature code and we want to make
   changes so it is added directly rather than importing to
   src/contrib.
 - Connect newly added code to src/usr.bin/ and rescue/rescue
   build.
 - Disconnect the GNU gzip code from build for now, they will
   be eventually removed completely.
 - Provide two new src.conf(5) knobs, WITHOUT_BZIP2_SUPPORT and
   WITHOUT_BZIP2.

Tested by:	kris (full exp-7 pointyhat build)
Approved by:	core (importing a 4-clause BSD licensed file)
Approved by:	re (adding new utility during -HEAD code slush)
2007-01-26 10:19:08 +00:00