makdumpfile: clean up the in-accurate message printing about mmap
Subsystems (2)
PATCH 1/1 makdumpfile: clean up the in-accurate message printing about mmap
mmap() is not used either caused by failure of mmap() in initialize_mmap(), or because user explictly specify '--non-mmap'. So the message need be changed according these different cases.
--- makedumpfile.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
makedumpfile.c +11 -8
@@ -3949,14 +3949,17 @@ out:if (info->dump_level &DL_EXCLUDE_FREE )setup_page_is_buddy (); -if (info->flag_usemmap ==MMAP_TRY &&initialize_mmap ()) { -DEBUG_MSG ("mmap() is available on the kernel.\n" ); - info->flag_usemmap =MMAP_ENABLE ; - }else { -DEBUG_MSG ("The kernel doesn't support mmap()," ); -DEBUG_MSG ("read() will be used instead.\n" ); - info->flag_usemmap =MMAP_DISABLE ; - } +if (info->flag_usemmap ==MMAP_TRY ) { +if (initialize_mmap ()) { +DEBUG_MSG ("mmap() is available on the kernel.\n" ); + info->flag_usemmap =MMAP_ENABLE ; + }else { +DEBUG_MSG ("The kernel doesn't support mmap()," ); +DEBUG_MSG ("read() will be used instead.\n" ); + info->flag_usemmap =MMAP_DISABLE ; + } + }else if (info->flag_usemmap ==MMAP_DISABLE ) +DEBUG_MSG ("mmap() is disabled by specified option '--non-mmap'.\n" );return TRUE; }
Signature · 7 lines
2.5.0 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Hello Baoquan,
Quoted 5 lines
mmap()is not used either caused by failure ofmmap()ininitialize_mmap(), or because user explictly specify '--non-mmap'. So the message need be changed according these different cases.Signed-off-by Baoquan He <[email protected]>
Sounds reasonable, thanks.
Quoted 35 lines
---
makedumpfile.c| 19 +++++++++++--------1 file changed, 11 insertions(+), 8 deletions(-)makedumpfile.c +11
-9@@ -3949,14 +3949,17 @@ out:if (info->dump_level &DL_EXCLUDE_FREE )setup_page_is_buddy (); -if (info->flag_usemmap ==MMAP_TRY &&initialize_mmap ()) { -DEBUG_MSG ("mmap() is available on the kernel.\n" ); - info->flag_usemmap =MMAP_ENABLE ; - }else { -DEBUG_MSG ("The kernel doesn't support mmap()," ); -DEBUG_MSG ("read() will be used instead.\n" ); - info->flag_usemmap =MMAP_DISABLE ; - } +if (info->flag_usemmap ==MMAP_TRY ) { +if (initialize_mmap ()) { +DEBUG_MSG ("mmap() is available on the kernel.\n" ); + info->flag_usemmap =MMAP_ENABLE ; + }else { +DEBUG_MSG ("The kernel doesn't support mmap()," ); +DEBUG_MSG ("read() will be used instead.\n" ); + info->flag_usemmap =MMAP_DISABLE ; + } + }else if (info->flag_usemmap ==MMAP_DISABLE ) +DEBUG_MSG ("mmap() is disabled by specified option '--non-mmap'.\n" );return TRUE; } --
Quoted 1 line
2.5.0
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 11 lines · Atsushi Kumagai
Hello Baoquan,
Quoted 5 lines
mmap()is not used either caused by failure ofmmap()ininitialize_mmap(), or because user explictly specify '--non-mmap'. So the message need be changed according these different cases.Signed-off-by Baoquan He <[email protected]>Sounds reasonable, thanks.
Acked-by Atsushi Kumagai <[email protected]>
Thanks!
Quoted 33 lines
Quoted 33 lines
---
makedumpfile.c| 19 +++++++++++--------1 file changed, 11 insertions(+), 8 deletions(-)makedumpfile.c +11
-8@@ -3949,14 +3949,17 @@ out:if (info->dump_level &DL_EXCLUDE_FREE )setup_page_is_buddy (); -if (info->flag_usemmap ==MMAP_TRY &&initialize_mmap ()) { -DEBUG_MSG ("mmap() is available on the kernel.\n" ); - info->flag_usemmap =MMAP_ENABLE ; - }else { -DEBUG_MSG ("The kernel doesn't support mmap()," ); -DEBUG_MSG ("read() will be used instead.\n" ); - info->flag_usemmap =MMAP_DISABLE ; - } +if (info->flag_usemmap ==MMAP_TRY ) { +if (initialize_mmap ()) { +DEBUG_MSG ("mmap() is available on the kernel.\n" ); + info->flag_usemmap =MMAP_ENABLE ; + }else { +DEBUG_MSG ("The kernel doesn't support mmap()," ); +DEBUG_MSG ("read() will be used instead.\n" ); + info->flag_usemmap =MMAP_DISABLE ; + } + }else if (info->flag_usemmap ==MMAP_DISABLE ) +DEBUG_MSG ("mmap() is disabled by specified option '--non-mmap'.\n" );
Quoted 5 lines
Quoted 4 lines
makedumpfile.c +0
-1return TRUE; } --2.5.0
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec