Changeset 54a0070 in mainline for uspace/srv/fs
- Timestamp:
- 2012-09-10T09:54:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 40b5421
- Parents:
- 1dbd189 (diff), 42bde6a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/srv/fs/udf
- Files:
-
- 4 edited
-
udf.c (modified) (5 diffs)
-
udf_file.c (modified) (7 diffs)
-
udf_ops.c (modified) (5 diffs)
-
udf_volume.c (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/udf/udf.c
r1dbd189 r54a0070 61 61 int main(int argc, char *argv[]) 62 62 { 63 log_init(NAME , LVL_NOTE);64 log_msg(L VL_NOTE, "HelenOS UDF 1.02 file system server");63 log_init(NAME); 64 log_msg(LOG_DEFAULT, LVL_NOTE, "HelenOS UDF 1.02 file system server"); 65 65 66 66 if (argc == 3) { … … 68 68 udf_vfs_info.instance = strtol(argv[2], NULL, 10); 69 69 else { 70 log_msg(L VL_FATAL, "Unrecognized parameters");70 log_msg(LOG_DEFAULT, LVL_FATAL, "Unrecognized parameters"); 71 71 return 1; 72 72 } … … 76 76 service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_VFS, 0, 0); 77 77 if (!vfs_sess) { 78 log_msg(L VL_FATAL, "Failed to connect to VFS");78 log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to connect to VFS"); 79 79 return 2; 80 80 } … … 89 89 goto err; 90 90 91 log_msg(L VL_NOTE, "Accepting connections");91 log_msg(LOG_DEFAULT, LVL_NOTE, "Accepting connections"); 92 92 task_retval(0); 93 93 async_manager(); … … 97 97 98 98 err: 99 log_msg(L VL_FATAL, "Failed to register file system (%d)", rc);99 log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to register file system (%d)", rc); 100 100 return rc; 101 101 } -
uspace/srv/fs/udf/udf_file.c
r1dbd189 r54a0070 71 71 FLE32(exd->extent_location.lblock_num); 72 72 73 log_msg(L VL_DEBUG,73 log_msg(LOG_DEFAULT, LVL_DEBUG, 74 74 "Extended allocator: start=%d, block_num=%d, len=%d", start, 75 75 FLE32(exd->extent_location.lblock_num), FLE32(exd->info_length)); … … 100 100 switch (icb_flag) { 101 101 case UDF_SHORT_AD: 102 log_msg(L VL_DEBUG,102 log_msg(LOG_DEFAULT, LVL_DEBUG, 103 103 "ICB: sequence of allocation descriptors - icbflag = short_ad_t"); 104 104 … … 167 167 168 168 case UDF_LONG_AD: 169 log_msg(L VL_DEBUG,169 log_msg(LOG_DEFAULT, LVL_DEBUG, 170 170 "ICB: sequence of allocation descriptors - icbflag = long_ad_t"); 171 171 … … 203 203 204 204 case UDF_EXTENDED_AD: 205 log_msg(L VL_DEBUG,205 log_msg(LOG_DEFAULT, LVL_DEBUG, 206 206 "ICB: sequence of allocation descriptors - icbflag = extended_ad_t"); 207 207 break; 208 208 209 209 case UDF_DATA_AD: 210 log_msg(L VL_DEBUG,210 log_msg(LOG_DEFAULT, LVL_DEBUG, 211 211 "ICB: sequence of allocation descriptors - icbflag = 3, node contains data itself"); 212 212 … … 253 253 switch (FLE16(data->id)) { 254 254 case UDF_FILE_ENTRY: 255 log_msg(L VL_DEBUG, "ICB: File entry descriptor found");255 log_msg(LOG_DEFAULT, LVL_DEBUG, "ICB: File entry descriptor found"); 256 256 257 257 udf_file_entry_descriptor_t *file = … … 267 267 268 268 case UDF_EFILE_ENTRY: 269 log_msg(L VL_DEBUG, "ICB: Extended file entry descriptor found");269 log_msg(LOG_DEFAULT, LVL_DEBUG, "ICB: Extended file entry descriptor found"); 270 270 271 271 udf_extended_file_entry_descriptor_t *efile = … … 281 281 282 282 case UDF_ICB_TERMINAL: 283 log_msg(L VL_DEBUG, "ICB: Terminal entry descriptor found");283 log_msg(LOG_DEFAULT, LVL_DEBUG, "ICB: Terminal entry descriptor found"); 284 284 block_put(block); 285 285 return EOK; -
uspace/srv/fs/udf/udf_ops.c
r1dbd189 r54a0070 311 311 rc = udf_volume_recongnition(service_id); 312 312 if (rc != EOK) { 313 log_msg(L VL_NOTE, "VRS failed");313 log_msg(LOG_DEFAULT, LVL_NOTE, "VRS failed"); 314 314 fs_instance_destroy(service_id); 315 315 free(instance); … … 322 322 rc = udf_get_anchor_volume_descriptor(service_id, &avd); 323 323 if (rc != EOK) { 324 log_msg(L VL_NOTE, "Anchor read failed");324 log_msg(LOG_DEFAULT, LVL_NOTE, "Anchor read failed"); 325 325 fs_instance_destroy(service_id); 326 326 free(instance); … … 329 329 } 330 330 331 log_msg(L VL_DEBUG,331 log_msg(LOG_DEFAULT, LVL_DEBUG, 332 332 "Volume: Anchor volume descriptor found. Sector size=%" PRIu32, 333 333 instance->sector_size); 334 log_msg(L VL_DEBUG,334 log_msg(LOG_DEFAULT, LVL_DEBUG, 335 335 "Anchor: main sequence [length=%" PRIu32 " (bytes), start=%" 336 336 PRIu32 " (sector)]", avd.main_extent.length, 337 337 avd.main_extent.location); 338 log_msg(L VL_DEBUG,338 log_msg(LOG_DEFAULT, LVL_DEBUG, 339 339 "Anchor: reserve sequence [length=%" PRIu32 " (bytes), start=%" 340 340 PRIu32 " (sector)]", avd.reserve_extent.length, … … 353 353 rc = udf_read_volume_descriptor_sequence(service_id, avd.main_extent); 354 354 if (rc != EOK) { 355 log_msg(L VL_NOTE, "Volume Descriptor Sequence read failed");355 log_msg(LOG_DEFAULT, LVL_NOTE, "Volume Descriptor Sequence read failed"); 356 356 fs_instance_destroy(service_id); 357 357 free(instance); … … 364 364 rc = udf_node_get(&rfn, service_id, instance->volumes[DEFAULT_VOL].root_dir); 365 365 if (rc != EOK) { 366 log_msg(L VL_NOTE, "Can't create root node");366 log_msg(LOG_DEFAULT, LVL_NOTE, "Can't create root node"); 367 367 fs_instance_destroy(service_id); 368 368 free(instance); -
uspace/srv/fs/udf/udf_volume.c
r1dbd189 r54a0070 63 63 fs_index_t udf_long_ad_to_pos(udf_instance_t *instance, udf_long_ad_t *long_ad) 64 64 { 65 log_msg(L VL_DEBUG, "Long_Ad to Pos: "65 log_msg(LOG_DEFAULT, LVL_DEBUG, "Long_Ad to Pos: " 66 66 "partition_num=%" PRIu16 ", partition_block=%" PRIu32, 67 67 FLE16(long_ad->location.partition_num), … … 130 130 (str_lcmp(VRS_NSR3, (char *) vd->identifier, VRS_ID_LEN) == 0)) { 131 131 nsr_found = true; 132 log_msg(L VL_DEBUG, "VRS: NSR found");132 log_msg(LOG_DEFAULT, LVL_DEBUG, "VRS: NSR found"); 133 133 continue; 134 134 } 135 135 136 136 if (str_lcmp(VRS_END, (char *) vd->identifier, VRS_ID_LEN) == 0) { 137 log_msg(L VL_DEBUG, "VRS: end found");137 log_msg(LOG_DEFAULT, LVL_DEBUG, "VRS: end found"); 138 138 break; 139 139 } … … 382 382 switch (FLE16(desc->id)) { 383 383 case UDF_FILE_ENTRY: 384 log_msg(L VL_DEBUG, "ICB: File entry descriptor found");384 log_msg(LOG_DEFAULT, LVL_DEBUG, "ICB: File entry descriptor found"); 385 385 386 386 udf_file_entry_descriptor_t *fed = … … 394 394 395 395 case UDF_EFILE_ENTRY: 396 log_msg(L VL_DEBUG, "ICB: Extended file entry descriptor found");396 log_msg(LOG_DEFAULT, LVL_DEBUG, "ICB: Extended file entry descriptor found"); 397 397 398 398 udf_extended_file_entry_descriptor_t *efed = … … 514 514 &instance->partitions[j]; 515 515 516 log_msg(L VL_DEBUG, "Volume[%" PRIun "]: partition [type %u] "516 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume[%" PRIun "]: partition [type %u] " 517 517 "found and filled", i, pm1->partition_map_type); 518 518 … … 531 531 (udf_metadata_partition_map_t *) idx; 532 532 533 log_msg(L VL_DEBUG, "Metadata file location=%u",533 log_msg(LOG_DEFAULT, LVL_DEBUG, "Metadata file location=%u", 534 534 FLE32(metadata->metadata_fileloc)); 535 535 … … 569 569 &instance->partitions[j]; 570 570 571 log_msg(L VL_DEBUG, "Virtual partition: num=%d, start=%d",571 log_msg(LOG_DEFAULT, LVL_DEBUG, "Virtual partition: num=%d, start=%d", 572 572 instance->partitions[j].number, 573 573 instance->partitions[j].start); 574 log_msg(L VL_DEBUG, "Volume[%" PRIun "]: partition [type %u] "574 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume[%" PRIun "]: partition [type %u] " 575 575 "found and filled", i, pm2->partition_map_type); 576 576 … … 583 583 udf_general_type_t *pm = (udf_general_type_t *) idx; 584 584 585 log_msg(L VL_DEBUG, "Volume[%" PRIun "]: partition [type %u] "585 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume[%" PRIun "]: partition [type %u] " 586 586 "found and skipped", i, pm->partition_map_type); 587 587 … … 657 657 /* One sector size descriptors */ 658 658 case UDF_TAG_PVD: 659 log_msg(L VL_DEBUG, "Volume: Primary volume descriptor found");659 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Primary volume descriptor found"); 660 660 661 661 if (!udf_check_prevailing_pvd(pvd, pvd_cnt, &vol->volume)) { … … 669 669 670 670 case UDF_TAG_VDP: 671 log_msg(L VL_DEBUG, "Volume: Volume descriptor pointer found");671 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Volume descriptor pointer found"); 672 672 pos++; 673 673 break; 674 674 675 675 case UDF_TAG_IUVD: 676 log_msg(L VL_DEBUG,676 log_msg(LOG_DEFAULT, LVL_DEBUG, 677 677 "Volume: Implementation use volume descriptor found"); 678 678 pos++; … … 680 680 681 681 case UDF_TAG_PD: 682 log_msg(L VL_DEBUG, "Volume: Partition descriptor found");683 log_msg(L VL_DEBUG, "Partition number: %u, contents: '%.6s', "682 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Partition descriptor found"); 683 log_msg(LOG_DEFAULT, LVL_DEBUG, "Partition number: %u, contents: '%.6s', " 684 684 "access type: %" PRIu32, FLE16(vol->partition.number), 685 685 vol->partition.contents.id, FLE32(vol->partition.access_type)); 686 log_msg(L VL_DEBUG, "Partition start: %" PRIu32 " (sector), "686 log_msg(LOG_DEFAULT, LVL_DEBUG, "Partition start: %" PRIu32 " (sector), " 687 687 "size: %" PRIu32 " (sectors)", 688 688 FLE32(vol->partition.starting_location), … … 698 698 (udf_partition_header_descriptor_t *) vol->partition.contents_use; 699 699 if (FLE32(phd->unallocated_space_table.length)) { 700 log_msg(L VL_DEBUG,700 log_msg(LOG_DEFAULT, LVL_DEBUG, 701 701 "space table: length=%" PRIu32 ", pos=%" PRIu32, 702 702 FLE32(phd->unallocated_space_table.length), … … 712 712 713 713 if (FLE32(phd->unallocated_space_bitmap.length)) { 714 log_msg(L VL_DEBUG,714 log_msg(LOG_DEFAULT, LVL_DEBUG, 715 715 "space bitmap: length=%" PRIu32 ", pos=%" PRIu32, 716 716 FLE32(phd->unallocated_space_bitmap.length), … … 730 730 /* Relative size descriptors */ 731 731 case UDF_TAG_LVD: 732 log_msg(L VL_DEBUG, "Volume: Logical volume descriptor found");732 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Logical volume descriptor found"); 733 733 734 734 aoff64_t sct = … … 743 743 &vol->logical.charset); 744 744 745 log_msg(L VL_DEBUG, "Logical Volume ID: '%s', "745 log_msg(LOG_DEFAULT, LVL_DEBUG, "Logical Volume ID: '%s', " 746 746 "logical block size: %" PRIu32 " (bytes)", tmp, 747 747 FLE32(vol->logical.logical_block_size)); 748 log_msg(L VL_DEBUG, "Map table size: %" PRIu32 " (bytes), "748 log_msg(LOG_DEFAULT, LVL_DEBUG, "Map table size: %" PRIu32 " (bytes), " 749 749 "number of partition maps: %" PRIu32, 750 750 FLE32(vol->logical.map_table_length), … … 761 761 762 762 case UDF_TAG_USD: 763 log_msg(L VL_DEBUG, "Volume: Unallocated space descriptor found");763 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Unallocated space descriptor found"); 764 764 765 765 sct = ALL_UP((sizeof(udf_unallocated_space_descriptor_t) + … … 780 780 781 781 case UDF_TAG_LVID: 782 log_msg(L VL_DEBUG,782 log_msg(LOG_DEFAULT, LVL_DEBUG, 783 783 "Volume: Logical volume integrity descriptor found"); 784 784 … … 787 787 788 788 case UDF_TAG_TD: 789 log_msg(L VL_DEBUG, "Volume: Terminating descriptor found");789 log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Terminating descriptor found"); 790 790 791 791 /* Found terminating descriptor. Exiting */ … … 823 823 udf_descriptor_tag_t *desc = block->data; 824 824 825 log_msg(L VL_DEBUG, "First tag ID=%" PRIu16, desc->id);825 log_msg(LOG_DEFAULT, LVL_DEBUG, "First tag ID=%" PRIu16, desc->id); 826 826 827 827 if (desc->checksum != udf_tag_checksum((uint8_t *) desc)) {
Note:
See TracChangeset
for help on using the changeset viewer.
