Re: [PATCH] kexec-tools: print error if kexec_file_load fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hari,

Dne 16. 03. 22 v 11:33 Hari Bathini napsal(a):
Commit 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error
handling") introduced EFALLBACK for scenarios where fallbacking back
to kexec_load syscall is likely to work and dropped printing error
message for these scenarios. But printing error message for other
failure scenarios was inadvertently dropped. Restore printing error
message for such cases.

Indeed, my commit removed the error messages on failure.


Fixes: 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error handling")
Cc: Petr Tesarik <ptesarik@xxxxxxxx>
Reported-by: Nageswara R Sastry <rnsastry@xxxxxxxxxxxxx>
Tested-by: Nageswara R Sastry <rnsastry@xxxxxxxxxxxxx>
Signed-off-by: Hari Bathini <hbathini@xxxxxxxxxxxxx>

Reviewed-by: Petr Tesarik <ptesarik@xxxxxxxx>

Petr T

---
  kexec/kexec.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index 7e4787b..865de61 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1339,6 +1339,7 @@ static int do_kexec_file_load(int fileind, int argc, char **argv,
  		case EMSGSIZE:
  			/* Reject by default. */
  		default:
+			fprintf(stderr, "kexec_file_load failed: %s\n", strerror(errno));
  			ret = EFAILED;
  			break;

Attachment: OpenPGP_0xAA503BC9AE0F47A7.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec

[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux