aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Partially revert r367756 (chpass(1) synopsis changes)Mateusz Piotrowski2020-11-171-1/+7
| | | | | | | | | | | | | | | | | Let's have two entries in the synopsis: - chpass now lists options which can be used for non-NIS-specific functionalities. - ypchpass additionally lists the NIS-specific flags. Technically, it is an artificial distinction, as chpass and ypchpass behave identically. Nevertheless, it might help navigating the synopsis section. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27251 Notes: svn path=/head/; revision=367769
* Add an example for the -s flagMateusz Piotrowski2020-11-171-0/+6
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=367759
* Improve readability of the lists of optionsMateusz Piotrowski2020-11-171-20/+20
| | | | | | | | | | | - Sort options alphabetically - Add missing arguments (e.g., "list" to -a) - Adjust the width of Bl MFC after: 1 week Notes: svn path=/head/; revision=367757
* Clean up the synopsis section & fix mandoc warningsMateusz Piotrowski2020-11-171-12/+6
| | | | | | | | | | | The synopsis section had two very similar entries. The flags documented by the first one were a strict subset of the second one. Let's just keep only the second entry for simplicity. MFC after: 1 week Notes: svn path=/head/; revision=367756
* bsdiff: fix off-by-one errorMitchell Horne2020-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The program reads oldsize bytes from oldfile, and proceeds to initialize a suffix array of oldsize elements using divsufsort(). As per the function's API [1], array indices 0 through n-1 are initialized. Later, search() is called, but with index bounds [0, n]. Depending on the contents of the malloc'd buffer, accessing this uninitialized index at the end of can result in a segmentation fault. Fix this by passing oldsize-1 to search(), limiting the search bounds to [0, n-1]. This bug is a result of r303285, which introduced divsufsort() as an alternate suffix sorting function to the existing qsufsort(). It seems that qsufsort() did initialize the final empty element, meaning it could be safely accessed. This difference in the implementations was missed at the time. [1] https://github.com/y-256/libdivsufsort Discussed with: cperciva MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26911 Notes: svn path=/head/; revision=367734
* Change the default locale to C.UTF-8Baptiste Daroussin2020-11-141-2/+3
| | | | | | | | | | | | | The C.UTF-8 locales is the same as the actual C locale except it does support the unicode character set. But the collation etc are still the same as the C locale one. Reviewed by: many Approved by: many Differential Revision: https://reviews.freebsd.org/D26973 Notes: svn path=/head/; revision=367690
* Explicitly note in the EXAMPLES section that uname(3) contains more detailsMateusz Piotrowski2020-11-131-1/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=367640
* Document in the synopsis that -0 cannot be used with the utility argumentMateusz Piotrowski2020-11-111-2/+7
| | | | Notes: svn path=/head/; revision=367592
* vmstat: drop the HighUse field from malloc dumpMateusz Guzik2020-11-091-5/+4
| | | | | | | | | | It is hardwired to "-" since its introduction in 2005. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D27141 Notes: svn path=/head/; revision=367534
* vmstat: remove spurious newlines when reporting zonesMateusz Guzik2020-11-091-2/+1
| | | | Notes: svn path=/head/; revision=367501
* Add collation version support to querylocale(3).Thomas Munro2020-11-085-6/+36
| | | | | | | | | | | | | | | | | | | | | | | Provide a way to ask for an opaque version string for a locale_t, so that potential changes in sort order can be detected. Similar to ICU's ucol_getVersion() and Windows' GetNLSVersionEx(), this API is intended to allow databases to detect when text order-based indexes might need to be rebuilt. The CLDR version is extracted from CLDR source data by the Makefile under tools/tools/locale, written into the machine-generated Makefile under shared/colldef, passed to localedef -V, and then written into LC_COLLATE file headers. The initial version is 34.0. tools/tools/locale was recently updated to pull down 35.0, but the output hasn't been committed under share/colldef yet, so that will provide the first observable change when it happens. Other versioning schemes are possible in future, because the format is unspecified. Reviewed by: bapt, 0mp, kib, yuripv (albeit a long time ago) Differential Revision: https://reviews.freebsd.org/D17166 Notes: svn path=/head/; revision=367476
* Update to bmake-20201101Simon J. Gerraty2020-11-074-39/+123
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of new unit-tests increase code coverage. Lots of refactoring, cleanup and simlpification to reduce code size. Fixes for Bug 223564 and 245807 Updates to dirdeps.mk and meta2deps.py Notes: svn path=/head/; revision=367465
* | Restrict locale settings to the file they occur inStefan Eßer2020-11-054-32/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents LANG= in an included file from affecting the interpretation of month and day names in the including file. Make the internal pre-processor accept white space between the "#" at the start of the line and the keyword for better compatibility with cpp. Add support for the cpp keywords #warning and #error. MFC after: 3 days Notes: svn path=/head/; revision=367364
* | Add regression tests for conditions and commentsStefan Eßer2020-11-0414-54/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix one case where #else was not corerctly processed and simplify the conditions logic. Fix parsing of day and month names in the locale specified in the calendar file. The previous version would expect those names to match the locale of the user. Mention that comments are now correctly processed and that // is supported in addition to /* ... */. MFC after: 3 days Notes: svn path=/head/; revision=367350
* | Update man-page to document changes made to the calendar program.Stefan Eßer2020-11-031-6/+14
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367308
* | Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filtDimitry Andric2020-11-033-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since elftoolchain's cxxfilt is rather far behind on features, and we ran into several bugs, add an option to use llvm-cxxfilt as an drop-in replacement. It supports the same options as elftoolchain cxxfilt, though it doesn't have support for old ARM (C++ Annotated Reference Manual, not the CPU) and GNU v2 manglings. But these are irrelevant in 2020. Note: as we already compile the required libraries as part of libllvm, this will not add any significant build time either. PR: 250702 Reviewed by: emaste, yuri Differential Revision: https://reviews.freebsd.org/D27071 MFC after: 2 weeks Notes: svn path=/head/; revision=367304
* | Consistently print calendar dates in the locale of the userStefan Eßer2020-11-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calendar files that specify LANG=... to specify their character encoding did also set the date format defined for that locale, resulting in output like: Nov 4 Gabriel Faure dies from pneumonia in Paris, France, 1924 4 nov. N'oubliez pas les Charles ! After this commit the output is always printed in a consistent format according to the user's current locale, e.g.: Nov 4 Gabriel Faure dies from pneumonia in Paris, France, 1924 Nov 4 N'oubliez pas les Charles ! I'll open a review asking for opinions whether this format change should be merged to -STABLE. Relnotes: yes Notes: svn path=/head/; revision=367293
* | Check that #ifdef, #ifndef, and #undef are used with a single nameStefan Eßer2020-11-031-13/+38
| | | | | | | | | | | | | | | | | | | | This restores the parameter validation that has been peformed by cpp for defining and testing of names used in conditions. MFC after: 3 days Notes: svn path=/head/; revision=367292
* | malloc: export kernel zones instead of relying on them being power-of-2Mateusz Guzik2020-11-021-4/+6
| | | | | | | | | | | | | | | | Reviewed by: markj (previous version) Differential Revision: https://reviews.freebsd.org/D27026 Notes: svn path=/head/; revision=367274
* | Fix psoition reporting for calendar data file in system directoryStefan Eßer2020-11-011-2/+14
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367255
* | [iscsictl] Fix compile issues that creep up with gcc-6.4Adrian Chadd2020-11-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two warnings: * double-definition of a symbol in a yacc header * Comparison of an unsigned int being >= 0; that's always going to be true. Reviewed by: imp, rscheff Differential Revision: https://reviews.freebsd.org/D27036 Notes: svn path=/head/; revision=367248
* | readelf: Add -z decompression supportEd Maste2020-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compatible with GNU readelf, -z decompresses sections displayed by -x or -p. ELF Tool Chain ticket #555 https://sourceforge.net/p/elftoolchain/tickets/555/ Submitted by: Tiger Gao <tig@FreeBSDFoundation.org> Reviewed by: markj MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26909 Notes: svn path=/head/; revision=367209
* | Improve calendar file parsing and consistency testsStefan Eßer2020-10-311-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add line number information to more warning and error messages. Detect #else and #endif without corresponing #ifdef/#ifndef as error. Detect missing #endif at end of file and print warning but continue. Support for #undef has been added to reverse the effect of a prior #define. It is no error if the argument value has not been defined before. These changes may cause error aborts on malformed input files (e.g. with spurious #else or #endif), but no such errors exist in the calendar files in the FreeBSD base system and the calendar-data port and all tests pass. More tests will be added in a follow-up commit to detect regressions that might affect the newly added features. This commit ends a series of updates that enhance the pre-processor and make it behave much more like prior versions of the calendar progarm that called cpp to pre-process the data files. MFC after: 3 days Relnotes: yes Notes: svn path=/head/; revision=367207
* | Add file names and line numbers to debug messagesStefan Eßer2020-10-311-2/+4
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367204
* | Add file names and line numbers to calendar format error messagesStefan Eßer2020-10-312-13/+37
| | | | | | | | | | | | | | | | | | | | Without file name and line number it is very cumbersum to identify the locations of errors in calendar files. MFC after: 3 days Notes: svn path=/head/; revision=367203
* | Print calendar entries in the order they occurStefan Eßer2020-10-302-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The calendar program used to output entries in reverse order, due to the way an internal linked list was built up. A regression test with 2 entries for the same day has been adapted to the now non-reversed order. MFC after: 3 days Notes: svn path=/head/; revision=367173
* | Revert debug output committed in r367166 by accidentStefan Eßer2020-10-301-6/+2
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367167
* | Fix length calculation in memmoveStefan Eßer2020-10-302-3/+10
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=367166
* | Re-implement comment parsing missing in the internal pre-processorStefan Eßer2020-10-301-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal pre-processor ignored lines that did not parse a calendar entries, but did not support multi-line comments in the way the external cpp did. The calendar files distributed with the base system (now in a port) do use comments, though. Implement comment processing for single-line (//) and multi-line comments (/* */) with same semantics as in a standard C pre-processor. All tests pass with this version, but there are no tests that specifically verify comment processing. Reported by: jhs@berklix.com (Julian H. Stacey) MFC after: 3 days Notes: svn path=/head/; revision=367161
* | fetch(1): Fix styleFernando Apesteguía2020-10-301-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix style problems introduced in r367141: * s/Ql/Pa/ for file names * Break line properly in macro * Properly generate back slash character Not bumping .Dd Reported by: xtouqh@icloud.com, steffen@sdaoden.eu Approved by: 0mp@ Differential Revision: https://reviews.freebsd.org/D26946 Notes: svn path=/head/; revision=367160
* | fold(1): Add EXAMPLES sectionFernando Apesteguía2020-10-291-1/+17
| | | | | | | | | | | | | | | | | | | | A couple of examples covering -s and -w flags. Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26948 Notes: svn path=/head/; revision=367143
* | fmt(1): Add EXAMPLES sectionFernando Apesteguía2020-10-291-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | Very small EXAMPLES section. While here, remove reference to nroff(1). Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26947 Notes: svn path=/head/; revision=367142
* | fetch(1): Add EXAMPLES sectionFernando Apesteguía2020-10-291-1/+46
| | | | | | | | | | | | | | | | | | | | Add a few examples covering flags: 1, R, a, o, q, r, s, v Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26946 Notes: svn path=/head/; revision=367141
* | Update the due date of the quarterly status reportLi-Wen Hsu2020-10-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | While here, move the date to keep 2 weeks ahead notificaion and fix the part of speech. Reviewed by: debdrup Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26998 Notes: svn path=/head/; revision=367131
* | Simplify test for closing delimiter of #include argument (no functionalStefan Eßer2020-10-292-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | change). While here: Fix invalid parameters of a commented-out debug printf() found when testing with this code enabled. MFC after: 3 days Notes: svn path=/head/; revision=367127
* | Fix calendar -a processing of files included in the user's home directoryStefan Eßer2020-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code performed a chdir() into the home directory, but the parser fell back to using the invoking user's home directory as the base directory for the search for an include file. Since use of the -a option is limited to UID==0, the directory searched was typically ~root/.calendar, not the .calendar directory of the user whose file is being processed. PR: 205580 Reported by: greg.bal4@gmail.com (Greg Balfour) MFC after: 3 days Notes: svn path=/head/; revision=367126
* | Update the list of searched manual sections after r367013Mateusz Piotrowski2020-10-281-2/+2
| | | | | | | | Notes: svn path=/head/; revision=367110
* | Add support for nested conditionalsStefan Eßer2020-10-282-40/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous behavior was to support nested #ifdef and #ifndef, but to return to unconditional parsing after the next #endif, independently of the number of previously parsed conditions. E.g. after "#ifdef A / #ifdef B / #endif" the following lines were unconditially parsed again, independently of A and/or B being defined. The new behavior is to count the level of false conditions and to only restart parsing of calendar entries when the corresponding number of #endif tokens have been seen. In addition to the above, an #else directive has been added, to toggle between parsing and ignoring of the following lines. No validation of the correct use of the condition directives is made. #endif without prior #define or #ifndef is ignored and #else toggles between parsing and skipping of entries. The MFC period has been set to 1 month to allow for a review of the changes and for a discussion, whether these modifications should not be merged at all. No correct input file is parsed differently than before, but if calendar data files are published that use these new features, those data files will not parse correctly on prior versions of this program. MFC after: 1 month Notes: svn path=/head/; revision=367108
* | Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-287-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* | Fix off-by-one error in processing of #ifdef linesStefan Eßer2020-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The convention in this program is to parse the line immediately starting after the token (e.g. #defineA and #ifdefA define respectively look-up "A"), and this commit restores this behavior instead of skipping an assumed white-space character following #ifdef. Reported by: kevans MFC after: 3 days Notes: svn path=/head/; revision=367104
* | Fix parsing of #ifdef in calendar filesStefan Eßer2020-10-282-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was code to process an #ifndef tokens, but none for #ifdef. The #ifdef token was mentioned as unsupported in the BUGS section, but no reason was given and I do not see why it should stay omitted. Misleading information in The BUGS section of the man-page regarding the maximum number of #define and #include statements supported has been removed. These limits might have applied to a prior version of this program, but do not seem to apply to the current implementation. I have not tried to test for the existence of the limits, but the include file processing just recursively calls the parser (without counting the recursion depth) and the stringlist functions do not impose a limit on the number of entries. Reported by: jhs@berklix.com MFC after: 3 days Notes: svn path=/head/; revision=367103
* | Correct USB HID item in examplesMateusz Piotrowski2020-10-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | It turns out that examples were incorrectly referring to Volume_Up and Volume_Down, which are not defined at all. PR: 250683 Reported by: corvid%openmailbox.org MFC after: 2 weeks Notes: svn path=/head/; revision=367097
* | renice(8): Clarify "who" parameters.Fernando Apesteguía2020-10-271-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a question raised in freebsd-questions@ mail list[1] about the "who" parameters in this man page. It seems OpenBSD[2] amd NetBSD[3] both have more legible descriptions so I borrowed some of their ideas to try and make this page clearer. [1] https://lists.freebsd.org/pipermail/freebsd-questions/2020-October/291914.html [2] https://man.bsd.lv/renice [3] https://man.netbsd.org/renice.8 Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26950 Notes: svn path=/head/; revision=367077
* | diff: don't force the format to 'context' with -p immediatelyKyle Evans2020-10-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, leave the fomat as unspecified (if it hasn't been) and use the -p flag as a hint to 'context' if no other formatting option is specified. This fixes `diff -purw`, used frequently by emaste, and matches the behavior of its GNU counterpart. PR: 250015 Reviewed by: emaste MFC after: 1 week Notes: svn path=/head/; revision=367076
* | Replace literal uses of /usr/local in C sources with _PATH_LOCALBASEStefan Eßer2020-10-272-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Literal references to /usr/local exist in a large number of files in the FreeBSD base system. Many are in contributed software, in configuration files, or in the documentation, but 19 uses have been identified in C source files or headers outside the contrib and sys/contrib directories. This commit makes it possible to set _PATH_LOCALBASE in paths.h to use a different prefix for locally installed software. In order to avoid changes to openssh source files, LOCALBASE is passed to the build via Makefiles under src/secure. While _PATH_LOCALBASE could have been used here, there is precedent in the construction of the path used to a xauth program which depends on the LOCALBASE value passed on the compiler command line to select a non-default directory. This could be changed in a later commit to make the openssh build consistently use _PATH_LOCALBASE. It is considered out-of-scope for this commit. Reviewed by: imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D26942 Notes: svn path=/head/; revision=367075
* | Clean up backlight.8Mateusz Piotrowski2020-10-271-16/+13
| | | | | | | | | | | | | | | | | | | | | | - Sort flags - Stylize incr|+ and decr|- properly - Add a missing period at the end of the description - Use the standard layout for the EXAMPLES section (remove the list macro and add indentation to the code block) Notes: svn path=/head/; revision=367073
* | Correct calendar entry for myselfScott Long2020-10-261-1/+1
| | | | | | | | Notes: svn path=/head/; revision=367053
* | calendar: remove all datafiles except freebsd oneWarner Losh2020-10-2667-6809/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Move all the data files for the calendar(1) program, except calendar.freebsd to the calendar-data package. When a file can't be found, and /usr/local/share/calendar doesn't exist provide a helpful hint to install this package. Reviewed by: se@ Differential Revision: https://reviews.freebsd.org/D26926 Notes: svn path=/head/; revision=367051
* | calendar.1: Fix locale of the month in Dd ;)Mateusz Piotrowski2020-10-251-1/+1
| | | | | | | | Notes: svn path=/head/; revision=367040
* | sockstat: Fix error message when jail_attach failsRyan Moeller2020-10-241-1/+1
| | | | | | | | | | | | | | jail_errmsg is for libjail, jail_attach() is a system call. Notes: svn path=/head/; revision=367025