Fix the 3 programs that use DTYPE_ (disklabel disk types) constants from the
kernel. Two of them are inside ifdefs.
This commit is contained in:
parent
40a37f0d92
commit
52e8eb1316
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: main.c,v 1.42 2014/09/19 17:45:03 matt Exp $ */
|
/* $NetBSD: main.c,v 1.43 2015/01/02 19:46:02 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||||
|
@ -76,7 +76,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\
|
||||||
static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95";
|
static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95";
|
||||||
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
|
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: main.c,v 1.42 2014/09/19 17:45:03 matt Exp $");
|
__RCSID("$NetBSD: main.c,v 1.43 2015/01/02 19:46:02 christos Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -793,7 +793,7 @@ write_label(int f)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VAX_ALTLABELS
|
#ifdef VAX_ALTLABELS
|
||||||
if (lab.d_type == DTYPE_SMD && lab.d_flags & D_BADSECT &&
|
if (lab.d_type == DKTYPE_SMD && lab.d_flags & D_BADSECT &&
|
||||||
lab.d_secsize == 512) {
|
lab.d_secsize == 512) {
|
||||||
/* Write the label to the odd sectors of the last track! */
|
/* Write the label to the odd sectors of the last track! */
|
||||||
daddr_t alt;
|
daddr_t alt;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bad144.c,v 1.30 2013/11/03 00:48:52 christos Exp $ */
|
/* $NetBSD: bad144.c,v 1.31 2015/01/02 19:46:02 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1980, 1986, 1988, 1993
|
* Copyright (c) 1980, 1986, 1988, 1993
|
||||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1988, 1993\
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)bad144.c 8.2 (Berkeley) 4/27/95";
|
static char sccsid[] = "@(#)bad144.c 8.2 (Berkeley) 4/27/95";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: bad144.c,v 1.30 2013/11/03 00:48:52 christos Exp $");
|
__RCSID("$NetBSD: bad144.c,v 1.31 2015/01/02 19:46:02 christos Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ main(int argc, char *argv[])
|
||||||
errx(7, "Disk sector size too large/small (%d)",
|
errx(7, "Disk sector size too large/small (%d)",
|
||||||
dp->d_secsize);
|
dp->d_secsize);
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
if (dp->d_type == DTYPE_SCSI)
|
if (dp->d_type == DKTYPE_SCSI)
|
||||||
errx(1, "SCSI disks don't use bad144!");
|
errx(1, "SCSI disks don't use bad144!");
|
||||||
/* are we inside a DOS partition? */
|
/* are we inside a DOS partition? */
|
||||||
if (dp->d_partitions[0].p_offset) {
|
if (dp->d_partitions[0].p_offset) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993\
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "from: @(#)diskpart.c 8.3 (Berkeley) 11/30/94";
|
static char sccsid[] = "from: @(#)diskpart.c 8.3 (Berkeley) 11/30/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: diskpart.c,v 1.19 2011/08/30 10:12:06 joerg Exp $");
|
__RCSID("$NetBSD: diskpart.c,v 1.20 2015/01/02 19:46:02 christos Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ main(int argc, char *argv[])
|
||||||
* bad sectors are mapped.
|
* bad sectors are mapped.
|
||||||
* If disk size was specified explicitly, use specified size.
|
* If disk size was specified explicitly, use specified size.
|
||||||
*/
|
*/
|
||||||
if (dp->d_type == DTYPE_SMD && dp->d_flags & D_BADSECT &&
|
if (dp->d_type == DKTYPE_SMD && dp->d_flags & D_BADSECT &&
|
||||||
totsize == 0) {
|
totsize == 0) {
|
||||||
badsecttable = dp->d_nsectors +
|
badsecttable = dp->d_nsectors +
|
||||||
roundup(badsecttable, dp->d_nsectors);
|
roundup(badsecttable, dp->d_nsectors);
|
||||||
|
@ -267,7 +267,7 @@ main(int argc, char *argv[])
|
||||||
printf("\t0,\t0,\n");
|
printf("\t0,\t0,\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (dp->d_type != DTYPE_MSCP) {
|
if (dp->d_type != DKTYPE_MSCP) {
|
||||||
printf("\t%d,\t%d,\t\t/* %c=cyl %d thru %d */\n",
|
printf("\t%d,\t%d,\t\t/* %c=cyl %d thru %d */\n",
|
||||||
defpart[def][part], startcyl[part],
|
defpart[def][part], startcyl[part],
|
||||||
'A' + part, startcyl[part],
|
'A' + part, startcyl[part],
|
||||||
|
@ -304,7 +304,7 @@ main(int argc, char *argv[])
|
||||||
dp->d_nsectors, dp->d_ntracks, dp->d_ncylinders);
|
dp->d_nsectors, dp->d_ntracks, dp->d_ncylinders);
|
||||||
if (dp->d_secpercyl != dp->d_nsectors * dp->d_ntracks)
|
if (dp->d_secpercyl != dp->d_nsectors * dp->d_ntracks)
|
||||||
printf("sc#%d:", dp->d_secpercyl);
|
printf("sc#%d:", dp->d_secpercyl);
|
||||||
if (dp->d_type == DTYPE_SMD && dp->d_flags & D_BADSECT)
|
if (dp->d_type == DKTYPE_SMD && dp->d_flags & D_BADSECT)
|
||||||
printf("sf:");
|
printf("sf:");
|
||||||
printf("\\\n\t:dt=%s:", dktypenames[dp->d_type]);
|
printf("\\\n\t:dt=%s:", dktypenames[dp->d_type]);
|
||||||
for (part = NDDATA - 1; part >= 0; part--)
|
for (part = NDDATA - 1; part >= 0; part--)
|
||||||
|
@ -434,7 +434,7 @@ gettype:
|
||||||
goto gettype;
|
goto gettype;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "(type <cr> to get default value, if only one)\n");
|
fprintf(stderr, "(type <cr> to get default value, if only one)\n");
|
||||||
if (dp->d_type == DTYPE_SMD) {
|
if (dp->d_type == DKTYPE_SMD) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Do '%s' disks support bad144 bad block forwarding (yes)? ",
|
"Do '%s' disks support bad144 bad block forwarding (yes)? ",
|
||||||
dp->d_typename);
|
dp->d_typename);
|
||||||
|
|
Loading…
Reference in New Issue