Changeset 82650385 in mainline
- Timestamp:
- 2011-03-05T17:11:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3564cdd
- Parents:
- 939b7d2
- Location:
- uspace
- Files:
-
- 7 deleted
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkminix/mkminix.c
r939b7d2 r82650385 48 48 #include <getopt.h> 49 49 #include <mem.h> 50 #include "mfs_const.h" 51 #include "mfs_inode.h" 52 #include "mfs_super.h" 50 #include <fs/minix.h> 53 51 54 52 #define NAME "mkminix" … … 264 262 " valid block size values are 1024, 2048 and 4096 bytes per block\n" 265 263 "-i ## Specify the number of inodes for the filesystem\n" 266 "-l Use 30-char long filenames (V1/V2 only) ");264 "-l Use 30-char long filenames (V1/V2 only)\n"); 267 265 } 268 266 } -
uspace/lib/c/include/fs/minix.h
r939b7d2 r82650385 29 29 /** @addtogroup fs 30 30 * @{ 31 */ 31 */ 32 32 33 #ifndef _M FS_SUPER_H_34 #define _M FS_SUPER_H_33 #ifndef _MINIX_FS_H_ 34 #define _MINIX_FS_H_ 35 35 36 #include "mfs_const.h" 36 #include <sys/types.h> 37 #include <bool.h> 38 39 #define MFS_MAX_BLOCK_SIZE 4096 40 #define MFS_MIN_BLOCK_SIZE 1024 41 42 #define MFS_ROOT_INO 1 43 #define MFS_SUPER_BLOCK 0 44 #define MFS_SUPER_BLOCK_SIZE 1024 45 46 #define V2_NR_DIRECT_ZONES 7 47 #define V2_NR_INDIRECT_ZONES 3 48 49 #define V1_NR_DIRECT_ZONES 7 50 #define V1_NR_INDIRECT_ZONES 2 51 52 #define V1_MAX_NAME_LEN 14 53 #define V1L_MAX_NAME_LEN 30 54 #define V2_MAX_NAME_LEN 14 55 #define V2L_MAX_NAME_LEN 30 56 #define V3_MAX_NAME_LEN 60 37 57 38 58 #define MFS_MAGIC_V1 0x137F … … 108 128 } __attribute__ ((packed)); 109 129 110 typedef enum { 111 MFS_VERSION_V1 = 1, 112 MFS_VERSION_V1L, 113 MFS_VERSION_V2, 114 MFS_VERSION_V2L, 115 MFS_VERSION_V3 116 } mfs_version_t; 130 /*MinixFS V1 inode structure as it is on disk*/ 131 struct mfs_v1_inode { 132 uint16_t i_mode; 133 int16_t i_uid; 134 int32_t i_size; 135 int32_t i_mtime; 136 uint8_t i_gid; 137 uint8_t i_nlinks; 138 /*Block numbers for direct zones*/ 139 uint16_t i_dzone[V1_NR_DIRECT_ZONES]; 140 /*Block numbers for indirect zones*/ 141 uint16_t i_izone[V1_NR_INDIRECT_ZONES]; 142 } __attribute__ ((packed)); 143 144 /*MinixFS V2 inode structure as it is on disk.*/ 145 struct mfs_v2_inode { 146 uint16_t i_mode; 147 uint16_t i_nlinks; 148 int16_t i_uid; 149 uint16_t i_gid; 150 int32_t i_size; 151 int32_t i_atime; 152 int32_t i_mtime; 153 int32_t i_ctime; 154 /*Block numbers for direct zones*/ 155 uint32_t i_dzone[V2_NR_DIRECT_ZONES]; 156 /*Block numbers for indirect zones*/ 157 uint32_t i_izone[V2_NR_INDIRECT_ZONES]; 158 } __attribute__ ((packed)); 159 160 #define mfs_v2_dentry mfs_v1_dentry 161 #define mfs_v1l_dentry mfs_v2l_dentry 162 163 /*MinixFS V1 directory entry on-disk structure*/ 164 struct mfs_v1_dentry { 165 uint16_t d_inum; 166 char d_name[V1_MAX_NAME_LEN]; 167 } __attribute__ ((packed)); 168 169 /*MinixFS V2 with 30-char filenames (Linux variant)*/ 170 struct mfs_v2l_dentry { 171 uint16_t d_inum; 172 char d_name[V2L_MAX_NAME_LEN]; 173 } __attribute__ ((packed)); 174 175 /*MinixFS V3 directory entry on-disk structure*/ 176 struct mfs_v3_dentry { 177 uint32_t d_inum; 178 char d_name[V3_MAX_NAME_LEN]; 179 } __attribute__ ((packed)); 180 117 181 118 182 #endif … … 120 184 /** 121 185 * @} 122 */ 186 */ 187 -
uspace/srv/fs/minixfs/mfs.c
r939b7d2 r82650385 47 47 #include <libfs.h> 48 48 #include "mfs.h" 49 #include "mfs_super.h"50 49 51 50 #define NAME "mfs" -
uspace/srv/fs/minixfs/mfs.h
r939b7d2 r82650385 34 34 #define _MFS_H_ 35 35 36 #include "mfs_const.h"36 #include <fs/minix.h> 37 37 #include "../../vfs/vfs.h" 38 39 typedef enum { 40 MFS_VERSION_V1 = 1, 41 MFS_VERSION_V1L, 42 MFS_VERSION_V2, 43 MFS_VERSION_V2L, 44 MFS_VERSION_V3 45 } mfs_version_t; 38 46 39 47 extern void mfs_mounted(ipc_callid_t rid, ipc_call_t *request); -
uspace/srv/fs/minixfs/mfs_super.c
r939b7d2 r82650385 37 37 #include <str.h> 38 38 #include "mfs.h" 39 #include "mfs_super.h"40 39 #include "mfs_utils.h" 41 40 #include "../../vfs/vfs.h" -
uspace/srv/fs/minixfs/mfs_utils.h
r939b7d2 r82650385 31 31 */ 32 32 33 #include "mfs_const.h" 33 #ifndef _MFS_UTILS_H_ 34 #define _MFS_UTILS_H_ 35 36 #include <sys/types.h> 37 #include <bool.h> 34 38 35 39 uint16_t conv16(bool native, uint16_t n); 36 40 uint32_t conv32(bool native, uint32_t n); 41 42 #endif 37 43 38 44 /**
Note:
See TracChangeset
for help on using the changeset viewer.