Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b5dec1a authored by Gerald Schaefer's avatar Gerald Schaefer Committed by Linus Torvalds
Browse files

[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: default avatarGerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2cc924b8
Loading
Loading
Loading
Loading
+16 −3
Original line number Original line Diff line number Diff line
@@ -192,6 +192,7 @@ query_segment_type (struct dcss_segment *seg)
	diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc);
	diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc);


	if (diag_cc > 1) {
	if (diag_cc > 1) {
		PRINT_WARN ("segment_type: diag returned error %ld\n", vmrc);
		rc = dcss_diag_translate_rc (vmrc);
		rc = dcss_diag_translate_rc (vmrc);
		goto out_free;
		goto out_free;
	}
	}
@@ -553,7 +554,7 @@ segment_save(char *name)
	int endpfn = 0;
	int endpfn = 0;
	char cmd1[160];
	char cmd1[160];
	char cmd2[80];
	char cmd2[80];
	int i;
	int i, response;


	if (!MACHINE_IS_VM)
	if (!MACHINE_IS_VM)
		return;
		return;
@@ -576,8 +577,20 @@ segment_save(char *name)
			segtype_string[seg->range[i].start & 0xff]);
			segtype_string[seg->range[i].start & 0xff]);
	}
	}
	sprintf(cmd2, "SAVESEG %s", name);
	sprintf(cmd2, "SAVESEG %s", name);
	cpcmd(cmd1, NULL, 0, NULL);
	response = 0;
	cpcmd(cmd2, NULL, 0, NULL);
	cpcmd(cmd1, NULL, 0, &response);
	if (response) {
		PRINT_ERR("segment_save: DEFSEG failed with response code %i\n",
			  response);
		goto out;
	}
	cpcmd(cmd2, NULL, 0, &response);
	if (response) {
		PRINT_ERR("segment_save: SAVESEG failed with response code %i\n",
			  response);
		goto out;
	}
out:
	spin_unlock(&dcss_lock);
	spin_unlock(&dcss_lock);
}
}