Changeset 8ceba1e in mainline for uspace/srv/fs/minixfs/mfs_super.c
- Timestamp:
- 2011-03-09T22:02:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c4c7f5a
- Parents:
- b00a2f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_super.c
rb00a2f2 r8ceba1e 40 40 #include "../../vfs/vfs.h" 41 41 42 static bool check_magic_number(int16_t magic, bool *native, mfs_version_t *version); 42 static bool check_magic_number(uint16_t magic, bool *native, 43 mfs_version_t *version, bool *longfilenames); 43 44 44 45 void mfs_mounted(ipc_callid_t rid, ipc_call_t *request) … … 47 48 enum cache_mode cmode; 48 49 struct mfs3_superblock *sp; 49 bool native ;50 bool native, longnames; 50 51 mfs_version_t version; 51 52 … … 85 86 sp = block_bb_get(devmap_handle); 86 87 87 if (!check_magic_number(sp->s_magic, &native, &version )) {88 if (!check_magic_number(sp->s_magic, &native, &version, &longnames)) { 88 89 /*Magic number is invalid!*/ 89 90 block_fini(devmap_handle); … … 93 94 } 94 95 95 static bool check_magic_number(int16_t magic, bool *native, mfs_version_t *version) 96 static bool check_magic_number(uint16_t magic, bool *native, 97 mfs_version_t *version, bool *longfilenames) 96 98 { 99 *longfilenames = false; 100 97 101 if (magic == MFS_MAGIC_V1 || magic == MFS_MAGIC_V1R) { 98 102 *native = magic == MFS_MAGIC_V1; 99 103 *version = MFS_VERSION_V1; 100 104 return true; 105 } else if (magic == MFS_MAGIC_V1L || magic == MFS_MAGIC_V1LR) { 106 *native = magic == MFS_MAGIC_V1L; 107 *version = MFS_VERSION_V1; 108 *longfilenames = true; 109 return true; 101 110 } else if (magic == MFS_MAGIC_V2 || magic == MFS_MAGIC_V2R) { 102 111 *native = magic == MFS_MAGIC_V2; 103 112 *version = MFS_VERSION_V2; 113 return true; 114 } else if (magic == MFS_MAGIC_V2L || magic == MFS_MAGIC_V2LR) { 115 *native = magic == MFS_MAGIC_V2L; 116 *version = MFS_VERSION_V2; 117 *longfilenames = true; 104 118 return true; 105 119 } else if (magic == MFS_MAGIC_V3 || magic == MFS_MAGIC_V3R) {
Note:
See TracChangeset
for help on using the changeset viewer.