dosfs.c (46079) | dosfs.c (59766) |
---|---|
1/* 2 * Copyright (c) 1996, 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY 19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 21 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 23 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 25 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 1/* 2 * Copyright (c) 1996, 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY 19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 21 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 23 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 25 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 * 27 * $FreeBSD: head/lib/libstand/dosfs.c 59766 2000-04-29 20:47:10Z jlemon $ |
|
26 */ 27 28/* 29 * Readonly filesystem for Microsoft FAT12/FAT16/FAT32 filesystems, 30 * also supports VFAT. 31 */ 32 33#include <sys/types.h> --- 7 unchanged lines hidden (view full) --- 41 42static int dos_open(const char *path, struct open_file *fd); 43static int dos_close(struct open_file *fd); 44static int dos_read(struct open_file *fd, void *buf, size_t size, size_t *resid); 45static off_t dos_seek(struct open_file *fd, off_t offset, int whence); 46static int dos_stat(struct open_file *fd, struct stat *sb); 47 48struct fs_ops dosfs_fsops = { | 28 */ 29 30/* 31 * Readonly filesystem for Microsoft FAT12/FAT16/FAT32 filesystems, 32 * also supports VFAT. 33 */ 34 35#include <sys/types.h> --- 7 unchanged lines hidden (view full) --- 43 44static int dos_open(const char *path, struct open_file *fd); 45static int dos_close(struct open_file *fd); 46static int dos_read(struct open_file *fd, void *buf, size_t size, size_t *resid); 47static off_t dos_seek(struct open_file *fd, off_t offset, int whence); 48static int dos_stat(struct open_file *fd, struct stat *sb); 49 50struct fs_ops dosfs_fsops = { |
49 "dosfs", dos_open, dos_close, dos_read, null_write, dos_seek, dos_stat | 51 "dosfs", 52 dos_open, 53 dos_close, 54 dos_read, 55 null_write, 56 dos_seek, 57 dos_stat, 58 null_readdir |
50}; 51 52#define SECSIZ 512 /* sector size */ 53#define SSHIFT 9 /* SECSIZ shift */ 54#define DEPSEC 16 /* directory entries per sector */ 55#define DSHIFT 4 /* DEPSEC shift */ 56#define LOCLUS 2 /* lowest cluster number */ 57 --- 638 unchanged lines hidden --- | 59}; 60 61#define SECSIZ 512 /* sector size */ 62#define SSHIFT 9 /* SECSIZ shift */ 63#define DEPSEC 16 /* directory entries per sector */ 64#define DSHIFT 4 /* DEPSEC shift */ 65#define LOCLUS 2 /* lowest cluster number */ 66 --- 638 unchanged lines hidden --- |