Commit 11af97e1 authored by Hendrik Brueckner's avatar Hendrik Brueckner Committed by Martin Schwidefsky

[S390] kernel: Print an error message if kernel NSS cannot be defined

If a named saved system (NSS) cannot be defined or saved, print out an
error message with the return code of the underlying z/VM CP command.
Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent edc44fa0
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
* Heiko Carstens <heiko.carstens@de.ibm.com> * Heiko Carstens <heiko.carstens@de.ibm.com>
*/ */
#define KMSG_COMPONENT "setup"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -16,6 +19,7 @@ ...@@ -16,6 +19,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/pfn.h> #include <linux/pfn.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/kernel.h>
#include <asm/ebcdic.h> #include <asm/ebcdic.h>
#include <asm/ipl.h> #include <asm/ipl.h>
#include <asm/lowcore.h> #include <asm/lowcore.h>
...@@ -140,6 +144,8 @@ static noinline __init void create_kernel_nss(void) ...@@ -140,6 +144,8 @@ static noinline __init void create_kernel_nss(void)
__cpcmd(defsys_cmd, NULL, 0, &response); __cpcmd(defsys_cmd, NULL, 0, &response);
if (response != 0) { if (response != 0) {
pr_err("Defining the Linux kernel NSS failed with rc=%d\n",
response);
kernel_nss_name[0] = '\0'; kernel_nss_name[0] = '\0';
return; return;
} }
...@@ -152,8 +158,11 @@ static noinline __init void create_kernel_nss(void) ...@@ -152,8 +158,11 @@ static noinline __init void create_kernel_nss(void)
* max SAVESYS_CMD_SIZE * max SAVESYS_CMD_SIZE
* On error: response contains the numeric portion of cp error message. * On error: response contains the numeric portion of cp error message.
* for SAVESYS it will be >= 263 * for SAVESYS it will be >= 263
* for missing privilege class, it will be 1
*/ */
if (response > SAVESYS_CMD_SIZE) { if (response > SAVESYS_CMD_SIZE || response == 1) {
pr_err("Saving the Linux kernel NSS failed with rc=%d\n",
response);
kernel_nss_name[0] = '\0'; kernel_nss_name[0] = '\0';
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment