Changeset f3504c1 in mainline
- Timestamp:
- 2017-07-11T19:05:33Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 94c05b89
- Parents:
- b2906c0
- Location:
- uspace
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fdisk/fdisk.c
rb2906c0 rf3504c1 520 520 /* Ask for volume label */ 521 521 printf("Enter volume label for new partition.\n"); 522 rc = tinput_read_i(tinput, "N o name", &label);522 rc = tinput_read_i(tinput, "New volume", &label); 523 523 if (rc != EOK) 524 524 goto error; -
uspace/app/mkexfat/exfat.h
rb2906c0 rf3504c1 37 37 #define EXFAT_FILENAME_LEN 255 38 38 #define EXFAT_NAME_PART_LEN 15 39 #define EXFAT_VOLLABEL_LEN 11 39 40 40 41 #define EXFAT_TYPE_UNUSED 0x00 -
uspace/app/mkexfat/mkexfat.c
rb2906c0 rf3504c1 101 101 size_t sector_size; 102 102 size_t cluster_size; 103 const char *label; 103 104 } exfat_cfg_t; 104 105 105 106 106 static unsigned log2(unsigned n); … … 126 126 {"cluster-size", required_argument, 0, 'c'}, 127 127 {"fs-size", required_argument, 0, 's'}, 128 {"label", required_argument, 0, 'L' }, 128 129 }; 129 130 … … 132 133 printf("Usage: mkexfat [options] <device>\n" 133 134 "-c, --cluster-size ## Specify the cluster size (Kb)\n" 134 "-s, --fs-size ## Specify the filesystem size (sectors)\n"); 135 "-s, --fs-size ## Specify the filesystem size (sectors)\n" 136 " --label ## Volume label\n"); 135 137 } 136 138 … … 597 599 exfat_dentry_t *d; 598 600 aoff64_t rootdir_sec; 601 uint16_t wlabel[EXFAT_VOLLABEL_LEN + 1]; 599 602 int rc; 600 603 uint8_t *data; … … 608 611 609 612 /* Initialize the volume label dentry */ 610 d->type = EXFAT_TYPE_VOLLABEL; 611 str_to_utf16(d->vollabel.label, 8, "HELENOS "); 612 d->vollabel.size = 8; 613 614 d++; 613 614 if (cfg->label != NULL) { 615 memset(wlabel, 0, (EXFAT_VOLLABEL_LEN + 1) * sizeof(uint16_t)); 616 rc = str_to_utf16(wlabel, EXFAT_VOLLABEL_LEN + 1, cfg->label); 617 if (rc != EOK) { 618 rc = EINVAL; 619 goto exit; 620 } 621 622 d->type = EXFAT_TYPE_VOLLABEL; 623 memcpy(d->vollabel.label, wlabel, EXFAT_VOLLABEL_LEN * 2); 624 d->vollabel.size = utf16_wsize(wlabel); 625 assert(d->vollabel.size <= EXFAT_VOLLABEL_LEN); 626 627 d++; 628 } else { 629 d->type = EXFAT_TYPE_VOLLABEL & ~EXFAT_TYPE_USED; 630 } 615 631 616 632 /* Initialize the allocation bitmap dentry */ … … 751 767 752 768 cfg.cluster_size = 0; 769 cfg.label = NULL; 753 770 754 771 for (c = 0, optind = 0, opt_ind = 0; c != -1;) { 755 c = getopt_long(argc, argv, "hs:c: ",772 c = getopt_long(argc, argv, "hs:c:L:", 756 773 long_options, &opt_ind); 757 774 switch (c) { … … 781 798 } 782 799 break; 800 case 'L': 801 cfg.label = optarg; 802 break; 783 803 } 784 804 } -
uspace/srv/fs/exfat/exfat_dentry.c
rb2906c0 rf3504c1 90 90 void exfat_dentry_get_name(const exfat_name_dentry_t *name, size_t size, uint16_t *dst, size_t *offset) 91 91 { 92 size_t i = 0; 92 size_t i = 0; 93 93 while (i < EXFAT_NAME_PART_LEN && *offset < size) { 94 94 dst[*offset] = uint16_t_le2host(name->name[i]); … … 97 97 } 98 98 dst[*offset] = '\0'; 99 } 100 101 void exfat_dentry_get_vollabel(const exfat_vollabel_dentry_t *vollabel, 102 size_t size, uint16_t *dst) 103 { 104 size_t i = 0; 105 while (i < EXFAT_VOLLABEL_LEN && i < vollabel->size && i < size) { 106 dst[i] = uint16_t_le2host(vollabel->label[i]); 107 i++; 108 } 109 dst[i] = '\0'; 99 110 } 100 111 -
uspace/srv/fs/exfat/exfat_dentry.h
rb2906c0 rf3504c1 40 40 #define EXFAT_FILENAME_LEN 255 41 41 #define EXFAT_NAME_PART_LEN 15 42 #define EXFAT_VOLLABEL_LEN 11 42 43 43 44 #define EXFAT_TYPE_UNUSED 0x00 … … 156 157 extern void exfat_dentry_get_name(const exfat_name_dentry_t *, size_t, 157 158 uint16_t *, size_t *); 158 159 extern void exfat_dentry_get_vollabel(const exfat_vollabel_dentry_t *, size_t, 160 uint16_t *); 159 161 160 162 extern bool exfat_valid_char(wchar_t); 161 163 extern bool exfat_valid_name(const char *); 164 165 extern size_t exfat_utf16_length(const uint16_t *); 166 162 167 163 168 #endif -
uspace/srv/fs/exfat/exfat_directory.c
rb2906c0 rf3504c1 260 260 } 261 261 262 int exfat_directory_read_vollabel(exfat_directory_t *di, char *label, 263 size_t size) 264 { 265 uint16_t wlabel[EXFAT_VOLLABEL_LEN + 1]; 266 exfat_dentry_t *d = NULL; 267 int rc; 268 aoff64_t start_pos = 0; 269 270 start_pos = di->pos; 271 272 rc = exfat_directory_seek(di, 0); 273 if (rc != EOK) 274 return rc; 275 276 rc = exfat_directory_find(di, EXFAT_DENTRY_VOLLABEL, &d); 277 if (rc != EOK) 278 return rc; 279 280 exfat_dentry_get_vollabel(&d->vollabel, EXFAT_VOLLABEL_LEN, wlabel); 281 282 rc = utf16_to_str(label, size, wlabel); 283 if (rc != EOK) 284 return rc; 285 286 exfat_directory_seek(di, start_pos); 287 return EOK; 288 } 289 262 290 static uint16_t exfat_directory_set_checksum(const uint8_t *bytes, size_t count) 263 291 { -
uspace/srv/fs/exfat/exfat_directory.h
rb2906c0 rf3504c1 71 71 extern int exfat_directory_read_file(exfat_directory_t *, char *, size_t, 72 72 exfat_file_dentry_t *, exfat_stream_dentry_t *); 73 extern int exfat_directory_read_vollabel(exfat_directory_t *, char *, size_t); 73 74 extern int exfat_directory_sync_file(exfat_directory_t *, exfat_file_dentry_t *, 74 75 exfat_stream_dentry_t *); 75 76 extern int exfat_directory_write_file(exfat_directory_t *, const char *); 76 77 extern int exfat_directory_erase_file(exfat_directory_t *, aoff64_t); 78 77 79 78 80 extern int exfat_directory_expand(exfat_directory_t *); -
uspace/srv/fs/exfat/exfat_ops.c
rb2906c0 rf3504c1 1013 1013 }; 1014 1014 1015 static int exfat_fs_open(service_id_t service_id, enum cache_mode cmode, 1016 fs_node_t **rrfn, exfat_idx_t **rridxp, vfs_fs_probe_info_t *info) 1017 { 1018 int rc; 1019 exfat_node_t *rootp = NULL, *bitmapp = NULL, *uctablep = NULL; 1020 exfat_bs_t *bs; 1021 1022 /* initialize libblock */ 1023 rc = block_init(service_id, BS_SIZE); 1024 if (rc != EOK) 1025 return rc; 1026 1027 /* prepare the boot block */ 1028 rc = block_bb_read(service_id, BS_BLOCK); 1029 if (rc != EOK) { 1030 block_fini(service_id); 1031 return rc; 1032 } 1033 1034 /* get the buffer with the boot sector */ 1035 bs = block_bb_get(service_id); 1036 1037 /* Do some simple sanity checks on the file system. */ 1038 rc = exfat_sanity_check(bs); 1039 if (rc != EOK) { 1040 (void) block_cache_fini(service_id); 1041 block_fini(service_id); 1042 return rc; 1043 } 1044 1045 /* Initialize the block cache */ 1046 rc = block_cache_init(service_id, BPS(bs), 0 /* XXX */, cmode); 1047 if (rc != EOK) { 1048 block_fini(service_id); 1049 return rc; 1050 } 1051 1052 rc = exfat_idx_init_by_service_id(service_id); 1053 if (rc != EOK) { 1054 (void) block_cache_fini(service_id); 1055 block_fini(service_id); 1056 return rc; 1057 } 1058 1059 /* Initialize the root node. */ 1060 rc = exfat_node_get_new_by_pos(&rootp, service_id, EXFAT_ROOT_PAR, 1061 EXFAT_ROOT_POS); 1062 if (rc!=EOK) { 1063 (void) block_cache_fini(service_id); 1064 block_fini(service_id); 1065 exfat_idx_fini_by_service_id(service_id); 1066 return ENOMEM; 1067 } 1068 assert(rootp->idx->index == EXFAT_ROOT_IDX); 1069 1070 rootp->type = EXFAT_DIRECTORY; 1071 rootp->firstc = ROOT_FC(bs); 1072 rootp->fragmented = true; 1073 rootp->refcnt = 1; 1074 rootp->lnkcnt = 0; /* FS root is not linked */ 1075 1076 uint32_t clusters; 1077 rc = exfat_clusters_get(&clusters, bs, service_id, rootp->firstc); 1078 if (rc != EOK) { 1079 free(rootp); 1080 (void) block_cache_fini(service_id); 1081 block_fini(service_id); 1082 exfat_idx_fini_by_service_id(service_id); 1083 return ENOTSUP; 1084 } 1085 rootp->size = BPS(bs) * SPC(bs) * clusters; 1086 fibril_mutex_unlock(&rootp->idx->lock); 1087 1088 /* Open root directory and looking for Bitmap and UC-Table */ 1089 exfat_directory_t di; 1090 exfat_dentry_t *de; 1091 rc = exfat_directory_open(rootp, &di); 1092 if (rc != EOK) { 1093 free(rootp); 1094 (void) block_cache_fini(service_id); 1095 block_fini(service_id); 1096 exfat_idx_fini_by_service_id(service_id); 1097 return ENOTSUP; 1098 } 1099 1100 /* Initialize the bitmap node. */ 1101 rc = exfat_directory_find(&di, EXFAT_DENTRY_BITMAP, &de); 1102 if (rc != EOK) { 1103 free(rootp); 1104 (void) block_cache_fini(service_id); 1105 block_fini(service_id); 1106 exfat_idx_fini_by_service_id(service_id); 1107 return ENOTSUP; 1108 } 1109 1110 rc = exfat_node_get_new_by_pos(&bitmapp, service_id, rootp->firstc, 1111 di.pos); 1112 if (rc != EOK) { 1113 free(rootp); 1114 (void) block_cache_fini(service_id); 1115 block_fini(service_id); 1116 exfat_idx_fini_by_service_id(service_id); 1117 return ENOMEM; 1118 } 1119 assert(bitmapp->idx->index == EXFAT_BITMAP_IDX); 1120 fibril_mutex_unlock(&bitmapp->idx->lock); 1121 1122 bitmapp->type = EXFAT_BITMAP; 1123 bitmapp->firstc = uint32_t_le2host(de->bitmap.firstc); 1124 bitmapp->fragmented = true; 1125 bitmapp->idx->parent_fragmented = true; 1126 bitmapp->refcnt = 1; 1127 bitmapp->lnkcnt = 0; 1128 bitmapp->size = uint64_t_le2host(de->bitmap.size); 1129 1130 /* Initialize the uctable node. */ 1131 rc = exfat_directory_seek(&di, 0); 1132 if (rc != EOK) { 1133 free(rootp); 1134 free(bitmapp); 1135 (void) block_cache_fini(service_id); 1136 block_fini(service_id); 1137 exfat_idx_fini_by_service_id(service_id); 1138 return ENOTSUP; 1139 } 1140 1141 rc = exfat_directory_find(&di, EXFAT_DENTRY_UCTABLE, &de); 1142 if (rc != EOK) { 1143 free(rootp); 1144 free(bitmapp); 1145 (void) block_cache_fini(service_id); 1146 block_fini(service_id); 1147 exfat_idx_fini_by_service_id(service_id); 1148 return ENOTSUP; 1149 } 1150 1151 rc = exfat_node_get_new_by_pos(&uctablep, service_id, rootp->firstc, 1152 di.pos); 1153 if (rc != EOK) { 1154 free(rootp); 1155 free(bitmapp); 1156 (void) block_cache_fini(service_id); 1157 block_fini(service_id); 1158 exfat_idx_fini_by_service_id(service_id); 1159 return ENOMEM; 1160 } 1161 assert(uctablep->idx->index == EXFAT_UCTABLE_IDX); 1162 fibril_mutex_unlock(&uctablep->idx->lock); 1163 1164 uctablep->type = EXFAT_UCTABLE; 1165 uctablep->firstc = uint32_t_le2host(de->uctable.firstc); 1166 uctablep->fragmented = true; 1167 uctablep->idx->parent_fragmented = true; 1168 uctablep->refcnt = 1; 1169 uctablep->lnkcnt = 0; 1170 uctablep->size = uint64_t_le2host(de->uctable.size); 1171 1172 if (info != NULL) { 1173 /* Read volume label. */ 1174 rc = exfat_directory_read_vollabel(&di, info->label, 1175 FS_LABEL_MAXLEN + 1); 1176 if (rc != EOK) { 1177 free(rootp); 1178 free(bitmapp); 1179 free(uctablep); 1180 (void) block_cache_fini(service_id); 1181 block_fini(service_id); 1182 exfat_idx_fini_by_service_id(service_id); 1183 return ENOTSUP; 1184 } 1185 } 1186 1187 rc = exfat_directory_close(&di); 1188 if (rc != EOK) { 1189 free(rootp); 1190 free(bitmapp); 1191 free(uctablep); 1192 (void) block_cache_fini(service_id); 1193 block_fini(service_id); 1194 exfat_idx_fini_by_service_id(service_id); 1195 return ENOMEM; 1196 } 1197 1198 /* exfat_fsinfo(bs, service_id); */ 1199 1200 *rrfn = FS_NODE(rootp); 1201 *rridxp = rootp->idx; 1202 1203 if (info != NULL) { 1204 // str_cpy(info->label, FS_LABEL_MAXLEN + 1, label); 1205 } 1206 1207 return EOK; 1208 } 1209 1210 static void exfat_fs_close(service_id_t service_id, fs_node_t *rfn) 1211 { 1212 /* 1213 * Put the root node and force it to the FAT free node list. 1214 */ 1215 (void) exfat_node_put(rfn); 1216 (void) exfat_node_put(rfn); 1217 1218 /* 1219 * Perform cleanup of the node structures, index structures and 1220 * associated data. Write back this file system's dirty blocks and 1221 * stop using libblock for this instance. 1222 */ 1223 (void) exfat_node_fini_by_service_id(service_id); 1224 exfat_idx_fini_by_service_id(service_id); 1225 (void) block_cache_fini(service_id); 1226 block_fini(service_id); 1227 } 1228 1015 1229 1016 1230 /* … … 1054 1268 { 1055 1269 int rc; 1056 exfat_bs_t *bs; 1057 1058 /* initialize libblock */ 1059 rc = block_init(service_id, BS_SIZE); 1060 if (rc != EOK) 1061 return rc; 1062 1063 /* prepare the boot block */ 1064 rc = block_bb_read(service_id, BS_BLOCK); 1065 if (rc != EOK) { 1066 block_fini(service_id); 1067 return rc; 1068 } 1069 1070 /* get the buffer with the boot sector */ 1071 bs = block_bb_get(service_id); 1072 1073 /* Do some simple sanity checks on the file system. */ 1074 rc = exfat_sanity_check(bs); 1075 1076 (void) block_cache_fini(service_id); 1077 block_fini(service_id); 1078 return rc; 1270 exfat_idx_t *ridxp; 1271 fs_node_t *rfn; 1272 1273 rc = exfat_fs_open(service_id, CACHE_MODE_WT, &rfn, &ridxp, info); 1274 if (rc != EOK) 1275 return rc; 1276 1277 exfat_fs_close(service_id, rfn); 1278 return EOK; 1079 1279 } 1080 1280 … … 1084 1284 { 1085 1285 int rc; 1086 exfat_node_t *rootp = NULL, *bitmapp = NULL, *uctablep = NULL;1087 1286 enum cache_mode cmode; 1088 exfat_bs_t *bs; 1287 exfat_idx_t *ridxp; 1288 fs_node_t *rfn; 1089 1289 1090 1290 /* Check for option enabling write through. */ … … 1094 1294 cmode = CACHE_MODE_WB; 1095 1295 1096 /* initialize libblock */ 1097 rc = block_init(service_id, BS_SIZE); 1098 if (rc != EOK) 1099 return rc; 1100 1101 /* prepare the boot block */ 1102 rc = block_bb_read(service_id, BS_BLOCK); 1103 if (rc != EOK) { 1104 block_fini(service_id); 1105 return rc; 1106 } 1107 1108 /* get the buffer with the boot sector */ 1109 bs = block_bb_get(service_id); 1110 1111 /* Do some simple sanity checks on the file system. */ 1112 rc = exfat_sanity_check(bs); 1113 if (rc != EOK) { 1114 (void) block_cache_fini(service_id); 1115 block_fini(service_id); 1116 return rc; 1117 } 1118 1119 /* Initialize the block cache */ 1120 rc = block_cache_init(service_id, BPS(bs), 0 /* XXX */, cmode); 1121 if (rc != EOK) { 1122 block_fini(service_id); 1123 return rc; 1124 } 1125 1126 rc = exfat_idx_init_by_service_id(service_id); 1127 if (rc != EOK) { 1128 (void) block_cache_fini(service_id); 1129 block_fini(service_id); 1130 return rc; 1131 } 1132 1133 /* Initialize the root node. */ 1134 rc = exfat_node_get_new_by_pos(&rootp, service_id, EXFAT_ROOT_PAR, 1135 EXFAT_ROOT_POS); 1136 if (rc!=EOK) { 1137 (void) block_cache_fini(service_id); 1138 block_fini(service_id); 1139 exfat_idx_fini_by_service_id(service_id); 1140 return ENOMEM; 1141 } 1142 assert(rootp->idx->index == EXFAT_ROOT_IDX); 1143 1144 rootp->type = EXFAT_DIRECTORY; 1145 rootp->firstc = ROOT_FC(bs); 1146 rootp->fragmented = true; 1147 rootp->refcnt = 1; 1148 rootp->lnkcnt = 0; /* FS root is not linked */ 1149 1150 uint32_t clusters; 1151 rc = exfat_clusters_get(&clusters, bs, service_id, rootp->firstc); 1152 if (rc != EOK) { 1153 free(rootp); 1154 (void) block_cache_fini(service_id); 1155 block_fini(service_id); 1156 exfat_idx_fini_by_service_id(service_id); 1157 return ENOTSUP; 1158 } 1159 rootp->size = BPS(bs) * SPC(bs) * clusters; 1160 fibril_mutex_unlock(&rootp->idx->lock); 1161 1162 /* Open root directory and looking for Bitmap and UC-Table */ 1163 exfat_directory_t di; 1164 exfat_dentry_t *de; 1165 rc = exfat_directory_open(rootp, &di); 1166 if (rc != EOK) { 1167 free(rootp); 1168 (void) block_cache_fini(service_id); 1169 block_fini(service_id); 1170 exfat_idx_fini_by_service_id(service_id); 1171 return ENOTSUP; 1172 } 1173 1174 /* Initialize the bitmap node. */ 1175 rc = exfat_directory_find(&di, EXFAT_DENTRY_BITMAP, &de); 1176 if (rc != EOK) { 1177 free(rootp); 1178 (void) block_cache_fini(service_id); 1179 block_fini(service_id); 1180 exfat_idx_fini_by_service_id(service_id); 1181 return ENOTSUP; 1182 } 1183 1184 rc = exfat_node_get_new_by_pos(&bitmapp, service_id, rootp->firstc, 1185 di.pos); 1186 if (rc != EOK) { 1187 free(rootp); 1188 (void) block_cache_fini(service_id); 1189 block_fini(service_id); 1190 exfat_idx_fini_by_service_id(service_id); 1191 return ENOMEM; 1192 } 1193 assert(bitmapp->idx->index == EXFAT_BITMAP_IDX); 1194 fibril_mutex_unlock(&bitmapp->idx->lock); 1195 1196 bitmapp->type = EXFAT_BITMAP; 1197 bitmapp->firstc = uint32_t_le2host(de->bitmap.firstc); 1198 bitmapp->fragmented = true; 1199 bitmapp->idx->parent_fragmented = true; 1200 bitmapp->refcnt = 1; 1201 bitmapp->lnkcnt = 0; 1202 bitmapp->size = uint64_t_le2host(de->bitmap.size); 1203 1204 /* Initialize the uctable node. */ 1205 rc = exfat_directory_seek(&di, 0); 1206 if (rc != EOK) { 1207 free(rootp); 1208 free(bitmapp); 1209 (void) block_cache_fini(service_id); 1210 block_fini(service_id); 1211 exfat_idx_fini_by_service_id(service_id); 1212 return ENOTSUP; 1213 } 1214 1215 rc = exfat_directory_find(&di, EXFAT_DENTRY_UCTABLE, &de); 1216 if (rc != EOK) { 1217 free(rootp); 1218 free(bitmapp); 1219 (void) block_cache_fini(service_id); 1220 block_fini(service_id); 1221 exfat_idx_fini_by_service_id(service_id); 1222 return ENOTSUP; 1223 } 1224 1225 rc = exfat_node_get_new_by_pos(&uctablep, service_id, rootp->firstc, 1226 di.pos); 1227 if (rc != EOK) { 1228 free(rootp); 1229 free(bitmapp); 1230 (void) block_cache_fini(service_id); 1231 block_fini(service_id); 1232 exfat_idx_fini_by_service_id(service_id); 1233 return ENOMEM; 1234 } 1235 assert(uctablep->idx->index == EXFAT_UCTABLE_IDX); 1236 fibril_mutex_unlock(&uctablep->idx->lock); 1237 1238 uctablep->type = EXFAT_UCTABLE; 1239 uctablep->firstc = uint32_t_le2host(de->uctable.firstc); 1240 uctablep->fragmented = true; 1241 uctablep->idx->parent_fragmented = true; 1242 uctablep->refcnt = 1; 1243 uctablep->lnkcnt = 0; 1244 uctablep->size = uint64_t_le2host(de->uctable.size); 1245 1246 rc = exfat_directory_close(&di); 1247 if (rc != EOK) { 1248 free(rootp); 1249 free(bitmapp); 1250 free(uctablep); 1251 (void) block_cache_fini(service_id); 1252 block_fini(service_id); 1253 exfat_idx_fini_by_service_id(service_id); 1254 return ENOMEM; 1255 } 1256 1257 /* exfat_fsinfo(bs, service_id); */ 1258 1259 *index = rootp->idx->index; 1260 *size = rootp->size; 1261 1296 rc = exfat_fs_open(service_id, cmode, &rfn, &ridxp, NULL); 1297 if (rc != EOK) 1298 return rc; 1299 1300 *index = ridxp->index; 1301 *size = EXFAT_NODE(rfn)->size; 1302 1262 1303 return EOK; 1263 1304 } … … 1265 1306 static int exfat_unmounted(service_id_t service_id) 1266 1307 { 1267 fs_node_t *fn; 1268 exfat_node_t *nodep; 1269 int rc; 1270 1271 rc = exfat_root_get(&fn, service_id); 1272 if (rc != EOK) 1273 return rc; 1274 nodep = EXFAT_NODE(fn); 1275 1276 /* 1277 * We expect exactly two references on the root node. One for the 1278 * fat_root_get() above and one created in fat_mounted(). 1279 */ 1280 if (nodep->refcnt != 2) { 1281 (void) exfat_node_put(fn); 1282 return EBUSY; 1283 } 1284 1285 /* 1286 * Put the root node and force it to the FAT free node list. 1287 */ 1288 (void) exfat_node_put(fn); 1289 (void) exfat_node_put(fn); 1290 1291 /* 1292 * Perform cleanup of the node structures, index structures and 1293 * associated data. Write back this file system's dirty blocks and 1294 * stop using libblock for this instance. 1295 */ 1296 (void) exfat_node_fini_by_service_id(service_id); 1297 exfat_idx_fini_by_service_id(service_id); 1298 (void) block_cache_fini(service_id); 1299 block_fini(service_id); 1300 1308 fs_node_t *rfn; 1309 int rc; 1310 1311 rc = exfat_root_get(&rfn, service_id); 1312 if (rc != EOK) 1313 return rc; 1314 1315 exfat_fs_close(service_id, rfn); 1301 1316 return EOK; 1302 1317 } … … 1363 1378 return ENOTSUP; 1364 1379 } 1365 1380 1366 1381 aoff64_t spos = pos; 1367 1382 char name[EXFAT_FILENAME_LEN + 1]; -
uspace/srv/volsrv/mkfs.c
rb2906c0 rf3504c1 146 146 147 147 switch (fstype) { 148 case fs_exfat: 148 149 case fs_fat: 149 150 vlsupp->supported = true; 150 151 break; 151 case fs_exfat:152 152 case fs_minix: 153 153 case fs_ext4:
Note:
See TracChangeset
for help on using the changeset viewer.