Sync usage with man page.
[netbsd-mini2440.git] / sys / fs / hfs / hfs_vfsops.c
blobaca5d07fd445f5301e38d3b5749be2e18e677572
1 /* $NetBSD: hfs_vfsops.c,v 1.24 2009/12/03 14:29:04 pooka Exp $ */
3 /*-
4 * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Yevgeny Binder and Dieter Baron.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 */
33 * Copyright (c) 1991, 1993, 1994
34 * The Regents of the University of California. All rights reserved.
35 * (c) UNIX System Laboratories, Inc.
36 * All or some portions of this file are derived from material licensed
37 * to the University of California by American Telephone and Telegraph
38 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
39 * the permission of UNIX System Laboratories, Inc.
41 * Redistribution and use in source and binary forms, with or without
42 * modification, are permitted provided that the following conditions
43 * are met:
44 * 1. Redistributions of source code must retain the above copyright
45 * notice, this list of conditions and the following disclaimer.
46 * 2. Redistributions in binary form must reproduce the above copyright
47 * notice, this list of conditions and the following disclaimer in the
48 * documentation and/or other materials provided with the distribution.
49 * 3. Neither the name of the University nor the names of its contributors
50 * may be used to endorse or promote products derived from this software
51 * without specific prior written permission.
53 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
54 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
55 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
56 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
57 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
58 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
59 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
60 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63 * SUCH DAMAGE.
67 * Copyright (c) 1989, 1991, 1993, 1994
68 * The Regents of the University of California. All rights reserved.
70 * Redistribution and use in source and binary forms, with or without
71 * modification, are permitted provided that the following conditions
72 * are met:
73 * 1. Redistributions of source code must retain the above copyright
74 * notice, this list of conditions and the following disclaimer.
75 * 2. Redistributions in binary form must reproduce the above copyright
76 * notice, this list of conditions and the following disclaimer in the
77 * documentation and/or other materials provided with the distribution.
78 * 3. Neither the name of the University nor the names of its contributors
79 * may be used to endorse or promote products derived from this software
80 * without specific prior written permission.
82 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
83 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
84 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
85 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
86 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
87 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
88 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
89 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
90 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
91 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
92 * SUCH DAMAGE.
98 * Apple HFS+ filesystem
101 #include <sys/cdefs.h>
102 __KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.24 2009/12/03 14:29:04 pooka Exp $");
104 #ifdef _KERNEL_OPT
105 #include "opt_compat_netbsd.h"
106 #endif
108 #include <sys/param.h>
109 #include <sys/systm.h>
110 #include <sys/namei.h>
111 #include <sys/proc.h>
112 #include <sys/kernel.h>
113 #include <sys/vnode.h>
114 #include <sys/socket.h>
115 #include <sys/mount.h>
116 #include <sys/buf.h>
117 #include <sys/device.h>
118 #include <sys/mbuf.h>
119 #include <sys/file.h>
120 #include <sys/disklabel.h>
121 #include <sys/ioctl.h>
122 #include <sys/errno.h>
123 #include <sys/malloc.h>
124 #include <sys/pool.h>
125 #include <sys/lock.h>
126 #include <sys/sysctl.h>
127 #include <sys/conf.h>
128 #include <sys/kauth.h>
129 #include <sys/stat.h>
130 #include <sys/module.h>
132 #include <miscfs/genfs/genfs.h>
133 #include <miscfs/specfs/specdev.h>
135 #include <fs/hfs/hfs.h>
136 #include <fs/hfs/libhfs.h>
138 MODULE(MODULE_CLASS_VFS, hfs, NULL);
140 MALLOC_JUSTDEFINE(M_HFSMNT, "hfs mount", "hfs mount structures");
142 extern kmutex_t hfs_hashlock;
144 const struct vnodeopv_desc * const hfs_vnodeopv_descs[] = {
145 &hfs_vnodeop_opv_desc,
146 &hfs_specop_opv_desc,
147 &hfs_fifoop_opv_desc,
148 NULL,
151 struct vfsops hfs_vfsops = {
152 MOUNT_HFS,
153 sizeof (struct hfs_args),
154 hfs_mount,
155 hfs_start,
156 hfs_unmount,
157 hfs_root,
158 (void *)eopnotsupp, /* vfs_quotactl */
159 hfs_statvfs,
160 hfs_sync,
161 hfs_vget,
162 hfs_fhtovp,
163 hfs_vptofh,
164 hfs_init,
165 hfs_reinit,
166 hfs_done,
167 NULL, /* vfs_mountroot */
168 NULL, /* vfs_snapshot */
169 vfs_stdextattrctl,
170 (void *)eopnotsupp, /* vfs_suspendctl */
171 genfs_renamelock_enter,
172 genfs_renamelock_exit,
173 (void *)eopnotsupp,
174 hfs_vnodeopv_descs,
176 { NULL, NULL },
179 static const struct genfs_ops hfs_genfsops = {
180 .gop_size = genfs_size,
183 static int
184 hfs_modcmd(modcmd_t cmd, void *arg)
187 switch (cmd) {
188 case MODULE_CMD_INIT:
189 return vfs_attach(&hfs_vfsops);
190 case MODULE_CMD_FINI:
191 return vfs_detach(&hfs_vfsops);
192 default:
193 return ENOTTY;
198 hfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
200 struct lwp *l = curlwp;
201 struct hfs_args *args = data;
202 struct vnode *devvp;
203 struct hfsmount *hmp;
204 int error;
205 int update;
206 mode_t accessmode;
208 if (*data_len < sizeof *args)
209 return EINVAL;
211 #ifdef HFS_DEBUG
212 printf("vfsop = hfs_mount()\n");
213 #endif /* HFS_DEBUG */
215 if (mp->mnt_flag & MNT_GETARGS) {
216 hmp = VFSTOHFS(mp);
217 if (hmp == NULL)
218 return EIO;
219 args->fspec = NULL;
220 *data_len = sizeof *args;
221 return 0;
224 if (data == NULL)
225 return EINVAL;
227 /* FIXME: For development ONLY - disallow remounting for now */
228 #if 0
229 update = mp->mnt_flag & MNT_UPDATE;
230 #else
231 update = 0;
232 #endif
234 /* Check arguments */
235 if (args->fspec != NULL) {
237 * Look up the name and verify that it's sane.
239 error = namei_simple_user(args->fspec,
240 NSM_FOLLOW_NOEMULROOT, &devvp);
241 if (error != 0)
242 return error;
244 if (!update) {
246 * Be sure this is a valid block device
248 if (devvp->v_type != VBLK)
249 error = ENOTBLK;
250 else if (bdevsw_lookup(devvp->v_rdev) == NULL)
251 error = ENXIO;
252 } else {
254 * Be sure we're still naming the same device
255 * used for our initial mount
257 hmp = VFSTOHFS(mp);
258 if (devvp != hmp->hm_devvp)
259 error = EINVAL;
261 } else {
262 if (update) {
263 /* Use the extant mount */
264 hmp = VFSTOHFS(mp);
265 devvp = hmp->hm_devvp;
266 vref(devvp);
267 } else {
268 /* New mounts must have a filename for the device */
269 return EINVAL;
275 * If mount by non-root, then verify that user has necessary
276 * permissions on the device.
278 * Permission to update a mount is checked higher, so here we presume
279 * updating the mount is okay (for example, as far as securelevel goes)
280 * which leaves us with the normal check.
282 if (error == 0) {
283 accessmode = VREAD;
284 if (update ?
285 (mp->mnt_iflag & IMNT_WANTRDWR) != 0 :
286 (mp->mnt_flag & MNT_RDONLY) == 0)
287 accessmode |= VWRITE;
288 vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
289 error = genfs_can_mount(devvp, accessmode, l->l_cred);
290 VOP_UNLOCK(devvp, 0);
293 if (error != 0)
294 goto error;
296 if (update) {
297 printf("HFS: live remounting not yet supported!\n");
298 error = EINVAL;
299 goto error;
302 if ((error = hfs_mountfs(devvp, mp, l, args->fspec)) != 0)
303 goto error;
305 error = set_statvfs_info(path, UIO_USERSPACE, args->fspec, UIO_USERSPACE,
306 mp->mnt_op->vfs_name, mp, l);
308 #ifdef HFS_DEBUG
309 if(!update) {
310 char* volname;
312 hmp = VFSTOHFS(mp);
313 volname = malloc(hmp->hm_vol.name.length + 1, M_TEMP, M_WAITOK);
314 if (volname == NULL)
315 printf("could not allocate volname; ignored\n");
316 else {
317 if (hfs_unicode_to_ascii(hmp->hm_vol.name.unicode,
318 hmp->hm_vol.name.length, volname) == NULL)
319 printf("could not convert volume name to ascii; ignored\n");
320 else
321 printf("mounted volume \"%s\"\n", volname);
322 free(volname, M_TEMP);
325 #endif /* HFS_DEBUG */
327 return error;
329 error:
330 vrele(devvp);
331 return error;
335 hfs_start(struct mount *mp, int flags)
338 #ifdef HFS_DEBUG
339 printf("vfsop = hfs_start()\n");
340 #endif /* HFS_DEBUG */
342 return 0;
346 hfs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l,
347 const char *devpath)
349 hfs_callback_args cbargs;
350 hfs_libcb_argsopen argsopen;
351 hfs_libcb_argsread argsread;
352 struct hfsmount *hmp;
353 kauth_cred_t cred;
354 int error;
356 cred = l ? l->l_cred : NOCRED;
357 error = 0;
358 hmp = NULL;
360 /* Create mounted volume structure. */
361 hmp = (struct hfsmount*)malloc(sizeof(struct hfsmount),
362 M_HFSMNT, M_WAITOK);
363 if (hmp == NULL) {
364 error = ENOMEM;
365 goto error;
367 memset(hmp, 0, sizeof(struct hfsmount));
369 mp->mnt_data = hmp;
370 mp->mnt_flag |= MNT_LOCAL;
371 vfs_getnewfsid(mp);
373 hmp->hm_mountp = mp;
374 hmp->hm_dev = devvp->v_rdev;
375 hmp->hm_devvp = devvp;
378 * Use libhfs to open the volume and read the volume header and other
379 * useful information.
382 hfslib_init_cbargs(&cbargs);
383 argsopen.cred = argsread.cred = cred;
384 argsopen.l = argsread.l = l;
385 argsopen.devvp = devvp;
386 cbargs.read = (void*)&argsread;
387 cbargs.openvol = (void*)&argsopen;
389 if ((error = hfslib_open_volume(devpath, mp->mnt_flag & MNT_RDONLY,
390 &hmp->hm_vol, &cbargs)) != 0)
391 goto error;
393 /* Make sure this is not a journaled volume whose journal is dirty. */
394 if (!hfslib_is_journal_clean(&hmp->hm_vol)) {
395 printf("volume journal is dirty; not mounting\n");
396 error = EIO;
397 goto error;
400 mp->mnt_fs_bshift = 0;
401 while ((1 << mp->mnt_fs_bshift) < hmp->hm_vol.vh.block_size)
402 mp->mnt_fs_bshift++;
403 mp->mnt_dev_bshift = DEV_BSHIFT;
405 return 0;
407 error:
408 if (hmp != NULL)
409 free(hmp, M_HFSMNT);
411 return error;
415 hfs_unmount(struct mount *mp, int mntflags)
417 hfs_callback_args cbargs;
418 hfs_libcb_argsread argsclose;
419 struct hfsmount* hmp;
420 int error;
421 int flags;
423 #ifdef HFS_DEBUG
424 printf("vfsop = hfs_unmount()\n");
425 #endif /* HFS_DEBUG */
427 hmp = VFSTOHFS(mp);
429 flags = 0;
430 if (mntflags & MNT_FORCE)
431 flags |= FORCECLOSE;
433 if ((error = vflush(mp, NULLVP, flags)) != 0)
434 return error;
436 hfslib_init_cbargs(&cbargs);
437 argsclose.l = curlwp;
438 cbargs.closevol = (void*)&argsclose;
439 hfslib_close_volume(&hmp->hm_vol, &cbargs);
441 vrele(hmp->hm_devvp);
443 free(hmp, M_HFSMNT);
444 mp->mnt_data = NULL;
445 mp->mnt_flag &= ~MNT_LOCAL;
447 return error;
451 hfs_root(struct mount *mp, struct vnode **vpp)
453 struct vnode *nvp;
454 int error;
456 #ifdef HFS_DEBUG
457 printf("vfsop = hfs_root()\n");
458 #endif /* HFS_DEBUG */
460 if ((error = VFS_VGET(mp, HFS_CNID_ROOT_FOLDER, &nvp)) != 0)
461 return error;
462 *vpp = nvp;
464 return 0;
468 hfs_statvfs(struct mount *mp, struct statvfs *sbp)
470 hfs_volume_header_t *vh;
472 #ifdef HFS_DEBUG
473 printf("vfsop = hfs_statvfs()\n");
474 #endif /* HFS_DEBUG */
476 vh = &VFSTOHFS(mp)->hm_vol.vh;
478 sbp->f_bsize = vh->block_size;
479 sbp->f_frsize = sbp->f_bsize;
480 sbp->f_iosize = 4096;/* mac os x uses a 4 kb io size, so do the same */
481 sbp->f_blocks = vh->total_blocks;
482 sbp->f_bfree = vh->free_blocks; /* total free blocks */
483 sbp->f_bavail = vh->free_blocks; /* blocks free for non superuser */
484 sbp->f_bresvd = 0;
485 sbp->f_files = vh->file_count; /* total files */
486 sbp->f_ffree = (1<<31) - vh->file_count; /* free file nodes */
487 copy_statvfs_info(sbp, mp);
489 return 0;
493 hfs_sync(struct mount *mp, int waitfor, kauth_cred_t cred)
496 #ifdef HFS_DEBUG
497 printf("vfsop = hfs_sync()\n");
498 #endif /* HFS_DEBUG */
500 return 0;
504 * an ino_t corresponds directly to a CNID in our particular case,
505 * since both are conveniently 32-bit numbers
508 hfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp)
510 return hfs_vget_internal(mp, ino, HFS_DATAFORK, vpp);
514 * internal version with extra arguments to allow accessing resource fork
517 hfs_vget_internal(struct mount *mp, ino_t ino, uint8_t fork,
518 struct vnode **vpp)
520 struct hfsmount *hmp;
521 struct hfsnode *hnode;
522 struct vnode *vp;
523 hfs_callback_args cbargs;
524 hfs_cnid_t cnid;
525 hfs_catalog_keyed_record_t rec;
526 hfs_catalog_key_t key; /* the search key used to find this file on disk */
527 dev_t dev;
528 int error;
530 #ifdef HFS_DEBUG
531 printf("vfsop = hfs_vget()\n");
532 #endif /* HFS_DEBUG */
534 hnode = NULL;
535 vp = NULL;
536 hmp = VFSTOHFS(mp);
537 dev = hmp->hm_dev;
538 cnid = (hfs_cnid_t)ino;
540 if (fork != HFS_RSRCFORK)
541 fork = HFS_DATAFORK;
543 retry:
544 /* Check if this vnode has already been allocated. If so, just return it. */
545 if ((*vpp = hfs_nhashget(dev, cnid, fork, LK_EXCLUSIVE)) != NULL)
546 return 0;
548 /* Allocate a new vnode/inode. */
549 if ((error = getnewvnode(VT_HFS, mp, hfs_vnodeop_p, &vp)) != 0)
550 goto error;
551 hnode = malloc(sizeof(struct hfsnode), M_TEMP,
552 M_WAITOK | M_ZERO);
555 * If someone beat us to it while sleeping in getnewvnode(),
556 * push back the freshly allocated vnode we don't need, and return.
558 mutex_enter(&hfs_hashlock);
559 if (hfs_nhashget(dev, cnid, fork, 0) != NULL) {
560 mutex_exit(&hfs_hashlock);
561 ungetnewvnode(vp);
562 free(hnode, M_TEMP);
563 goto retry;
566 vp->v_vflag |= VV_LOCKSWORK;
567 vp->v_data = hnode;
568 genfs_node_init(vp, &hfs_genfsops);
570 hnode->h_vnode = vp;
571 hnode->h_hmp = hmp;
572 hnode->dummy = 0x1337BABE;
575 * We need to put this vnode into the hash chain and lock it so that other
576 * requests for this inode will block if they arrive while we are sleeping
577 * waiting for old data structures to be purged or for the contents of the
578 * disk portion of this inode to be read. The hash chain requires the node's
579 * device and cnid to be known. Since this information was passed in the
580 * arguments, fill in the appropriate hfsnode fields without reading having
581 * to read the disk.
583 hnode->h_dev = dev;
584 hnode->h_rec.u.cnid = cnid;
585 hnode->h_fork = fork;
587 hfs_nhashinsert(hnode);
588 mutex_exit(&hfs_hashlock);
592 * Read catalog record from disk.
594 hfslib_init_cbargs(&cbargs);
596 if (hfslib_find_catalog_record_with_cnid(&hmp->hm_vol, cnid,
597 &rec, &key, &cbargs) != 0) {
598 vput(vp);
599 error = EBADF;
600 goto error;
603 memcpy(&hnode->h_rec, &rec, sizeof(hnode->h_rec));
604 hnode->h_parent = key.parent_cnid;
606 /* XXX Eventually need to add an "ignore permissions" mount option */
609 * Now convert some of the catalog record's fields into values that make
610 * sense on this system.
612 /* DATE AND TIME */
615 * Initialize the vnode from the hfsnode, check for aliases.
616 * Note that the underlying vnode may change.
618 hfs_vinit(mp, hfs_specop_p, hfs_fifoop_p, &vp);
620 hnode->h_devvp = hmp->hm_devvp;
621 vref(hnode->h_devvp); /* Increment the ref count to the volume's device. */
623 /* Make sure UVM has allocated enough memory. (?) */
624 if (hnode->h_rec.u.rec_type == HFS_REC_FILE) {
625 if (hnode->h_fork == HFS_DATAFORK)
626 uvm_vnp_setsize(vp,
627 hnode->h_rec.file.data_fork.logical_size);
628 else
629 uvm_vnp_setsize(vp,
630 hnode->h_rec.file.rsrc_fork.logical_size);
632 else
633 uvm_vnp_setsize(vp, 0); /* no directly reading directories */
635 *vpp = vp;
637 return 0;
639 error:
640 *vpp = NULL;
641 return error;
645 hfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp)
648 #ifdef HFS_DEBUG
649 printf("vfsop = hfs_fhtovp()\n");
650 #endif /* HFS_DEBUG */
652 return EOPNOTSUPP;
656 hfs_vptofh(struct vnode *vp, struct fid *fhp, size_t *fh_size)
659 #ifdef HFS_DEBUG
660 printf("vfsop = hfs_vptofh()\n");
661 #endif /* HFS_DEBUG */
663 return EOPNOTSUPP;
666 void
667 hfs_init(void)
669 hfs_callbacks callbacks;
671 #ifdef HFS_DEBUG
672 printf("vfsop = hfs_init()\n");
673 #endif /* HFS_DEBUG */
675 malloc_type_attach(M_HFSMNT);
677 callbacks.error = hfs_libcb_error;
678 callbacks.allocmem = hfs_libcb_malloc;
679 callbacks.reallocmem = hfs_libcb_realloc;
680 callbacks.freemem = hfs_libcb_free;
681 callbacks.openvol = hfs_libcb_opendev;
682 callbacks.closevol = hfs_libcb_closedev;
683 callbacks.read = hfs_libcb_read;
685 hfs_nhashinit();
686 hfslib_init(&callbacks);
689 void
690 hfs_reinit(void)
693 #ifdef HFS_DEBUG
694 printf("vfsop = hfs_reinit()\n");
695 #endif /* HFS_DEBUG */
697 return;
700 void
701 hfs_done(void)
704 #ifdef HFS_DEBUG
705 printf("vfsop = hfs_done()\n");
706 #endif /* HFS_DEBUG */
708 malloc_type_detach(M_HFSMNT);
710 hfslib_done();
711 hfs_nhashdone();
715 hfs_mountroot(void)
718 #ifdef HFS_DEBUG
719 printf("vfsop = hfs_mountroot()\n");
720 #endif /* HFS_DEBUG */
722 return EOPNOTSUPP;