[comp.os.minix] patch for DOSREAD to fix disk validation problem

cagney@chook.ua.oz (Andrew Cagney - aka Noid) (09/21/89)

The below patch fixes a problem when reading MicroByte DOS disks.
DOSREAD, to verify that a disk is in DOS format, looks at the first
3 bytes of the boot block checking for a jump instruction. Unfortunatly
8086's have more than one jump instruction and in the case of a MicroByte
disk the check was for the wrong one.

This patch changes the check so that two different jmp instructions are
accepted.

The patch is against v1.4a of dosread. 

						Andrew Cagney (Noid)

------------------------------------------------------------------------------
echo x - dosread.c.cdif
sed '/^X/s///' > dosread.c.cdif << '/'
X*** /users/projects/leopard/minix-src/usr/src/commands/dosread.c	Wed Aug 16 20:07:31 1989
X--- dosread.c	Thu Sep 21 11:58:19 1989
X***************
X*** 394,400 ****
X  	leave(1);
X  /**************/
X  	if (((boot.media_type & 0xf0) != 0xf0)
X!             || (boot.jump[0] != 0xeb) || (boot.jump[2] != 0x90) ) {
X  		printf("DISK is not DOS Format.\n");
X  		leave(1);
X  	}
X--- 394,402 ----
X  	leave(1);
X  /**************/
X  	if (((boot.media_type & 0xf0) != 0xf0)
X!             || (((boot.jump[0] != 0xeb/*JMPS*/) 
X! 			|| (boot.jump[2] != 0x90/*NOP*/))
X! 		&&(boot.jump[0] != 0xe9/*JMP*/)) ) {
X  		printf("DISK is not DOS Format.\n");
X  		leave(1);
X  	}
/