Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Fix the 3 programs that use DTYPE_ (disklabel disk types) co...



details:   https://anonhg.NetBSD.org/src/rev/323f4238db1f
branches:  trunk
changeset: 335305:323f4238db1f
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 02 19:46:02 2015 +0000

description:
Fix the 3 programs that use DTYPE_ (disklabel disk types) constants from the
kernel. Two of them are inside ifdefs.

diffstat:

 sbin/disklabel/main.c        |   6 +++---
 usr.sbin/bad144/bad144.c     |   6 +++---
 usr.sbin/diskpart/diskpart.c |  10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)

diffs (102 lines):

diff -r 38c3aaa9b12f -r 323f4238db1f sbin/disklabel/main.c
--- a/sbin/disklabel/main.c     Fri Jan 02 19:43:13 2015 +0000
+++ b/sbin/disklabel/main.c     Fri Jan 02 19:46:02 2015 +0000
@@ -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.
@@ -76,7 +76,7 @@
 static char sccsid[] = "@(#)disklabel.c        8.4 (Berkeley) 5/4/95";
 /* from static char sccsid[] = "@(#)disklabel.c        1.2 (Symmetric) 11/28/85"; */
 #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 /* not lint */
 
@@ -793,7 +793,7 @@
        }
 
 #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) {
                /* Write the label to the odd sectors of the last track! */
                daddr_t alt;
diff -r 38c3aaa9b12f -r 323f4238db1f usr.sbin/bad144/bad144.c
--- a/usr.sbin/bad144/bad144.c  Fri Jan 02 19:43:13 2015 +0000
+++ b/usr.sbin/bad144/bad144.c  Fri Jan 02 19:46:02 2015 +0000
@@ -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
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)bad144.c   8.2 (Berkeley) 4/27/95";
 #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 /* not lint */
 
@@ -168,7 +168,7 @@
                errx(7, "Disk sector size too large/small (%d)",
                    dp->d_secsize);
 #ifdef __i386__
-       if (dp->d_type == DTYPE_SCSI)
+       if (dp->d_type == DKTYPE_SCSI)
                errx(1, "SCSI disks don't use bad144!");
        /* are we inside a DOS partition? */
        if (dp->d_partitions[0].p_offset) {
diff -r 38c3aaa9b12f -r 323f4238db1f usr.sbin/diskpart/diskpart.c
--- a/usr.sbin/diskpart/diskpart.c      Fri Jan 02 19:43:13 2015 +0000
+++ b/usr.sbin/diskpart/diskpart.c      Fri Jan 02 19:46:02 2015 +0000
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)diskpart.c   8.3 (Berkeley) 11/30/94";
 #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 /* not lint */
 
@@ -181,7 +181,7 @@
         * bad sectors are mapped.
         * 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) {
                badsecttable = dp->d_nsectors +
                    roundup(badsecttable, dp->d_nsectors);
@@ -267,7 +267,7 @@
                                printf("\t0,\t0,\n");
                                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",
                                        defpart[def][part], startcyl[part],
                                        'A' + part, startcyl[part],
@@ -304,7 +304,7 @@
                        dp->d_nsectors, dp->d_ntracks, dp->d_ncylinders);
                if (dp->d_secpercyl != dp->d_nsectors * dp->d_ntracks)
                        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("\\\n\t:dt=%s:", dktypenames[dp->d_type]);
                for (part = NDDATA - 1; part >= 0; part--)
@@ -434,7 +434,7 @@
                goto gettype;
        }
        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,
                    "Do '%s' disks support bad144 bad block forwarding (yes)? ",
                    dp->d_typename);



Home | Main Index | Thread Index | Old Index