hsfs_vfsops.c revision 5dd69ca1b9d54efcddf4f5b9fc472658299d134d
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * CDDL HEADER START
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * The contents of this file are subject to the terms of the
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Common Development and Distribution License (the "License").
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * You may not use this file except in compliance with the License.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * or http://www.opensolaris.org/os/licensing.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * See the License for the specific language governing permissions
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * and limitations under the License.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * When distributing Covered Code, include this CDDL HEADER in each
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * If applicable, add the following below this CDDL HEADER, with the
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * fields enclosed by brackets "[]" replaced with your own identifying
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * information: Portions Copyright [yyyy] [name of copyright owner]
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * CDDL HEADER END
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Use is subject to license terms.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy#pragma ident "%Z%%M% %I% %E% SMI"
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy * VFS operations for High Sierra filesystem
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * These are needed for the CDROMREADOFFSET Code
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Options for mount.
static int hsfsfstype;
static int hsfsinit(int, char *);
_init(void)
_fini(void)
int error;
if (error)
return (error);
int error;
if (error != 0) {
return (error);
if (error != 0) {
return (error);
int vnode_busy;
int error;
return (error);
return (ENOTDIR);
return (EROFS);
return (EBUSY);
flags = 0;
if (error)
return (error);
return (error);
return (ENOTBLK);
return (error);
int flag,
return (EPERM);
return (ENOTSUP);
return (EBUSY);
return (EBUSY);
return (EINVAL);
int error;
return (error);
int error;
int fsid;
* for a nonexistant/corrupted piece of the device
fsid = 0;
for (i = 0; i < CHECKSUM_SIZE / sizeof (int); i++)
return (fsid);
char *path,
int mount_flags,
int isroot)
int error;
int fsid;
int use_rrip;
int use_vers2;
int use_joliet;
int has_rrip = 0;
int has_vers2 = 0;
int has_joliet = 0;
int force_rrip_off;
int force_vers2_off;
int force_joliet_off;
int redo_rootvp;
return (error);
goto cleanup;
goto cleanup;
goto cleanup;
if (error)
goto cleanup;
goto cleanup;
if (use_rrip) {
redo_rootvp = 0;
has_joliet = 0;
has_vers2 = 0;
if (redo_rootvp) {
has_rrip = 0;
goto cleanup;
has_vers2 = 0;
has_joliet = 0;
if (force_vers2_off)
has_vers2 = 0;
if (force_joliet_off)
has_joliet = 0;
if (isroot) {
case HS_VOL_TYPE_HS:
case HS_VOL_TYPE_ISO:
case HS_VOL_TYPE_ISO_V2:
case HS_VOL_TYPE_JOLIET:
if (fsp)
if (svp)
if (jvp)
return (error);
int error;
if (error != 0) {
return (error);
for (i = 0; i < HSV_ID_STRLEN; i++)
goto cantfind;
goto cantfind;
case VD_SFS:
return (error);
case VD_CCFS:
case VD_BOOT:
case VD_UNSPEC:
case VD_EOV:
++secno;
if (error != 0) {
error);
return (error);
return (EINVAL);
return (EINVAL);
#if defined(_LITTLE_ENDIAN)
return (EINVAL);
int error;
int foundpvd = 0;
int foundsvd = 0;
int foundjvd = 0;
if (error != 0) {
return (error);
for (i = 0; i < ISO_ID_STRLEN; i++)
goto cantfind;
case ISO_VD_PVD:
goto cantfind;
return (error);
case ISO_VD_SVD:
return (error);
return (error);
case ISO_VD_BOOT:
case ISO_VD_VPD:
case VD_EOV:
++secno;
if (error != 0) {
error);
return (error);
if (foundpvd) {
return (EINVAL);
return (EINVAL);
#if defined(_LITTLE_ENDIAN)
return (EINVAL);
int error;
if (error) {
return (error);
return (ENOTBLK);
return (error);
return (EBUSY);
return (EBUSY);
return (ENXIO);
if (isjoliet) {
int error;
static int hsfsrootdone = 0;
if (hsfsrootdone++)
return (EBUSY);
return (ENODEV);
if (error) {
return (error);
if (error) {
if (rootvp) {
return (error);
#ifdef HSFS_CLKSET
int secno;
int error;
#ifdef CDROMREADOFFSET
if (error) {
return (secno);