Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libsa Add changedisk_hook().



details:   https://anonhg.NetBSD.org/src/rev/2924afea19c7
branches:  trunk
changeset: 515557:2924afea19c7
user:      minoura <minoura%NetBSD.org@localhost>
date:      Fri Sep 28 15:15:24 2001 +0000

description:
Add changedisk_hook().
Machine-dependent code can eject the floppy to prompt the next volume in it.
(Or add another method in devsw?)

diffstat:

 sys/lib/libsa/ustarfs.c |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (37 lines):

diff -r 3d93d0511e60 -r 2924afea19c7 sys/lib/libsa/ustarfs.c
--- a/sys/lib/libsa/ustarfs.c   Fri Sep 28 15:12:01 2001 +0000
+++ b/sys/lib/libsa/ustarfs.c   Fri Sep 28 15:15:24 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ustarfs.c,v 1.15 2000/10/02 23:35:54 lukem Exp $       */
+/*     $NetBSD: ustarfs.c,v 1.16 2001/09/28 15:15:24 minoura Exp $     */
 
 /* [Notice revision 2.2]
  * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -145,6 +145,15 @@
 static int read512block __P((struct open_file *, ustoffs, char block[512]));
 static int init_volzero_sig __P((struct open_file *));
 
+#ifdef HAVE_CHANGEDISK_HOOK
+/*
+ * Called when the next volume is prompted.
+ * Machine dependent code can eject the medium etc.
+ * The new medium must be ready when this hook returns.
+ */
+void changedisk_hook __P((struct open_file *));
+#endif
+
 static int
 convert(f, base, fw)
        const char *f;
@@ -271,7 +280,11 @@
                        printf("remove disk %d, ", havevolume + 1);
                printf("insert disk %d, and press return...",
                        needvolume + 1);
+#ifdef HAVE_CHANGEDISK_HOOK
+               changedisk_hook(f);
+#else
                getchar();
+#endif
                printf("\n");
                e = ustarfs_cylinder_read(f, 0, needvolume != 0);
                if (e)



Home | Main Index | Thread Index | Old Index