aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/uname/uname.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-8/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-271-3/+0
| | | | | | | | 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
* Remove $FreeBSD$: two-line .c patternWarner Losh2023-08-161-3/+0
| | | | Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* uname: -v: strip final whitespace compatibly with uname(3)наб2022-02-181-2/+6
| | | | | | This restores POSIX.1 conformance PR: 260938
* Expose the kernel's build-ID through `uname -b`Ed Maste2019-06-271-4/+15
| | | | | | | | | | | | | | After r348611 the kernel's build-ID is available via sysctl. Add a -b flag to uname to report it. Submitted by: Ali Mashtizadeh <ali_mashtizadeh.com> Reviewed by: markj, imp Relnotes: Yes Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D20511 Notes: svn path=/head/; revision=349469
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | 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. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* Add -K (__FreeBSD_version of kernel) and -U (__FreeBSD_version of userland).Peter Wemm2013-10-151-4/+38
| | | | | | | | | Things like Makefile.inc1 resort to parsing /usr/include/osreldate.h with awk because this isn't easily available by other means. The separation of user and kernel versions is important for jail/chroot environments. Notes: svn path=/head/; revision=256557
* Add missing static keywords to uname(1)Ed Schouten2011-11-061-20/+21
| | | | Notes: svn path=/head/; revision=227191
* Add new -o option (r203042) to manpage synopsis and usage().Ed Maste2010-02-101-1/+1
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=203735
* Allow -o as a synonym for -s, for compatibility with other systems.Ed Maste2010-01-261-1/+2
| | | | | | | | | | Using -s is preferred, but some existing scripts and makefiles expect to get the system name from uname -o. Reviewed by: imp Notes: svn path=/head/; revision=203042
* Make the sysctlbyname stuff look like the 2-level MIB stuff. ThisJuli Mallett2003-07-011-0/+1
| | | | | | | | | | | means actually setting 'len', for example. Which will make uname -i work on some systems where it did not. Anywhere where it did work, it was a matter of coincidence. Submitted by: redpixel on EFnet. Notes: svn path=/head/; revision=117137
* Add sysctlbyname(3) support, and use that for uname -i, in preparation forJuli Mallett2003-06-091-1/+13
| | | | | | | | replacing the committed static OID version with a string-based OID_AUTO version. Notes: svn path=/head/; revision=116088
* Make kernel identification (`ident' in the config(8) driver) available toJuli Mallett2003-06-091-4/+14
| | | | | | | | | | | | userland, and the kernel. In the kernel by way of the 'ident[]' variable akin to all the other stuff generated by newvers.sh. In userland it is available to sysctl consumers via KERN_IDENT or 'kern.ident'. It is exported by uname(1) by the -i flag. Reviewed by: hackers@ Notes: svn path=/head/; revision=116085
* Use some macro evil to create the functions for using sysctl(3) to get eachJuli Mallett2002-09-231-83/+38
| | | | | | | | | | | variable natively. It should allow you to use any sysctl mib set, but due to limitations of what I can do with macros, right now it's limited to two, which is all this program used anyway. Sponsored by: Bright Path Solutions Notes: svn path=/head/; revision=103846
* Check to see if we should print a space, rather than using the annoyingJuli Mallett2002-09-231-12/+12
| | | | | | | | | prefix methodology. Adjust nearby style. Sponsored by: Bright Path Solutions Notes: svn path=/head/; revision=103837
* Mostly rewrite the flag handling of uname(1) to be overridable, such as:Juli Mallett2002-09-181-69/+161
| | | | | | | | | | | | freefall% uname -s FreeBSD freefall% env UNAME_s=Linnex ./uname -s Linnex MFC after: 1 month Notes: svn path=/head/; revision=103518
* ANSIify function definitions.David Malone2002-09-041-4/+2
| | | | | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5 Notes: svn path=/head/; revision=102944
* remove __PWarner Losh2002-03-221-1/+1
| | | | Notes: svn path=/head/; revision=92922
* 'uname -p' prints the value of hw.machine_arch instead of hw.machine.Yoshihiro Takahashi2002-01-141-5/+17
| | | | | | | | | Reviewed by: imp No response from: -arch MFC after: 3 weeks Notes: svn path=/head/; revision=89346
* WARNS=2 fixes, use __FBSDID().Mark Murray2001-12-111-5/+10
| | | | Notes: svn path=/head/; revision=87696
* Fixed printf format errors.Bruce Evans1998-07-061-5/+5
| | | | Notes: svn path=/head/; revision=37453
* Add a -p option which is the same as the -m option but providedSteve Price1998-02-241-1/+2
| | | | | | | | | for SVR4 compatibility. PR: 5826 Notes: svn path=/head/; revision=33792
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-1/+1
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Import some parts of CSRG 4.4BSD-Lite2 usr.bin sources to fix tree build.Peter Wemm1997-03-111-0/+163
Notes: svn path=/vendor/CSRG/dist/; revision=23690