xref: /freebsd/usr.sbin/makefs/msdos.h (revision 98dc8da58c698aed1843a912c7c5f5b9dfef3656)
10661ef2aSEd Maste /*	$FreeBSD$ */
20661ef2aSEd Maste /*	$NetBSD: msdos.h,v 1.3 2015/10/16 16:40:02 christos Exp $	*/
30661ef2aSEd Maste 
40661ef2aSEd Maste /*-
50661ef2aSEd Maste  * Copyright (c) 2013 The NetBSD Foundation, Inc.
60661ef2aSEd Maste  * All rights reserved.
70661ef2aSEd Maste  *
80661ef2aSEd Maste  * This code is derived from software contributed to The NetBSD Foundation
90661ef2aSEd Maste  * by Christos Zoulas.
100661ef2aSEd Maste  *
110661ef2aSEd Maste  * Redistribution and use in source and binary forms, with or without
120661ef2aSEd Maste  * modification, are permitted provided that the following conditions
130661ef2aSEd Maste  * are met:
140661ef2aSEd Maste  * 1. Redistributions of source code must retain the above copyright
150661ef2aSEd Maste  *    notice, this list of conditions and the following disclaimer.
160661ef2aSEd Maste  * 2. Redistributions in binary form must reproduce the above copyright
170661ef2aSEd Maste  *    notice, this list of conditions and the following disclaimer in the
180661ef2aSEd Maste  *    documentation and/or other materials provided with the distribution.
190661ef2aSEd Maste  *
200661ef2aSEd Maste  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
210661ef2aSEd Maste  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
220661ef2aSEd Maste  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
230661ef2aSEd Maste  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
240661ef2aSEd Maste  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
250661ef2aSEd Maste  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
260661ef2aSEd Maste  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
270661ef2aSEd Maste  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
280661ef2aSEd Maste  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
290661ef2aSEd Maste  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
300661ef2aSEd Maste  * POSSIBILITY OF SUCH DAMAGE.
310661ef2aSEd Maste  */
320661ef2aSEd Maste 
33*98dc8da5SEd Maste #ifndef _MAKEFS_MSDOS_H
34*98dc8da5SEd Maste #define _MAKEFS_MSDOS_H
35*98dc8da5SEd Maste 
36*98dc8da5SEd Maste #define NOCRED NULL
37*98dc8da5SEd Maste 
38*98dc8da5SEd Maste #define MSDOSFS_DPRINTF(args) do {	\
39*98dc8da5SEd Maste 	if (debug & DEBUG_MSDOSFS)	\
40*98dc8da5SEd Maste 		printf args;		\
41*98dc8da5SEd Maste } while (0);
42*98dc8da5SEd Maste 
43*98dc8da5SEd Maste 
440661ef2aSEd Maste struct vnode;
450661ef2aSEd Maste struct denode;
46*98dc8da5SEd Maste struct fsnode;
47*98dc8da5SEd Maste struct msdosfsmount;
480661ef2aSEd Maste 
49*98dc8da5SEd Maste struct componentname {
50*98dc8da5SEd Maste 	char *cn_nameptr;
51*98dc8da5SEd Maste 	size_t cn_namelen;
52*98dc8da5SEd Maste };
53*98dc8da5SEd Maste 
54*98dc8da5SEd Maste struct msdosfsmount *msdosfs_mount(struct vnode *);
550661ef2aSEd Maste int msdosfs_root(struct msdosfsmount *, struct vnode *);
560661ef2aSEd Maste 
570661ef2aSEd Maste struct denode *msdosfs_mkfile(const char *, struct denode *, fsnode *);
580661ef2aSEd Maste struct denode *msdosfs_mkdire(const char *, struct denode *, fsnode *);
59*98dc8da5SEd Maste 
60*98dc8da5SEd Maste #endif
61