Changeset 7a96476 in mainline for uspace/srv/fs/minixfs/mfs_ops.c
- Timestamp:
- 2011-03-27T13:35:15Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ef76d72
- Parents:
- a04b62d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_ops.c
ra04b62d r7a96476 151 151 152 152 if (check_magic_number(sb->s_magic, &native, &version, &longnames)) { 153 /*This is a V1 or V2 Minix filesystem*/ 153 154 magic = sb->s_magic; 154 155 goto recognized; … … 161 162 return; 162 163 } 164 165 /*This is a V3 Minix filesystem*/ 163 166 164 167 magic = sb3->s_magic; … … 250 253 void mfs_stat(ipc_callid_t rid, ipc_call_t *request) 251 254 { 252 mfsdebug("mfs_stat called\n");255 mfsdebug("mfs_stat()\n"); 253 256 libfs_stat(&mfs_libfs_ops, mfs_reg.fs_handle, rid, request); 254 257 } … … 260 263 struct mfs_instance *instance; 261 264 262 mfsdebug(" node_get called\n");265 mfsdebug("mfs_node_get()\n"); 263 266 264 267 rc = mfs_instance_get(devmap_handle, &instance); … … 354 357 355 358 if (!ino_i) 356 return -1;359 goto out_err; 357 360 358 361 ino_i->index = index; … … 431 434 d_info = read_directory_entry(mnode, i++); 432 435 433 if (!d_info) 436 if (!d_info) { 437 /*Reached the end of the dentries list*/ 434 438 goto out; 439 } 435 440 436 441 if (d_info->d_inum) { 442 /*A valid entry has been found*/ 437 443 *has_children = true; 438 444 free(d_info); … … 446 452 447 453 if (n_dentries > 2 && !*has_children) 448 printf(NAME ": Filesystem corruption detected ");454 printf(NAME ": Filesystem corruption detected\n"); 449 455 450 456 if (*has_children) … … 485 491 mfs_version_t *version, bool *longfilenames) 486 492 { 493 bool rc = false; 487 494 *longfilenames = false; 488 495 … … 490 497 *native = magic == MFS_MAGIC_V1; 491 498 *version = MFS_VERSION_V1; 492 r eturntrue;499 rc = true; 493 500 } else if (magic == MFS_MAGIC_V1L || magic == MFS_MAGIC_V1LR) { 494 501 *native = magic == MFS_MAGIC_V1L; 495 502 *version = MFS_VERSION_V1; 496 503 *longfilenames = true; 497 r eturntrue;504 rc = true; 498 505 } else if (magic == MFS_MAGIC_V2 || magic == MFS_MAGIC_V2R) { 499 506 *native = magic == MFS_MAGIC_V2; 500 507 *version = MFS_VERSION_V2; 501 r eturntrue;508 rc = true; 502 509 } else if (magic == MFS_MAGIC_V2L || magic == MFS_MAGIC_V2LR) { 503 510 *native = magic == MFS_MAGIC_V2L; 504 511 *version = MFS_VERSION_V2; 505 512 *longfilenames = true; 506 r eturntrue;513 rc = true; 507 514 } else if (magic == MFS_MAGIC_V3 || magic == MFS_MAGIC_V3R) { 508 515 *native = magic == MFS_MAGIC_V3; 509 516 *version = MFS_VERSION_V3; 510 r eturntrue;511 } 512 513 return false;517 rc = true; 518 } 519 520 return rc; 514 521 } 515 522
Note:
See TracChangeset
for help on using the changeset viewer.