Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/stand/lib/test sync to changed geometry handli...



details:   https://anonhg.NetBSD.org/src/rev/ce091b038c5c
branches:  trunk
changeset: 467868:ce091b038c5c
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Mar 30 11:51:35 1999 +0000

description:
sync to changed geometry handling in the standalone code

diffstat:

 sys/arch/i386/stand/lib/test/biosdisk_user.c |  32 ++++++++++++++++++---------
 sys/arch/i386/stand/lib/test/biosdisk_user.h |  12 +++++-----
 2 files changed, 27 insertions(+), 17 deletions(-)

diffs (111 lines):

diff -r 63a4066d44d3 -r ce091b038c5c sys/arch/i386/stand/lib/test/biosdisk_user.c
--- a/sys/arch/i386/stand/lib/test/biosdisk_user.c      Tue Mar 30 10:12:01 1999 +0000
+++ b/sys/arch/i386/stand/lib/test/biosdisk_user.c      Tue Mar 30 11:51:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: biosdisk_user.c,v 1.2 1998/11/22 15:44:03 drochner Exp $       */
+/*     $NetBSD: biosdisk_user.c,v 1.3 1999/03/30 11:51:35 drochner Exp $       */
 
 /*
  * Copyright (c) 1998
@@ -39,6 +39,7 @@
 #include <fcntl.h>
 #include <err.h>
 
+#include "biosdisk_ll.h"
 #include "biosdisk_user.h"
 
 /*
@@ -52,9 +53,9 @@
 static int currentdev, currentdte;
 static int fd = -1;
 
-int
-get_diskinfo(dev)
-       int dev;
+void
+get_diskinfo(d)
+       struct biosdisk_ll *d;
 {
        int i;
 
@@ -67,24 +68,26 @@
        for (;;) {
                if (emuldisktab[i].biosdev == -1)
                        break;
-               if (emuldisktab[i].biosdev == dev)
+               if (emuldisktab[i].biosdev == d->dev)
                        goto ok;
                i++;
        }
-       warnx("unknown device %x", dev);
-       return (0);
+       warnx("unknown device %x", d->dev);
+       return;
 
 ok:
        fd = open(emuldisktab[i].name, O_RDONLY, 0);
        if (fd < 0) {
                warn("open %s", emuldisktab[i].name);
-               return (0);
+               return;
        }
 
-       currentdev = dev;
+       currentdev = d->dev;
        currentdte = i;
-       return (((emuldisktab[i].heads - 1) << 8)
-               + emuldisktab[i].spt);
+
+       d->sec = emuldisktab[i].spt;
+       d->head = emuldisktab[i].heads - 1;
+       d->cyl = emuldisktab[i].cyls;
 }
 
 int
@@ -119,6 +122,13 @@
        return (0);
 }
 
+void
+int13_getextinfo(dev, info)
+       int dev;
+       struct biosdisk_ext13info *info;
+{
+}
+
 struct ext {
        int8_t  size;
        int8_t  resvd;
diff -r 63a4066d44d3 -r ce091b038c5c sys/arch/i386/stand/lib/test/biosdisk_user.h
--- a/sys/arch/i386/stand/lib/test/biosdisk_user.h      Tue Mar 30 10:12:01 1999 +0000
+++ b/sys/arch/i386/stand/lib/test/biosdisk_user.h      Tue Mar 30 11:51:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: biosdisk_user.h,v 1.1 1998/05/15 17:07:15 drochner Exp $       */
+/*     $NetBSD: biosdisk_user.h,v 1.2 1999/03/30 11:51:36 drochner Exp $       */
 
 /*
  * Copyright (c) 1998
@@ -41,7 +41,7 @@
 struct emuldisktabentry {
        int biosdev;
        char *name;
-       int spt, heads;
+       int spt, heads, cyls;
 };
 
 extern struct emuldisktabentry emuldisktab[];
@@ -49,10 +49,10 @@
 #if 0
 This is an example:
 struct emuldisktabentry emuldisktab[] = {
-       {0, "/dev/rfd0a", 18, 2},
-       {1, "fdimage", 18, 2},
-       {0x80, "/dev/rwd0d", 100, 4},
-       {0x81, "hdimage", 100, 4},
+       {0, "/dev/rfd0a", 18, 2, 80},
+       {1, "fdimage", 18, 2, 80},
+       {0x80, "/dev/rwd0d", 100, 4, 1000},
+       {0x81, "hdimage", 100, 4, 1000},
        {-1}
 };
 #endif



Home | Main Index | Thread Index | Old Index