Lines Matching defs:retval
225 int retval = E_NONE;
228 if ((retval = copyin(data, (caddr_t)&args, sizeof(args)))) {
230 printf("hfs_mount: copyin returned %d for fs\n", retval);
232 return (retval);
270 retval = VFS_SYNC(mp, MNT_WAIT, context);
271 if (retval && ((cmdflags & MNT_FORCE) == 0)) {
275 printf("hfs_mount: VFS_SYNC returned %d during b-tree sync of %s \n", retval, hfsmp->vcbVN);
284 if ((retval = hfs_flushfiles(mp, flags, p))) {
288 printf("hfs_mount: hfs_flushfiles returned %d on %s \n", retval, hfsmp->vcbVN);
295 retval = hfs_flushvolumeheader(hfsmp, MNT_WAIT, 0);
331 if (!retval) {
333 retval = hfs_fsync(hfsmp->hfs_devvp, MNT_WAIT, 0, p);
336 retval = VNOP_FSYNC(hfsmp->hfs_devvp, MNT_WAIT, context);
341 if (retval) {
343 printf("hfs_mount: FSYNC on devvp returned %d for fs %s\n", retval, hfsmp->vcbVN);
372 retval = EINVAL;
416 retval = EINVAL;
425 retval = hfs_erase_unused_nodes(hfsmp);
426 if (retval != E_NONE) {
428 printf("hfs_mount: hfs_erase_unused_nodes returned %d for fs %s\n", retval, hfsmp->vcbVN);
443 retval = hfs_flushvolumeheader(hfsmp, MNT_WAIT, 0);
444 if (retval != E_NONE) {
446 printf("hfs_mount: hfs_flushvolumeheader returned %d for fs %s\n", retval, hfsmp->vcbVN);
512 retval = hfs_changefs(mp, &args);
513 if (retval && HFS_MOUNT_DEBUG) {
514 printf("hfs_mount: hfs_changefs returned %d for %s\n", retval, hfsmp->vcbVN);
522 retval = hfs_mountfs(devvp, mp, &args, 0, context);
523 if (retval && HFS_MOUNT_DEBUG) {
524 printf("hfs_mount: hfs_mountfs returned %d\n", retval);
532 if ((retval == 0) && (cp_fs_protected (mp))) {
568 retval = EPERM;
580 if (retval == 0) {
583 return (retval);
653 int retval = 0;
677 retval = EINVAL;
727 retval = hfs_getconverter(args->hfs_encoding, &get_unicode_func, &get_hfsname_func);
728 if (retval)
787 return (retval);
1281 int retval = E_NONE;
1330 retval = ENXIO;
1335 retval = ENXIO;
1340 retval = VNOP_IOCTL(devvp, DKIOCGETPHYSICALBLOCKSIZE, (caddr_t)&phys_blksize, 0, context);
1341 if (retval) {
1342 if ((retval != ENOTSUP) && (retval != ENOTTY)) {
1346 retval = ENXIO;
1356 retval = ENXIO;
1368 retval = ENXIO;
1379 retval = ENXIO;
1417 retval = ENXIO;
1425 retval = ENXIO;
1437 if ((retval = (int)buf_meta_bread(devvp,
1441 printf("hfs_mountfs: buf_meta_bread failed with %d\n", retval);
1447 retval = ENOMEM;
1462 retval = ENOMEM;
1572 retval = EROFS;
1584 retval = 0;
1589 retval = EINVAL; /* Cannot root from HFS standard disks */
1596 retval = ENXIO;
1600 retval = ENXIO;
1617 retval = hfs_getconverter(hfsmp->hfs_encoding, &hfsmp->hfs_get_unicode,
1619 if (retval)
1622 retval = hfs_MountHFSVolume(hfsmp, mdbp, p);
1623 if (retval)
1627 retval = EINVAL;
1659 retval = ENXIO;
1667 retval = ENXIO;
1690 retval = (int)buf_meta_bread(devvp, HFS_PHYSBLK_ROUNDDOWN(mdb_offset, hfsmp->hfs_log_per_phys),
1692 if (retval) {
1694 printf("hfs_mountfs: buf_meta_bread (2) failed with %d\n", retval);
1728 retval = EINVAL;
1758 if ((retval = hfs_early_journal_init(hfsmp, vhp, args, embeddedOffset, mdb_offset, mdbp, cred)) == 0) {
1761 if (retval == EROFS) {
1768 retval = EINVAL;
1789 retval = (int)buf_meta_bread(devvp,
1792 if (retval == 0) {
1818 retval = EINVAL;
1830 retval = 0;
1836 retval = hfs_MountHFSPlusVolume(hfsmp, vhp, embeddedOffset, disksize, p, args, cred);
1841 if ((retval == ENXIO) && (log_blksize > 512) && (log_blksize != minblksize)) {
1849 retval = ENXIO;
1856 retval = ENXIO;
1890 retval = (int)buf_meta_bread(devvp, HFS_PHYSBLK_ROUNDDOWN(mdb_offset, hfsmp->hfs_log_per_phys),
1892 if (retval == 0) {
1918 retval = EINVAL;
1925 retval = hfs_MountHFSPlusVolume(hfsmp, vhp, embeddedOffset, disksize, p, args, cred);
1926 if (retval && HFS_MOUNT_DEBUG) {
1927 printf("hfs_MountHFSPlusVolume (late) returned %d\n",retval);
1930 if (retval)
1938 if ( retval ) {
1940 printf("hfs_mountfs: encountered failure %d \n", retval);
2091 return (retval);
2115 int retval = E_NONE;
2128 if ((retval = hfs_flushfiles(mp, flags, p)) && !force)
2129 return (retval);
2174 retval = hfs_start_transaction(hfsmp);
2175 if (retval == 0) {
2183 retval = hfs_fsync(hfsmp->hfs_startup_vp, MNT_WAIT, 0, p);
2185 if (retval && !force)
2191 retval = hfs_fsync(hfsmp->hfs_attribute_vp, MNT_WAIT, 0, p);
2193 if (retval && !force)
2198 retval = hfs_fsync(hfsmp->hfs_catalog_vp, MNT_WAIT, 0, p);
2200 if (retval && !force)
2204 retval = hfs_fsync(hfsmp->hfs_extents_vp, MNT_WAIT, 0, p);
2206 if (retval && !force)
2211 retval = hfs_fsync(hfsmp->hfs_allocation_vp, MNT_WAIT, 0, p);
2213 if (retval && !force)
2218 retval = hfs_fsync(hfsmp->hfc_filevp, MNT_WAIT, 0, p);
2219 if (retval && !force)
2258 retval = hfs_flushvolumeheader(hfsmp, MNT_WAIT, 0);
2259 if (retval) {
2293 retval = VNOP_CLOSE(hfsmp->jvp,
2330 return retval;
2490 int retval;
2499 retval = (int)buf_meta_bread(hfsmp->hfs_devvp,
2502 if ((retval != 0 ) && (retval != ENXIO)) {
2503 printf("hfs_sync_metadata: can't read volume header at %d! (retval 0x%x)\n",
2504 (int)priIDSector, retval);
2507 if (retval == 0 && ((buf_flags(bp) & (B_DELWRI | B_LOCKED)) == B_DELWRI)) {
2518 retval = (int)buf_meta_bread(hfsmp->hfs_devvp,
2521 if (retval == 0 && ((buf_flags(bp) & (B_DELWRI | B_LOCKED)) == B_DELWRI)) {
3555 int retval;
3560 retval = (int)buf_bread(hfsmp->hfs_devvp, (daddr64_t)HFS_PRI_SECTOR(sector_size), sector_size, NOCRED, &bp);
3561 if (retval) {
3564 return retval;
3581 retval = utf8_to_hfs(vcb, namelen, vcb->vcbVN, mdb->drVN);
3583 if (retval)
3584 retval = utf8_to_mac_roman(namelen, vcb->vcbVN, mdb->drVN);
3635 retval = VNOP_BWRITE(bp);
3637 return (retval);
3654 int retval;
3679 retval = (int)buf_meta_bread(hfsmp->hfs_devvp,
3682 if (retval) {
3683 printf("hfs: err %d reading VH blk (%s)\n", retval, vcb->vcbVN);
3706 retval = buf_meta_bread(hfsmp->hfs_devvp,
3709 if (retval) {
3710 printf("hfs: err %d reading alternate VH (%s)\n", retval, vcb->vcbVN);
3725 retval = EIO;
3735 retval = EIO;
3753 retval = (int)buf_meta_bread(hfsmp->hfs_devvp,
3756 if (retval) {
3759 retval = 0;
3930 retval = VNOP_BWRITE(bp);
3932 if (critical && (retval == 0)) {
3940 return (retval);
3948 return retval;
7713 int retval = 0;
7720 retval = EINVAL;
7727 retval = ENOMEM;
7735 retval = ENOMEM;
7740 retval = hfs_mountfs(devvp, mp, args, 1, context);
7746 retval = error;
7757 return retval;