FreeBSD Bugzilla – Attachment 229511 Details for
Bug 251316
freebsd-version: present -v option, to print verbose information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] freebsd-version: present -v option, to print verbose information (OSVERSION)
D27318.diff (text/plain), 1.13 KB, created by
VinÃcius Zavam
on 2021-11-15 12:29:53 UTC
(
hide
)
Description:
[PATCH] freebsd-version: present -v option, to print verbose information (OSVERSION)
Filename:
MIME Type:
Creator:
VinÃcius Zavam
Created:
2021-11-15 12:29:53 UTC
Size:
1.13 KB
patch
obsolete
>diff --git a/bin/freebsd-version/freebsd-version.sh.in b/bin/freebsd-version/freebsd-version.sh.in >--- a/bin/freebsd-version/freebsd-version.sh.in >+++ b/bin/freebsd-version/freebsd-version.sh.in >@@ -39,6 +39,7 @@ > KERNEL_RE='^@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$' > > progname=${0##*/} >+progverb=0 > > # > # Print an error message and exit. >@@ -74,6 +75,8 @@ > # Print the version of the currently running kernel. > # > running_version() { >+ [ $progverb -gt 0 ] && \ >+ echo `sysctl -n kern.osrelease kern.osreldate` || \ > sysctl -n kern.osrelease > } > >@@ -81,6 +84,8 @@ > # Print the hardcoded userland version. > # > userland_version() { >+ [ $progverb -gt 0 ] && \ >+ echo $USERLAND_VERSION `uname -U` || \ > echo $USERLAND_VERSION > } > >@@ -88,7 +93,7 @@ > # Print a usage string and exit. > # > usage() { >- echo "usage: $progname [-kru]" >&2 >+ echo "usage: $progname [-kruv]" >&2 > exit 1 > } > >@@ -97,7 +102,7 @@ > # > main() { > # parse command-line arguments >- while getopts "kru" option ; do >+ while getopts "kruv" option ; do > case $option in > k) > opt_k=1 >@@ -108,6 +113,9 @@ > u) > opt_u=1 > ;; >+ v) >+ progverb=1 >+ ;; > *) > usage > ;; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251316
:
219890
|
229511
|
229512
|
229515
|
235834