From ff2206f6df1fd95c2e5173f7b767e1ef757f69c0 Mon Sep 17 00:00:00 2001 From: simonb Date: Wed, 31 Mar 1999 07:43:39 +0000 Subject: [PATCH] G/C UFS_NOSYMLINK, UFS_NOCLOSE and UFS_NOWRITE and use new LIBSA_NO_FS_*. --- sys/arch/pmax/stand/lib/conf.c | 16 ++++++++-------- sys/arch/pmax/stand/scsiboot/Makefile | 5 +++-- sys/arch/pmax/stand/scsiboot/bootxx.c | 4 ++-- sys/lib/libsa/ufs.c | 12 +----------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/sys/arch/pmax/stand/lib/conf.c b/sys/arch/pmax/stand/lib/conf.c index b33874b5d1e1..1bbe11f67f0b 100644 --- a/sys/arch/pmax/stand/lib/conf.c +++ b/sys/arch/pmax/stand/lib/conf.c @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.11 1999/03/14 00:57:07 simonb Exp $ */ +/* $NetBSD: conf.c,v 1.12 1999/03/31 07:43:39 simonb Exp $ */ /* * Copyright (c) 1992, 1993 @@ -46,13 +46,6 @@ const struct callback *callv = &callvec; -#ifdef UFS_NOCLOSE -#define ufs_close 0 -#endif -#ifdef UFS_NOWRITE -#define ufs_write 0 -#endif - #ifdef SMALL #define rzclose /*(()(struct open_file*))*/0 #define rzioctl /*(()(struct open_file*, u_long, void*))*/0 @@ -66,6 +59,13 @@ struct devsw devsw[] = { int ndevs = (sizeof(devsw)/sizeof(devsw[0])); +#ifdef LIBSA_NO_FS_CLOSE +#define ufs_close 0 +#endif +#ifdef LIBSA_NO_FS_WRITE +#define ufs_write 0 +#endif + struct fs_ops file_system[] = { { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat } }; diff --git a/sys/arch/pmax/stand/scsiboot/Makefile b/sys/arch/pmax/stand/scsiboot/Makefile index c74915aca97b..4a8129d032af 100644 --- a/sys/arch/pmax/stand/scsiboot/Makefile +++ b/sys/arch/pmax/stand/scsiboot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 1999/03/31 07:23:28 simonb Exp $ +# $NetBSD: Makefile,v 1.12 1999/03/31 07:43:39 simonb Exp $ # @(#)Makefile 8.3 (Berkeley) 2/16/94 S= ${.CURDIR}/../../../.. @@ -18,7 +18,8 @@ SRCS+= bcmp.c CLEANFILES+=${PROG}.aout ${PROG}.map mkboot ${ALL} .PATH: ${.CURDIR}/../lib $S/lib/libsa $S/lib/libkern -BOOTDEFADD+=-DBOOTXX -DRELOC=0x${RELOC} -DUFS_NOCLOSE -DUFS_NOSYMLINK \ +BOOTDEFADD+=-DBOOTXX -DRELOC=0x${RELOC} \ + -DLIBSA_NO_FS_CLOSE -DLIBSA_NO_FS_SYMLINK \ -DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET -DLIBSA_NO_TWIDDLE ALL= rzboot bootrz diff --git a/sys/arch/pmax/stand/scsiboot/bootxx.c b/sys/arch/pmax/stand/scsiboot/bootxx.c index 009530b83751..c0432734e90e 100644 --- a/sys/arch/pmax/stand/scsiboot/bootxx.c +++ b/sys/arch/pmax/stand/scsiboot/bootxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.16 1999/03/31 07:23:28 simonb Exp $ */ +/* $NetBSD: bootxx.c,v 1.17 1999/03/31 07:43:39 simonb Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -176,7 +176,7 @@ loadfile(fname) return (ehdr.e_entry); cerr: -#ifndef UFS_NOCLOSE +#ifndef LIBSA_NO_FS_CLOSE (void) close(fd); #endif err: diff --git a/sys/lib/libsa/ufs.c b/sys/lib/libsa/ufs.c index 9d36baff3554..614c353014f9 100644 --- a/sys/lib/libsa/ufs.c +++ b/sys/lib/libsa/ufs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ufs.c,v 1.23 1999/03/31 01:50:26 cgd Exp $ */ +/* $NetBSD: ufs.c,v 1.24 1999/03/31 07:43:39 simonb Exp $ */ /*- * Copyright (c) 1993 @@ -86,16 +86,6 @@ max(a, b) #include "stand.h" #include "ufs.h" -#if defined(UFS_NOSYMLINK) && !defined(LIBSA_NO_FS_SYMLINK) -#define LIBSA_NO_FS_SYMLINK /* XXX COMPAT */ -#endif -#if defined(UFS_NOCLOSE) && !defined(LIBSA_NO_FS_CLOSE) -#define LIBSA_NO_FS_CLOSE /* XXX COMPAT */ -#endif -#if defined(UFS_NOWRITE) && !defined(LIBSA_NO_FS_WRITE) -#define LIBSA_NO_FS_WRITE /* XXX COMPAT */ -#endif - #if defined(LIBSA_FS_SINGLECOMPONENT) && !defined(LIBSA_NO_FS_SYMLINK) #define LIBSA_NO_FS_SYMLINK #endif