diff options
author | Gerald Schaefer <geraldsc@de.ibm.com> | 2006-04-27 21:40:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-28 11:33:48 -0400 |
commit | 9b5dec1aa08b77c4217cd5fcaf1e4e177f659b2e (patch) | |
tree | 67dd2efc485f8c8aadf52cebf23f241777353776 | |
parent | 2cc924b8ba1e9493ed50f5b793974e2427a15748 (diff) |
[PATCH] s390: segment operation error codes
Print a warning with the z/VM error code if segment_load, segment_type or
segment_save fail to ease the problem determination.
Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/s390/mm/extmem.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c index a9566bcab682..9b11e3e20903 100644 --- a/arch/s390/mm/extmem.c +++ b/arch/s390/mm/extmem.c | |||
@@ -192,6 +192,7 @@ query_segment_type (struct dcss_segment *seg) | |||
192 | diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc); | 192 | diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc); |
193 | 193 | ||
194 | if (diag_cc > 1) { | 194 | if (diag_cc > 1) { |
195 | PRINT_WARN ("segment_type: diag returned error %ld\n", vmrc); | ||
195 | rc = dcss_diag_translate_rc (vmrc); | 196 | rc = dcss_diag_translate_rc (vmrc); |
196 | goto out_free; | 197 | goto out_free; |
197 | } | 198 | } |
@@ -553,7 +554,7 @@ segment_save(char *name) | |||
553 | int endpfn = 0; | 554 | int endpfn = 0; |
554 | char cmd1[160]; | 555 | char cmd1[160]; |
555 | char cmd2[80]; | 556 | char cmd2[80]; |
556 | int i; | 557 | int i, response; |
557 | 558 | ||
558 | if (!MACHINE_IS_VM) | 559 | if (!MACHINE_IS_VM) |
559 | return; | 560 | return; |
@@ -576,8 +577,20 @@ segment_save(char *name) | |||
576 | segtype_string[seg->range[i].start & 0xff]); | 577 | segtype_string[seg->range[i].start & 0xff]); |
577 | } | 578 | } |
578 | sprintf(cmd2, "SAVESEG %s", name); | 579 | sprintf(cmd2, "SAVESEG %s", name); |
579 | cpcmd(cmd1, NULL, 0, NULL); | 580 | response = 0; |
580 | cpcmd(cmd2, NULL, 0, NULL); | 581 | cpcmd(cmd1, NULL, 0, &response); |
582 | if (response) { | ||
583 | PRINT_ERR("segment_save: DEFSEG failed with response code %i\n", | ||
584 | response); | ||
585 | goto out; | ||
586 | } | ||
587 | cpcmd(cmd2, NULL, 0, &response); | ||
588 | if (response) { | ||
589 | PRINT_ERR("segment_save: SAVESEG failed with response code %i\n", | ||
590 | response); | ||
591 | goto out; | ||
592 | } | ||
593 | out: | ||
581 | spin_unlock(&dcss_lock); | 594 | spin_unlock(&dcss_lock); |
582 | } | 595 | } |
583 | 596 | ||