History log of /freebsd-current/usr.sbin/config/mkoptions.cc
Revision Date Author Comments
# 4d65a7c6 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 8a7b6120 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.sbin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# eba230af 25-Sep-2023 John Baldwin <jhb@FreeBSD.org>

Purge more stray embedded $FreeBSD$ strings

These do not use __FBSDID but instead use bare char arrays.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41957


# c04ad15c 16-Feb-2023 Kyle Evans <kevans@FreeBSD.org>

config: address a number of Coverity issues

Highlights:
- Various memory leaks
- FILE* leaks
- `tsize` in moveifchanged() is only needed if !changed, and `from_sb`
is only valid if !changed.
- Simplify trivially true expression
- Sanity check elfdump size output (+ fix variable sizes) (des@)

CID: 1471167, 1006391, 1505333, 1505275, 1505349, 1505306, 1505232
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D38643


# f518229d 16-Feb-2023 Kyle Evans <kevans@FreeBSD.org>

config: fix some common issues with path() usage

None of the callers check that the allocation in path() failed, so let's
check in path() and abort instead of failing.

Along those lines, none of the callers seem to acknowledge that the
returned string needs to be free()d -- let's do that as well. There are
a couple not addressed in this commit that will be addressed in a future
commit by pushing the path() call down into moveifchanged() instead and
freeing it properly there.

CID: 1505271, 1505250, 1505279
Reviewed by: emaste, imp


# 83d7ed8a 08-Feb-2023 Kyle Evans <kevans@FreeBSD.org>

config: drop dependency on libsbuf

Use an std::stringstream instead. get_word() and get_quoted_word() both
return a buffer that's presumed to not need release, so solve this by
returning a new special configword type that holds a string or eof/eol
state. This cleans up caller checking for EOF/EOL to make it more
explicit what they're doing, at least in the EOL cases which previously
checked for NULL.

Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D38276