s390/kexec: change return value of machine_kexec_prepare
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 6 Sep 2012 13:19:08 +0000 (15:19 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 26 Sep 2012 13:45:14 +0000 (15:45 +0200)
Returning -ENOSYS on kexec_load() is a bad idea since user space cannot
tell if the system call is not implmented or if it failed.
Use -EOPNOTSUPP in case somebody tries a kexec_load on a NSS image based
kernel instead.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/machine_kexec.c

index 0d5063e0ff799ec01162d9d558ec9616af1066de..cc913869e015014f8261a0d0f391c15843db95dc 100644 (file)
@@ -159,7 +159,7 @@ int machine_kexec_prepare(struct kimage *image)
 
        /* Can't replace kernel image since it is read-only. */
        if (ipl_flags & IPL_NSS_VALID)
-               return -ENOSYS;
+               return -EOPNOTSUPP;
 
        if (image->type == KEXEC_TYPE_CRASH)
                return machine_kexec_prepare_kdump();