/* diagnose code 0x14 subcode 0x0000 - read next spool file buffer cc=0 normal completion cc=1 EOF reached cc=2 no file active on the virtual reader, and no file eligible cc=3 file already active on the virtual reader or specified virtual reader does not exist or is not a reader  */
static int diag_read_file(int devno, char *buf)
/* diagnose code 0x14 subcode 0x0000 - read next spool file buffer cc=0 normal completion cc=1 EOF reached cc=2 no file active on the virtual reader, and no file eligible cc=3 file already active on the virtual reader or specified virtual reader does not exist or is not a reader  */
static int diag_read_file(int devno, char *buf)
{
	int cc;
	cc = diag14((unsigned long) buf, devno, 0x00);
	switch (cc) {
	case 0:
		return 0;
	case 1:
		return -ENODATA;
	case 2:
		return -ENOMEDIUM;
	default:
		return -EIO;
	}
}