Fix core dump when parsing ccd device specifications. From Jason Downs.
This commit is contained in:
parent
2999135c5d
commit
6f895463de
@ -33,7 +33,7 @@
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)mkioconf.c 5.18 (Berkeley) 5/10/91";*/
|
||||
static char rcsid[] = "$Id: mkioconf.c,v 1.33 1994/08/03 19:30:21 hpeyerl Exp $";
|
||||
static char rcsid[] = "$Id: mkioconf.c,v 1.34 1994/10/31 19:13:13 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
@ -135,7 +135,8 @@ comp_config(fp)
|
||||
fprintf(fp, "\t%d,\t%d,\t%d,\t%d,\t{",
|
||||
dp->d_unit, dp->d_pri < 0 ? 0 : dp->d_pri,
|
||||
dp->d_flags, 1);
|
||||
for (fl = fl->f_next; fl->f_type == COMPSPEC && fl; fl = fl->f_next)
|
||||
for (fl = fl->f_next; fl && fl->f_type == COMPSPEC;
|
||||
fl = fl->f_next)
|
||||
fprintf(fp, " 0x%x,", fl->f_compdev);
|
||||
fprintf(fp, " NODEV },\n");
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)mkioconf.c 5.18 (Berkeley) 5/10/91";*/
|
||||
static char rcsid[] = "$Id: mkioconf.c,v 1.33 1994/08/03 19:30:21 hpeyerl Exp $";
|
||||
static char rcsid[] = "$Id: mkioconf.c,v 1.34 1994/10/31 19:13:13 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
@ -135,7 +135,8 @@ comp_config(fp)
|
||||
fprintf(fp, "\t%d,\t%d,\t%d,\t%d,\t{",
|
||||
dp->d_unit, dp->d_pri < 0 ? 0 : dp->d_pri,
|
||||
dp->d_flags, 1);
|
||||
for (fl = fl->f_next; fl->f_type == COMPSPEC && fl; fl = fl->f_next)
|
||||
for (fl = fl->f_next; fl && fl->f_type == COMPSPEC;
|
||||
fl = fl->f_next)
|
||||
fprintf(fp, " 0x%x,", fl->f_compdev);
|
||||
fprintf(fp, " NODEV },\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user