Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/acorn26/stand/lib Add support for LIBSA_NO_FS_CLOSE...



details:   https://anonhg.NetBSD.org/src/rev/ad8b758e2d27
branches:  trunk
changeset: 531889:ad8b758e2d27
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Tue May 28 14:38:55 2002 +0000

description:
Add support for LIBSA_NO_FS_CLOSE, LIBSA_NO_FS_WRITE, LIBSA_NO_FS_SEEK and
LIBSA_NO_TWIDDLE.
LIBSA_NO_FS_SYMLINK is irrelevant here, and LIBSA_FS_SINGLECOMPONENT would
be pointless.

diffstat:

 sys/arch/acorn26/stand/lib/riscosfile.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (73 lines):

diff -r 93f7dd34d14c -r ad8b758e2d27 sys/arch/acorn26/stand/lib/riscosfile.c
--- a/sys/arch/acorn26/stand/lib/riscosfile.c   Tue May 28 14:30:53 2002 +0000
+++ b/sys/arch/acorn26/stand/lib/riscosfile.c   Tue May 28 14:38:55 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: riscosfile.c,v 1.1 2002/03/24 15:47:28 bjh21 Exp $     */
+/*     $NetBSD: riscosfile.c,v 1.2 2002/05/28 14:38:55 bjh21 Exp $     */
 
 /*-
  * Copyright (c) 2001 Ben Harris
@@ -72,6 +72,7 @@
        return 0;
 }
 
+#ifndef LIBSA_NO_FS_CLOSE
 int
 riscos_close(struct open_file *f)
 {
@@ -87,6 +88,7 @@
        free(rf, sizeof(*rf));
        return err;
 }
+#endif
 
 int
 riscos_read(struct open_file *f, void *buf, size_t size, size_t *residp)
@@ -97,7 +99,9 @@
 
        rf = f->f_fsdata;
 
+#ifndef LIBSA_NO_TWIDDLE
        twiddle();
+#endif
        error = xosgbpb_read(rf->file, buf, size, &resid);
        *residp = resid;
        if (error)
@@ -105,6 +109,7 @@
        return 0;
 }
 
+#ifndef LIBSA_NO_FS_WRITE
 int
 riscos_write(struct open_file *f, void *buf, size_t size, size_t *residp)
 {
@@ -114,13 +119,16 @@
 
        rf = f->f_fsdata;
 
+#ifndef LIBSA_NO_TWIDDLE
        twiddle();
+#endif
        error = xosgbpb_write(rf->file, buf, size, &resid);
        *residp = resid;
        if (error)
                return riscos_errno(error);
        return 0;
 }
+#endif
 
 int
 riscos_stat(struct open_file *f, struct stat *sb)
@@ -143,6 +151,7 @@
        return 0;
 }
 
+#ifndef LIBSA_NO_FS_SEEK
 off_t
 riscos_seek(struct open_file *f, off_t offset, int where)
 {
@@ -183,3 +192,4 @@
        errno = riscos_errno(error);
        return -1;
 }
+#endif



Home | Main Index | Thread Index | Old Index