summaryrefslogtreecommitdiffstats
path: root/lib/libstand
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-10-06 19:23:57 +0000
committermsmith <msmith@FreeBSD.org>1998-10-06 19:23:57 +0000
commit28bef97c3eada8f5d78d30f575213106f74e2ad2 (patch)
treef4e1dbcd54159aeaaaf9a7cd95aca0733dfdc8a4 /lib/libstand
parent685a5b889f6d81b2b242340f505aceacc862b28e (diff)
downloadFreeBSD-src-28bef97c3eada8f5d78d30f575213106f74e2ad2.zip
FreeBSD-src-28bef97c3eada8f5d78d30f575213106f74e2ad2.tar.gz
Enable the DOS filesystem. This allows reading from various DOS filesystems
(FAT12/16/32, VFAT). Make a private copy of strcasecmp, as the "real" one uses the system ctype header, which introduces locale poisoning.
Diffstat (limited to 'lib/libstand')
-rw-r--r--lib/libstand/Makefile11
-rw-r--r--lib/libstand/dosfs.c4
-rw-r--r--lib/libstand/stand.h4
3 files changed, 9 insertions, 10 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 7e313f5..84e031d 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.4 1998/09/26 01:42:39 msmith Exp $
+# $Id: Makefile,v 1.5 1998/10/04 08:10:29 msmith Exp $
#
# Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
#
@@ -24,19 +24,21 @@ SRCS+= __main.c bcd.c bswap.c environment.c getopt.c gets.c globals.c \
pager.c printf.c strdup.c strerror.c strtol.c random.c sbrk.c \
twiddle.c zalloc.c zalloc_malloc.c
+# private (pruned) versions of libc string functions
+SRCS+= strcasecmp.c
# string functions from libc
.PATH: ${.CURDIR}/../libc/string
.if ${MACHINE_ARCH} == "i386"
SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
- memcpy.c memmove.c memset.c rindex.c strcasecmp.c strcat.c strchr.c \
+ memcpy.c memmove.c memset.c rindex.c strcat.c strchr.c \
strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
.endif
.if ${MACHINE_ARCH} == "alpha"
.PATH: ${.CURDIR}/../libc/alpha/string
SRCS+= bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
- memcpy.S memmove.S memset.c rindex.c strcasecmp.c strcat.c strchr.c \
+ memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \
strcmp.c strcpy.c strcspn.c strlen.c \
strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
strspn.c strstr.c strtok.c swab.c
@@ -107,8 +109,7 @@ SRCS+= bootp.c rarp.c bootparam.c
# boot filesystems
SRCS+= ufs.c nfs.c cd9660.c tftp.c zipfs.c
SRCS+= netif.c nfs.c
-# needs "open directory" support
-#SRCS+= dosfs.c
+SRCS+= dosfs.c
beforeinstall:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/stand.h \
diff --git a/lib/libstand/dosfs.c b/lib/libstand/dosfs.c
index e2d24ee..c68b658 100644
--- a/lib/libstand/dosfs.c
+++ b/lib/libstand/dosfs.c
@@ -39,7 +39,7 @@
#include "dosfs.h"
-static int dos_open(char *path, struct open_file *fd);
+static int dos_open(const char *path, struct open_file *fd);
static int dos_close(struct open_file *fd);
static int dos_read(struct open_file *fd, void *buf, size_t size, size_t *resid);
static off_t dos_seek(struct open_file *fd, off_t offset, int whence);
@@ -185,7 +185,7 @@ dosunmount(DOS_FS *fs)
* Open DOS file
*/
static int
-dos_open(char *path, struct open_file *fd)
+dos_open(const char *path, struct open_file *fd)
{
DOS_DE *de;
DOS_FILE *f;
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index f4940f0..4199fd6 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: stand.h,v 1.5 1998/09/26 01:42:39 msmith Exp $
+ * $Id: stand.h,v 1.6 1998/09/26 10:48:50 dfr Exp $
* From $NetBSD: stand.h,v 1.22 1997/06/26 19:17:40 drochner Exp $
*/
@@ -119,9 +119,7 @@ extern struct fs_ops tftp_fsops;
extern struct fs_ops nfs_fsops;
extern struct fs_ops cd9660_fsops;
extern struct fs_ops zipfs_fsops;
-#ifdef notyet
extern struct fs_ops dosfs_fsops;
-#endif
/* where values for lseek(2) */
#define SEEK_SET 0 /* set file offset to offset */
OpenPOWER on IntegriCloud