Changes in uspace/srv/fs/udf/udf_ops.c [48e3190:fc22069] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/udf/udf_ops.c
r48e3190 rfc22069 50 50 #include <assert.h> 51 51 #include <fibril_synch.h> 52 #include <sys/mman.h>53 52 #include <align.h> 54 53 #include <malloc.h> … … 247 246 248 247 return false; 248 } 249 250 static int udf_size_block(service_id_t service_id, uint32_t *size) 251 { 252 udf_instance_t *instance; 253 int rc = fs_instance_get(service_id, (void **) &instance); 254 if (rc != EOK) 255 return rc; 256 257 if (NULL == instance) 258 return ENOENT; 259 260 *size = instance->volumes[DEFAULT_VOL].logical_block_size; 261 262 return EOK; 263 } 264 265 static int udf_total_block_count(service_id_t service_id, uint64_t *count) 266 { 267 *count = 0; 268 269 return EOK; 270 } 271 272 static int udf_free_block_count(service_id_t service_id, uint64_t *count) 273 { 274 *count = 0; 275 276 return EOK; 249 277 } 250 278 … … 265 293 .is_directory = udf_is_directory, 266 294 .is_file = udf_is_file, 267 .service_get = udf_service_get 295 .service_get = udf_service_get, 296 .size_block = udf_size_block, 297 .total_block_count = udf_total_block_count, 298 .free_block_count = udf_free_block_count 268 299 }; 269 300 … … 294 325 295 326 /* initialize block cache */ 296 int rc = block_init( EXCHANGE_SERIALIZE,service_id, MAX_SIZE);327 int rc = block_init(service_id, MAX_SIZE); 297 328 if (rc != EOK) 298 329 return rc; … … 311 342 rc = udf_volume_recongnition(service_id); 312 343 if (rc != EOK) { 313 log_msg(L VL_NOTE, "VRS failed");344 log_msg(LOG_DEFAULT, LVL_NOTE, "VRS failed"); 314 345 fs_instance_destroy(service_id); 315 346 free(instance); … … 322 353 rc = udf_get_anchor_volume_descriptor(service_id, &avd); 323 354 if (rc != EOK) { 324 log_msg(L VL_NOTE, "Anchor read failed");355 log_msg(LOG_DEFAULT, LVL_NOTE, "Anchor read failed"); 325 356 fs_instance_destroy(service_id); 326 357 free(instance); … … 329 360 } 330 361 331 log_msg(L VL_DEBUG,362 log_msg(LOG_DEFAULT, LVL_DEBUG, 332 363 "Volume: Anchor volume descriptor found. Sector size=%" PRIu32, 333 364 instance->sector_size); 334 log_msg(L VL_DEBUG,365 log_msg(LOG_DEFAULT, LVL_DEBUG, 335 366 "Anchor: main sequence [length=%" PRIu32 " (bytes), start=%" 336 367 PRIu32 " (sector)]", avd.main_extent.length, 337 368 avd.main_extent.location); 338 log_msg(L VL_DEBUG,369 log_msg(LOG_DEFAULT, LVL_DEBUG, 339 370 "Anchor: reserve sequence [length=%" PRIu32 " (bytes), start=%" 340 371 PRIu32 " (sector)]", avd.reserve_extent.length, … … 353 384 rc = udf_read_volume_descriptor_sequence(service_id, avd.main_extent); 354 385 if (rc != EOK) { 355 log_msg(L VL_NOTE, "Volume Descriptor Sequence read failed");386 log_msg(LOG_DEFAULT, LVL_NOTE, "Volume Descriptor Sequence read failed"); 356 387 fs_instance_destroy(service_id); 357 388 free(instance); … … 364 395 rc = udf_node_get(&rfn, service_id, instance->volumes[DEFAULT_VOL].root_dir); 365 396 if (rc != EOK) { 366 log_msg(L VL_NOTE, "Can't create root node");397 log_msg(LOG_DEFAULT, LVL_NOTE, "Can't create root node"); 367 398 fs_instance_destroy(service_id); 368 399 free(instance);
Note:
See TracChangeset
for help on using the changeset viewer.