Changeset 1433ecda in mainline for uspace/srv/fs
- Timestamp:
- 2018-04-04T15:42:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- Location:
- uspace/srv/fs
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/cdfs/cdfs_endian.h
r47b2d7e3 r1433ecda 37 37 38 38 #if !(defined(__BE__) ^ defined(__LE__)) 39 39 #error The architecture must be either big-endian or little-endian. 40 40 #endif 41 41 -
uspace/srv/fs/exfat/exfat.h
r47b2d7e3 r1433ecda 81 81 uint8_t minor; 82 82 uint8_t major; 83 } __attribute__ 83 } __attribute__((packed)) version; 84 84 uint16_t volume_flags; /* 0x6A volume state flags */ 85 85 uint8_t bytes_per_sector; /* 0x6C sector size as (1 << n) */ -
uspace/srv/fs/exfat/exfat_bitmap.c
r47b2d7e3 r1433ecda 167 167 clst = firstc; 168 168 169 while (clst < firstc + count 169 while (clst < firstc + count) { 170 170 rc = exfat_bitmap_set_cluster(bs, service_id, clst); 171 171 if (rc != EOK) { … … 211 211 endc++; 212 212 } 213 startc = endc +1;213 startc = endc + 1; 214 214 } 215 215 return ENOSPC; … … 229 229 clst = lastc + 1; 230 230 while (exfat_bitmap_is_free(bs, nodep->idx->service_id, clst) == EOK) { 231 if (clst - lastc == count) {231 if (clst - lastc == count) { 232 232 return exfat_bitmap_set_clusters(bs, nodep->idx->service_id, 233 233 lastc + 1, count); -
uspace/srv/fs/exfat/exfat_dentry.h
r47b2d7e3 r1433ecda 64 64 uint16_t label[11]; 65 65 uint8_t _reserved[8]; 66 } __attribute__ 66 } __attribute__((packed)) exfat_vollabel_dentry_t; 67 67 68 68 typedef struct { … … 71 71 uint32_t firstc; 72 72 uint64_t size; 73 } __attribute__ 73 } __attribute__((packed)) exfat_bitmap_dentry_t; 74 74 75 75 typedef struct { … … 79 79 uint32_t firstc; 80 80 uint64_t size; 81 } __attribute__ 81 } __attribute__((packed)) exfat_uctable_dentry_t; 82 82 83 83 typedef struct { … … 87 87 uint8_t guid[16]; 88 88 uint8_t _reserved[10]; 89 } __attribute__ 89 } __attribute__((packed)) exfat_guid_dentry_t; 90 90 91 91 typedef struct { … … 103 103 uint8_t atime_tz; 104 104 uint8_t _reserved2[7]; 105 } __attribute__ 105 } __attribute__((packed)) exfat_file_dentry_t; 106 106 107 107 typedef struct { … … 115 115 uint32_t firstc; 116 116 uint64_t data_size; 117 } __attribute__ 117 } __attribute__((packed)) exfat_stream_dentry_t; 118 118 119 119 typedef struct { 120 120 uint8_t flags; 121 121 uint16_t name[EXFAT_NAME_PART_LEN]; 122 } __attribute__ 122 } __attribute__((packed)) exfat_name_dentry_t; 123 123 124 124 … … 134 134 exfat_name_dentry_t name; 135 135 }; 136 } __attribute__ 136 } __attribute__((packed)) exfat_dentry_t; 137 137 138 138 -
uspace/srv/fs/fat/fat.h
r47b2d7e3 r1433ecda 105 105 /** Boot sector signature. */ 106 106 uint16_t signature; 107 } __attribute__ 107 } __attribute__((packed)); 108 108 struct { 109 109 /* FAT32 only */ … … 136 136 /** Signature. */ 137 137 uint16_t signature; 138 } __attribute__ 138 } __attribute__((packed)) fat32; 139 139 }; 140 } __attribute__ 140 } __attribute__((packed)) fat_bs_t; 141 141 142 142 #define FAT32_FSINFO_SIG1 "RRaA" … … 152 152 uint8_t res2[12]; 153 153 uint8_t sig3[4]; 154 } __attribute__ 154 } __attribute__((packed)) fat32_fsinfo_t; 155 155 156 156 typedef enum { -
uspace/srv/fs/fat/fat_dentry.c
r47b2d7e3 r1433ecda 382 382 { 383 383 wchar_t ch; 384 size_t offset =0;384 size_t offset = 0; 385 385 bool result = true; 386 386 -
uspace/srv/fs/fat/fat_dentry.h
r47b2d7e3 r1433ecda 117 117 uint16_t eaidx; /* FAT12/FAT16 */ 118 118 uint16_t firstc_hi; /* FAT32 */ 119 } __attribute__ 119 } __attribute__((packed)); 120 120 uint16_t mtime; 121 121 uint16_t mdate; … … 123 123 uint16_t firstc; /* FAT12/FAT16 */ 124 124 uint16_t firstc_lo; /* FAT32 */ 125 } __attribute__ 125 } __attribute__((packed)); 126 126 uint32_t size; 127 } __attribute__ 127 } __attribute__((packed)); 128 128 struct { 129 129 uint8_t order; … … 135 135 uint16_t firstc_lo; /* MUST be 0 */ 136 136 uint16_t part3[FAT_LFN_PART3_SIZE]; 137 } __attribute__ 138 } __attribute__ 137 } __attribute__((packed)) lfn; 138 } __attribute__((packed)) fat_dentry_t; 139 139 140 140 extern int fat_dentry_namecmp(char *, const char *); -
uspace/srv/fs/fat/fat_directory.c
r47b2d7e3 r1433ecda 383 383 /* Copy number */ 384 384 size_t offset; 385 if (str_size(name) +str_size(number) + 1 > FAT_NAME_LEN)385 if (str_size(name) + str_size(number) + 1 > FAT_NAME_LEN) 386 386 offset = FAT_NAME_LEN - str_size(number) - 1; 387 387 else -
uspace/srv/fs/udf/udf_file.h
r47b2d7e3 r1433ecda 104 104 uint8_t implementation_use[0]; 105 105 udf_dstring file_id[0]; 106 } __attribute__((packed)) udf_file_identifier_descriptor_t;106 } __attribute__((packed)) udf_file_identifier_descriptor_t; 107 107 108 108 /* ICB tag - Information Control Block (ECMA 167 4/14.6) */ … … 184 184 uint32_t ad_lenght; 185 185 uint8_t allocation_descriptors[0]; 186 } __attribute__((packed)) udf_unallocated_space_entry_descriptor_t;186 } __attribute__((packed)) udf_unallocated_space_entry_descriptor_t; 187 187 188 188 /* Space Bitmap Descriptor format (ECMA 167 4/14.12) */ … … 192 192 uint32_t byts_number; 193 193 uint8_t bitmap[0]; 194 } __attribute__((packed)) udf_space_bitmap_descriptor_t;194 } __attribute__((packed)) udf_space_bitmap_descriptor_t; 195 195 196 196 extern errno_t udf_node_get_core(udf_node_t *);
Note:
See TracChangeset
for help on using the changeset viewer.