Bug 251316

Summary: [PATCH] freebsd-version: present -v option, to print verbose information
Product: Base System Reporter: Vinícius Zavam <egypcio>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People Keywords: patch
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D27318
Attachments:
Description Flags
[PATCH] freebsd-version: present -v option, to print verbose information
none
[PATCH] freebsd-version: present -v option, to print verbose information (OSVERSION)
none
[PATCH] freebsd-version: present -v option, to print verbose information
none
[PATCH] freebsd-version: present -v option, to print verbose information none

Description Vinícius Zavam freebsd_committer 2020-11-22 16:59:44 UTC
Created attachment 219890 [details]
[PATCH] freebsd-version: present -v option, to print verbose information

by applying this patch, we would be able to extend freebsd-version's features to:

  * print verbose information of the base system (using existing userland_version() function);
  * print verbose information of the kernel (using existing running_version() function);

we kept kernel_version() as is - it uses the bootfile, which may not be present if one is running any FreeBSD jail.
-----


  * default output, kept as is

# freebsd-version
13.0-CURRENT

  * output using verbose information

# freebsd-version -v
13.0-CURRENT 1300126

  * output using verbose information (running_version, for its kernel)

# freebsd-version -rv
13.0-CURRENT 1300126

  * userland and running_version, kept as is

# freebsd-version -ru
13.0-CURRENT
13.0-CURRENT

  * userland and running_version with all verbose information

# freebsd-version -ruv
13.0-CURRENT 1300126
13.0-CURRENT 1300126
Comment 1 Vinícius Zavam freebsd_committer 2021-01-25 15:14:09 UTC
ping?
Comment 3 Vinícius Zavam freebsd_committer 2021-11-15 12:29:53 UTC
Created attachment 229511 [details]
[PATCH] freebsd-version: present -v option, to print verbose information (OSVERSION)

ping?

sync from latest patch published on https://reviews.freebsd.org/D27318
Comment 4 Vinícius Zavam freebsd_committer 2021-11-15 13:03:28 UTC
Created attachment 229512 [details]
[PATCH] freebsd-version: present -v option, to print verbose information

% rebase freebsd/main origin/D27318
Comment 5 Vinícius Zavam freebsd_committer 2021-11-15 15:03:12 UTC
Created attachment 229515 [details]
[PATCH] freebsd-version: present -v option, to print verbose information