UbixOS V2 2.0

msdos_fs.h
Go to the documentation of this file.
1 /*-
2 * Copyright (c) 2002-2018 The UbixOS Project.
3 * All rights reserved.
4 *
5 * This was developed by Christopher W. Olsen for the UbixOS Project.
6 *
7 * Redistribution and use in source and binary forms, with or without modification, are permitted
8 * provided that the following conditions are met:
9 *
10 * 1) Redistributions of source code must retain the above copyright notice, this list of
11 * conditions, the following disclaimer and the list of authors.
12 * 2) Redistributions in binary form must reproduce the above copyright notice, this list of
13 * conditions, the following disclaimer and the list of authors in the documentation and/or
14 * other materials provided with the distribution.
15 * 3) Neither the name of the UbixOS Project nor the names of its contributors may be used to
16 * endorse or promote products derived from this software without specific prior written
17 * permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 #ifndef _FS_MSDOS_FS_H
29 #define _FS_MSDOS_FS_H
30
31 /*
32 * MS-DOS file system in-core superblock data
33 */
34
35 struct msdos_sb_info {
36 unsigned short cluster_size; /* sectors/cluster */
37 unsigned char fats, fat_bits; /* number of FATs, FAT bits (12 or 16) */
38 unsigned short fat_start, fat_length; /* FAT start & length (sec.) */
39 unsigned short dir_start, dir_entries; /* root dir start & entries */
40 unsigned short data_start; /* first data sector */
41 unsigned long clusters; /* number of clusters */
42 uid_t fs_uid;
43 gid_t fs_gid;
44 int quiet; /* fake successful chmods and chowns */
45 unsigned short fs_umask;
46 unsigned char name_check; /* r = relaxed, n = normal, s = strict */
47 unsigned char conversion; /* b = binary, t = text, a = auto */
48 struct wait_queue *fat_wait;
49 int fat_lock;
50 int prev_free; /* previously returned free cluster number */
51 int free_clusters; /* -1 if undefined */
52 };
53
54 /*
55 * MS-DOS file system inode data in memory
56 */
57
58 struct msdos_inode_info {
59 int i_start; /* first cluster or 0 */
60 int i_attrs; /* unused attribute bits */
61 int i_busy; /* file is either deleted but still open, or
62 inconsistent (mkdir) */
63 struct inode *i_depend; /* pointer to inode that depends on the
64 current inode */
65 struct inode *i_old; /* pointer to the old inode this inode
66 depends on */
67 int i_binary; /* file contains non-text data */
68 };
69
70 #endif
gid_t
__gid_t gid_t
Definition: types.h:123
msdos_sb_info::data_start
unsigned short data_start
Definition: msdos_fs.h:40
msdos_sb_info::fats
unsigned char fats
Definition: msdos_fs.h:37
msdos_sb_info::fat_lock
int fat_lock
Definition: msdos_fs.h:49
msdos_sb_info::clusters
unsigned long clusters
Definition: msdos_fs.h:41
msdos_inode_info::i_busy
int i_busy
Definition: msdos_fs.h:61
msdos_sb_info::fat_length
unsigned short fat_length
Definition: msdos_fs.h:38
msdos_sb_info::free_clusters
int free_clusters
Definition: msdos_fs.h:51
msdos_sb_info::quiet
int quiet
Definition: msdos_fs.h:44
msdos_inode_info::i_start
int i_start
Definition: msdos_fs.h:59
inode
Definition: inode.h:39
msdos_sb_info::dir_start
unsigned short dir_start
Definition: msdos_fs.h:39
msdos_inode_info
Definition: msdos_fs.h:58
msdos_sb_info::fat_start
unsigned short fat_start
Definition: msdos_fs.h:38
msdos_sb_info::fs_uid
uid_t fs_uid
Definition: msdos_fs.h:42
msdos_sb_info::conversion
unsigned char conversion
Definition: msdos_fs.h:47
msdos_sb_info::cluster_size
unsigned short cluster_size
Definition: msdos_fs.h:36
msdos_sb_info::fat_bits
unsigned char fat_bits
Definition: msdos_fs.h:37
msdos_sb_info::name_check
unsigned char name_check
Definition: msdos_fs.h:46
msdos_inode_info::i_attrs
int i_attrs
Definition: msdos_fs.h:60
msdos_sb_info::prev_free
int prev_free
Definition: msdos_fs.h:50
msdos_sb_info
Definition: msdos_fs.h:35
msdos_inode_info::i_binary
int i_binary
Definition: msdos_fs.h:67
msdos_sb_info::dir_entries
unsigned short dir_entries
Definition: msdos_fs.h:39
msdos_sb_info::fat_wait
struct wait_queue * fat_wait
Definition: msdos_fs.h:48
msdos_inode_info::i_depend
struct inode * i_depend
Definition: msdos_fs.h:63
uid_t
__uid_t uid_t
Definition: types.h:122
wait_queue
Definition: wait.h:34
msdos_sb_info::fs_umask
unsigned short fs_umask
Definition: msdos_fs.h:45
msdos_sb_info::fs_gid
gid_t fs_gid
Definition: msdos_fs.h:43
msdos_inode_info::i_old
struct inode * i_old
Definition: msdos_fs.h:65