[comp.bugs.4bsd] 4.3BSD Tahoe vax/swapgeneric.c bug

grr@cbmvax.UUCP (George Robbins) (05/27/89)

Index:	sys/vax/swapgeneric.c 4.3BSD-tahoe Fix

Description:
	When swapgeneric asks for the root device, it botches the table
	lookup and refuses to accept any device name.

Repeat-By:
	Generate a "swap on generic" kernel, boot and try to get past
	the "root device? " prompt.

Fix:
	Correct the confused coding for the partial string comparison
	in the table lookup code.

*** vax/swapgeneric.c.grr	Fri May 26 16:31:53 1989
--- vax/swapgeneric.c	Fri May 26 16:33:41 1989
***************
*** 80,89
  retry:
  		printf("root device? ");
  		gets(name);
! 		for (gc = genericconf; gc->gc_driver; gc++)
! 		    for (cp = name, gp = gc->gc_name; *cp == *gp; cp++, gp++)
! 			if (*gp == 0)
! 				goto gotit;
  		printf(
  		  "use hp%%d, up%%d, ra%%d, rb%%d, rl%%d, hk%%d or kra%%d\n");
  		goto retry;

--- 80,91 -----
  retry:
  		printf("root device? ");
  		gets(name);
! 		for (gc = genericconf; gc->gc_driver; gc++) {
! 		    for (cp = name, gp = gc->gc_name; *cp == *gp; cp++, gp++)
!			;
! 		    if (*gp == 0)
! 			goto gotit;
! 		}
  		printf(
  		  "use hp%%d, up%%d, ra%%d, rb%%d, rl%%d, hk%%d or kra%%d\n");
  		goto retry;
-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)