Changeset 57640e7 in mainline
- Timestamp:
- 2011-03-02T19:26:54Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 954bf385
- Parents:
- 9a9a58e
- Location:
- uspace/srv/fs/minixfs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_super.c
r9a9a58e r57640e7 95 95 static bool check_magic_number(int16_t magic, bool *native, mfs_version_t *version) 96 96 { 97 *native = true; 98 99 repeat_check: 100 101 switch (*native ? magic : conv16(false, magic)) { 102 case MFS_MAGIC_V1: 97 if (magic == MFS_MAGIC_V1 || magic == MFS_MAGIC_V1R) { 98 *native = magic == MFS_MAGIC_V1; 103 99 *version = MFS_VERSION_V1; 104 100 return true; 105 case MFS_MAGIC_V2: 101 } else if (magic == MFS_MAGIC_V2 || magic == MFS_MAGIC_V2R) { 102 *native = magic == MFS_MAGIC_V2; 106 103 *version = MFS_VERSION_V2; 107 104 return true; 108 case MFS_MAGIC_V3: 105 } else if (magic == MFS_MAGIC_V3 || magic == MFS_MAGIC_V3R) { 106 *native = magic == MFS_MAGIC_V3; 109 107 *version = MFS_VERSION_V3; 110 108 return true; 111 default:112 ;113 109 } 114 110 115 if (*native) {116 *native = false;117 goto repeat_check;118 } else {119 return false;120 }121 122 /*Should never happens*/123 111 return false; 124 112 } -
uspace/srv/fs/minixfs/mfs_super.h
r9a9a58e r57640e7 38 38 39 39 #define MFS_MAGIC_V1 0x137F 40 #define MFS_MAGIC_V1R 0x7F13 41 40 42 #define MFS_MAGIC_V2 0x2468 43 #define MFS_MAGIC_V2R 0x6824 44 41 45 #define MFS_MAGIC_V3 0x4D5A 46 #define MFS_MAGIC_V3R 0x5A4D 42 47 43 48 struct mfs_superblock {
Note:
See TracChangeset
for help on using the changeset viewer.