kexec: Add prefix "kexec" to output message
Subsystems (3)
PATCH 1/1 kexec: Add prefix "kexec" to output message
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. To keep the same format, add the prefix "kexec" to output message.
Following is the format of output message now.
[ 140.290795] SYSC_kexec_load: hello, world
Ideally, the format of output message likes below.
[ 140.291534] kexec: sanity_check_segment_list: hello, world
--- kernel/kexec.c | 2 ++ kernel/kexec_file.c | 2 ++ 2 files changed, 4 insertions(+)
kernel/kexec.c +2 -0
@@ -6,6 +6,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h>
kernel/kexec_file.c +2 -0
@@ -9,6 +9,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h>
Signature · 1 line
2.4.0
Quoted 3 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. To keep the same format, add the prefix "kexec" to output message.
What of kexec_core? What of the messages that already have a prefix?
Eric
Quoted 38 lines
Following is the format of output message now.
[ 140.290795] SYSC_kexec_load: hello, worldIdeally, the format of output message likes below.
[ 140.291534] kexec: sanity_check_segment_list: hello, worldSigned-off-by Minfei Huang <[email protected]>--- kernel/kexec.c | 2 ++ kernel/kexec_file.c | 2 ++ 2 files changed, 4 insertions(+)kernel/kexec.c +2
-0@@ -6,6 +6,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h> kernel/kexec_file.c +2
-0@@ -9,6 +9,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h>
Quoted 8 lines · Eric W. Biederman
Quoted 3 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. To keep the same format, add the prefix "kexec" to output message.
What of
kexec_core? What of the messages that already have a prefix?
Hi, Eric.
Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous kernel/kexec.c into three pieces(kexec_core.c, kexec_file.c, kexec.c). The common functions used by both kexec and kexec_file are placed in file kernel/kexec_core.c.
The format of the output message likes "kexec: SYSC_kexec_load: hello, world" previously. Due to the missing prefix "kexec", now it like "SYSC_kexec_load: hello, world".
Dave Young misses the Macro pr_fmt to define the prefix output message in file kexec.c and kexec_file.c. I think the previous Macro was moved into the file kexec_core.c when Dave did the splitting.
Thanks
Minfei
Quoted 38 lines
Quoted 38 lines
Following is the format of output message now.
[ 140.290795] SYSC_kexec_load: hello, worldIdeally, the format of output message likes below.
[ 140.291534] kexec: sanity_check_segment_list: hello, worldSigned-off-by Minfei Huang <[email protected]>--- kernel/kexec.c | 2 ++ kernel/kexec_file.c | 2 ++ 2 files changed, 4 insertions(+)kernel/kexec.c +2
-0@@ -6,6 +6,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h> kernel/kexec_file.c +2
-0@@ -9,6 +9,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h>
Quoted 17 lines · Minfei Huang
Quoted 8 lines · Eric W. Biederman
Quoted 3 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. To keep the same format, add the prefix "kexec" to output message.
What of
kexec_core? What of the messages that already have a prefix?Hi, Eric.
Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
kernel/kexec.cinto threepieces(kexec_core.c, kexec_file.c, kexec.c). The common functions used by both kexec andkexec_fileare placed in filekernel/kexec_core.c.
Quoted 7 lines
The format of the output message likes "kexec:
SYSC_kexec_load: hello, world" previously. Due to the missing prefix "kexec", now it like "SYSC_kexec_load: hello, world".Dave Young misses the Macro
pr_fmtto define the prefix output message in filekexec.candkexec_file.c. I think the previous Macro was moved into the filekexec_core.cwhen Dave did the splitting.
I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so only keep it in kexec_core.c.
There's already printks with prefix like "Kexec:", "crashkernel:" and other strings. Adding another prefix before them looks odd. So either remove the prefix in kexec_core, or remove other prefixes already exists in kexec*.c I would prefix to remove the "kexec:" prefix in kexec_core.c
Quoted 42 lines
Thanks
MinfeiQuoted 38 lines
Quoted 38 lines
Following is the format of output message now.
[ 140.290795] SYSC_kexec_load: hello, worldIdeally, the format of output message likes below.
[ 140.291534] kexec: sanity_check_segment_list: hello, worldSigned-off-by Minfei Huang <[email protected]>--- kernel/kexec.c | 2 ++ kernel/kexec_file.c | 2 ++ 2 files changed, 4 insertions(+)kernel/kexec.c +2
-0@@ -6,6 +6,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h> kernel/kexec_file.c +2
-0@@ -9,6 +9,8 @@* Version 2. See the file COPYING for more details. */ +#define pr_fmt (fmt) "kexec: " fmt +#include <linux/capability.h> #include <linux/mm.h> #include <linux/file.h>
Quoted 26 lines · Dave Young
Quoted 17 lines · Minfei Huang
Quoted 8 lines · Eric W. Biederman
Quoted 3 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. To keep the same format, add the prefix "kexec" to output message.
What of
kexec_core? What of the messages that already have a prefix?Hi, Eric.
Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
kernel/kexec.cinto threepieces(kexec_core.c, kexec_file.c, kexec.c). The common functions used by both kexec andkexec_fileare placed in filekernel/kexec_core.c.Quoted 7 lines
The format of the output message likes "kexec:
SYSC_kexec_load: hello, world" previously. Due to the missing prefix "kexec", now it like "SYSC_kexec_load: hello, world".Dave Young misses the Macro
pr_fmtto define the prefix output message in filekexec.candkexec_file.c. I think the previous Macro was moved into the filekexec_core.cwhen Dave did the splitting.
Quoted 7 lines
I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so only keep it in
kexec_core.c.There's already printks with prefix like "Kexec:", "crashkernel:" and other strings. Adding another prefix before them looks odd. So either remove the prefix in
kexec_core, or remove other prefixes already exists in kexec*.c I would prefix to remove the "kexec:" prefix inkexec_core.c
Hi, Dave.
How about removing all of the prefix "crashkernel" in kexec_core. Thus we can be consistent with the output message prefix "kexec".
Thanks
Minfei
Quoted 35 lines · Minfei Huang
Quoted 26 lines · Dave Young
Quoted 17 lines · Minfei Huang
Quoted 8 lines · Eric W. Biederman
Quoted 3 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. To keep the same format, add the prefix "kexec" to output message.
What of
kexec_core? What of the messages that already have a prefix?Hi, Eric.
Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
kernel/kexec.cinto threepieces(kexec_core.c, kexec_file.c, kexec.c). The common functions used by both kexec andkexec_fileare placed in filekernel/kexec_core.c.Quoted 7 lines
The format of the output message likes "kexec:
SYSC_kexec_load: hello, world" previously. Due to the missing prefix "kexec", now it like "SYSC_kexec_load: hello, world".Dave Young misses the Macro
pr_fmtto define the prefix output message in filekexec.candkexec_file.c. I think the previous Macro was moved into the filekexec_core.cwhen Dave did the splitting.Quoted 7 lines
I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so only keep it in
kexec_core.c.There's already printks with prefix like "Kexec:", "crashkernel:" and other strings. Adding another prefix before them looks odd. So either remove the prefix in
kexec_core, or remove other prefixes already exists in kexec*.c I would prefix to remove the "kexec:" prefix inkexec_core.c
Quoted 4 lines
Hi, Dave.
How about removing all of the prefix "crashkernel" in
kexec_core. Thus we can be consistent with the output message prefix "kexec".
Ping, any comment is appreciate and helpful.
Thanks
Minfei
Quoted 36 lines · Minfei Huang
Quoted 35 lines · Minfei Huang
Quoted 33 lines · Dave Young
Quoted 17 lines · Minfei Huang
Quoted 8 lines · Eric W. Biederman
Quoted 3 lines · Minfei Huang
kexec output message misses the prefix "kexec", when Dave Young split the kexec code. To keep the same format, add the prefix "kexec" to output message.
What of
kexec_core? What of the messages that already have a prefix?Hi, Eric.
Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
kernel/kexec.cinto threepieces(kexec_core.c, kexec_file.c, kexec.c). The common functions used by both kexec andkexec_fileare placed in filekernel/kexec_core.c.Quoted 7 lines
The format of the output message likes "kexec:
SYSC_kexec_load: hello, world" previously. Due to the missing prefix "kexec", now it like "SYSC_kexec_load: hello, world".Dave Young misses the Macro
pr_fmtto define the prefix output message in filekexec.candkexec_file.c. I think the previous Macro was moved into the filekexec_core.cwhen Dave did the splitting.I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so only keep it in
kexec_core.c.There's already printks with prefix like "Kexec:", "crashkernel:" and other strings. Adding another prefix before them looks odd. So either remove the prefix in
kexec_core, or remove other prefixes already exists in kexec*.c I would prefix to remove the "kexec:" prefix inkexec_core.c
Quoted 6 lines
Quoted 4 lines
Hi, Dave.
How about removing all of the prefix "crashkernel" in
kexec_core. Thus we can be consistent with the output message prefix "kexec".Ping, any comment is appreciate and helpful.
Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing messages. I have no idea what is the best way but below modification sounds better to me:
kexec_core.c:
#define pr_fmt(fmt) "[kexec_core] " fmt
Also remove below prefix "Kexec:"pr_warn("Kexec: Memory allocation for saving cpu register states failed\n");
kexec.c:
#define pr_fmt(fmt) "[kexec] " fmt
kexec_file.c:
#define pr_fmt(fmt) "[kexec_file] " fmt
Thanks
Dave
Quoted 16 lines · Dave Young
Quoted 6 lines
Quoted 4 lines
Hi, Dave.
How about removing all of the prefix "crashkernel" in
kexec_core. Thus we can be consistent with the output message prefix "kexec".Ping, any comment is appreciate and helpful.
Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing messages. I have no idea what is the best way but below modification sounds better to me:
kexec_core.c:#define
pr_fmt(fmt)"[kexec_core] " fmt
Also remove below prefix "Kexec:"pr_warn("Kexec: Memory allocation for saving cpu register states failed\n");
Quoted 5 lines
kexec.c:
#definepr_fmt(fmt)"[kexec] " fmt
kexec_file.c:
#definepr_fmt(fmt)"[kexec_file] " fmt
This is weird, user really don't need to know each file. I saw you added a new file kexec_internal.h and all three files includes it. Why not doing it there to make it the same as before?
Quoted 8 lines
Thanks
Dave_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 20 lines · Baoquan He
Quoted 19 lines · Dave Young
Quoted 6 lines
Quoted 4 lines
Hi, Dave.
How about removing all of the prefix "crashkernel" in
kexec_core. Thus we can be consistent with the output message prefix "kexec".Ping, any comment is appreciate and helpful.
Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing messages. I have no idea what is the best way but below modification sounds better to me:
kexec_core.c:#define
pr_fmt(fmt)"[kexec_core] " fmt
Also remove below prefix "Kexec:"pr_warn("Kexec: Memory allocation for saving cpu register states failed\n");
kexec.c:
#definepr_fmt(fmt)"[kexec] " fmt
Quoted 6 lines
Quoted 2 lines
kexec_file.c:
#definepr_fmt(fmt)"[kexec_file] " fmtThis is weird, user really don't need to know each file. I saw you added a new file
kexec_internal.hand all three files includes it. Why not doing it there to make it the same as before?
The output message format is incorrect, if other *.c (except for kexec*) include the kexec_internal.h.
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
How about defining the format like above in each *.c?
Thanks
Minfei
Quoted 7 lines · Minfei Huang
Quoted 3 lines · Baoquan He
This is weird, user really don't need to know each file. I saw you added a new file
kexec_internal.hand all three files includes it. Why not doing it there to make it the same as before?The output message format is incorrect, if other *.c (except for kexec*) include the
kexec_internal.h.
No, I assume Dave added kexec_internal.h not to be used by other *.c. It should be only used by kexec*.c
Quoted 7 lines
#define
pr_fmt(fmt)KBUILD_MODNAME": " fmtHow about defining the format like above in each *.c?
Thanks
Minfei
Quoted 6 lines · Baoquan He
Quoted 5 lines · Minfei Huang
Quoted 3 lines · Baoquan He
This is weird, user really don't need to know each file. I saw you added a new file
kexec_internal.hand all three files includes it. Why not doing it there to make it the same as before?
Quoted 10 lines
Quoted 2 lines
The output message format is incorrect, if other *.c (except for kexec*) include the
kexec_internal.h.No, I assume Dave added
kexec_internal.hnot to be used by other *.c. It should be only used by kexec*.cQuoted 4 lines
#define
pr_fmt(fmt)KBUILD_MODNAME": " fmtHow about defining the format like above in each *.c?
Ok. I can split this patch as two patches One for cleanup, other to fix the prefix issue.
Thanks
Minfei
Quoted 20 lines · Baoquan He
Quoted 19 lines · Dave Young
Quoted 6 lines
Quoted 4 lines
Hi, Dave.
How about removing all of the prefix "crashkernel" in
kexec_core. Thus we can be consistent with the output message prefix "kexec".Ping, any comment is appreciate and helpful.
Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing messages. I have no idea what is the best way but below modification sounds better to me:
kexec_core.c:#define
pr_fmt(fmt)"[kexec_core] " fmt
Also remove below prefix "Kexec:"pr_warn("Kexec: Memory allocation for saving cpu register states failed\n");
kexec.c:
#definepr_fmt(fmt)"[kexec] " fmt
Quoted 6 lines
Quoted 2 lines
kexec_file.c:
#definepr_fmt(fmt)"[kexec_file] " fmtThis is weird, user really don't need to know each file. I saw you added a new file
kexec_internal.hand all three files includes it. Why not doing it there to make it the same as before?
I personally do not like add these prefix to a header file. One prefix for a c file is better to me.
But rethinking about the prefix, looks like there's a lot of other components using ":" so KBUILD_MODNAME ": " should be fine.
Thanks
Dave