diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-03-23 05:14:59 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-03-23 05:15:14 -0400 |
commit | 894e491e427ae40af62b871e05f9a3f80bbddb6c (patch) | |
tree | 176c995f2d50d0b65c75fbfe34e05d66a87882ef /arch/s390/kernel/early.c | |
parent | 69ac43b05eef4b8555e84ad51ceb6c58b5a3bc75 (diff) |
[S390] early: limit savesys cmd string handling
Use snprintf() here as well so we won't have to deal with this again.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r-- | arch/s390/kernel/early.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 668138ee85d9..068f8465c4ee 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -143,8 +143,9 @@ static noinline __init void create_kernel_nss(void) | |||
143 | snprintf(defsys_cmd + hlen, DEFSYS_CMD_SIZE - hlen, | 143 | snprintf(defsys_cmd + hlen, DEFSYS_CMD_SIZE - hlen, |
144 | " EW MINSIZE=%.7iK PARMREGS=0-13", min_size); | 144 | " EW MINSIZE=%.7iK PARMREGS=0-13", min_size); |
145 | defsys_cmd[DEFSYS_CMD_SIZE - 1] = '\0'; | 145 | defsys_cmd[DEFSYS_CMD_SIZE - 1] = '\0'; |
146 | sprintf(savesys_cmd, "SAVESYS %s \n IPL %s", | 146 | snprintf(savesys_cmd, SAVESYS_CMD_SIZE, "SAVESYS %s \n IPL %s", |
147 | kernel_nss_name, kernel_nss_name); | 147 | kernel_nss_name, kernel_nss_name); |
148 | savesys_cmd[SAVESYS_CMD_SIZE - 1] = '\0'; | ||
148 | 149 | ||
149 | __cpcmd(defsys_cmd, NULL, 0, &response); | 150 | __cpcmd(defsys_cmd, NULL, 0, &response); |
150 | 151 | ||