* [PATCH] common/rc: print out kernel version too
@ 2019-07-10 17:58 Mauricio Faria de Oliveira
2019-07-10 19:03 ` Gabriel Krisman Bertazi
0 siblings, 1 reply; 3+ messages in thread
From: Mauricio Faria de Oliveira @ 2019-07-10 17:58 UTC (permalink / raw)
To: fstests
The kernel version (uname -v) may also be needed in addition to
the kernel release (uname -r) in order to properly identify and
distinguish different kernel builds in some cases/distributions.
For example, in the Ubuntu kernel package the test/debug string
is usually a suffix to the version field, not the release field.
$ uname -rv
4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019
$ uname -rv
4.15.0-51-generic #55+test20190520b1 SMP Mon May 20 11:57:40 -03 2019
Looking at other OSes uname(1) man pages it looks like '-v' is
quite standard, and the Linux man page only cites '-p' and '-i'
as non-portable, so the change should be OK. The only caller is
the 'check' script for the header print out, so it's contained.
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
---
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index dcd591b33b87..000a7cc821cf 100644
--- a/common/rc
+++ b/common/rc
@@ -2794,7 +2794,7 @@ _full_platform_details()
{
local os=`uname -s`
local host=`hostname -s`
- local kernel=`uname -r`
+ local kernel=`uname -rv`
local platform=`uname -m`
echo "$os/$platform $host $kernel"
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] common/rc: print out kernel version too
2019-07-10 17:58 [PATCH] common/rc: print out kernel version too Mauricio Faria de Oliveira
@ 2019-07-10 19:03 ` Gabriel Krisman Bertazi
2019-07-10 19:16 ` Mauricio Faria de Oliveira
0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Krisman Bertazi @ 2019-07-10 19:03 UTC (permalink / raw)
To: Mauricio Faria de Oliveira; +Cc: fstests
Mauricio Faria de Oliveira <mfo@canonical.com> writes:
> The kernel version (uname -v) may also be needed in addition to
> the kernel release (uname -r) in order to properly identify and
> distinguish different kernel builds in some cases/distributions.
>
> For example, in the Ubuntu kernel package the test/debug string
> is usually a suffix to the version field, not the release field.
>
> $ uname -rv
> 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019
>
> $ uname -rv
> 4.15.0-51-generic #55+test20190520b1 SMP Mon May 20 11:57:40 -03 2019
>
> Looking at other OSes uname(1) man pages it looks like '-v' is
> quite standard, and the Linux man page only cites '-p' and '-i'
> as non-portable, so the change should be OK. The only caller is
> the 'check' script for the header print out, so it's contained.
>
I'm just considering that -v also prints more clutter like the kernel
build date. Do you need it? It seems off for the PLATFORM line,
which has stuff not kernel related. Can you trim the output a
bit to remove it?
Anyway,
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
--
Gabriel Krisman Bertazi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] common/rc: print out kernel version too
2019-07-10 19:03 ` Gabriel Krisman Bertazi
@ 2019-07-10 19:16 ` Mauricio Faria de Oliveira
0 siblings, 0 replies; 3+ messages in thread
From: Mauricio Faria de Oliveira @ 2019-07-10 19:16 UTC (permalink / raw)
To: Gabriel Krisman Bertazi; +Cc: fstests
,
On Wed, Jul 10, 2019 at 4:04 PM Gabriel Krisman Bertazi
<krisman@collabora.com> wrote:
>
> Mauricio Faria de Oliveira <mfo@canonical.com> writes:
>
> > The kernel version (uname -v) may also be needed in addition to
> > the kernel release (uname -r) in order to properly identify and
> > distinguish different kernel builds in some cases/distributions.
> >
> > For example, in the Ubuntu kernel package the test/debug string
> > is usually a suffix to the version field, not the release field.
> >
> > $ uname -rv
> > 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019
> >
> > $ uname -rv
> > 4.15.0-51-generic #55+test20190520b1 SMP Mon May 20 11:57:40 -03 2019
> >
> > Looking at other OSes uname(1) man pages it looks like '-v' is
> > quite standard, and the Linux man page only cites '-p' and '-i'
> > as non-portable, so the change should be OK. The only caller is
> > the 'check' script for the header print out, so it's contained.
> >
>
> I'm just considering that -v also prints more clutter like the kernel
> build date. Do you need it? It seems off for the PLATFORM line,
> which has stuff not kernel related. Can you trim the output a
> bit to remove it?
>
It indeed prints out some clutter that's usually not required,
but it's hard to tell which parts of it may (not) be useful in general
for particular/different users, to consider trimming it,
so the complete string seemed to be the way go IMO.
> Anyway,
>
> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Thanks for reviewing.
>
> --
> Gabriel Krisman Bertazi
cheers,
--
Mauricio Faria de Oliveira
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-10 19:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-10 17:58 [PATCH] common/rc: print out kernel version too Mauricio Faria de Oliveira
2019-07-10 19:03 ` Gabriel Krisman Bertazi
2019-07-10 19:16 ` Mauricio Faria de Oliveira
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.