Allow setting an empty base directory. FTP server like tnftpd do not
[netbsd-mini2440.git] / sys / fs / efs / efs_genfs.c
blobd7d54579e89c77a9dc1da59fd2185101266d20db
1 /* $NetBSD$ */
3 /*
4 * Copyright (c) 2006 Stephen M. Rumble <rumble@ephemeral.org>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #include <sys/cdefs.h>
20 __KERNEL_RCSID(0, "$NetBSD$");
22 #include <sys/param.h>
23 #include <sys/systm.h>
24 #include <sys/proc.h>
25 #include <sys/kernel.h>
26 #include <sys/vnode.h>
28 #include <miscfs/genfs/genfs.h>
29 #include <miscfs/genfs/genfs_node.h>
31 #include <fs/efs/efs.h>
32 #include <fs/efs/efs_sb.h>
33 #include <fs/efs/efs_dir.h>
34 #include <fs/efs/efs_genfs.h>
35 #include <fs/efs/efs_mount.h>
36 #include <fs/efs/efs_extent.h>
37 #include <fs/efs/efs_dinode.h>
38 #include <fs/efs/efs_inode.h>
39 #include <fs/efs/efs_subr.h>
41 const struct genfs_ops efs_genfsops = {
42 .gop_size = genfs_size,
43 .gop_alloc = efs_gop_alloc,
44 .gop_write = genfs_gop_write,
47 int
48 efs_gop_alloc(struct vnode *vp, off_t off, off_t len, int flags,
49 kauth_cred_t cred)
52 return (0);