xref: /freebsd/usr.sbin/fstyp/fstyp.h (revision be3a49ee62b6af938565ef159b535aea59a92f16)
1*be3a49eeSEdward Tomasz Napierala /*-
2*be3a49eeSEdward Tomasz Napierala  * Copyright (c) 2014 The FreeBSD Foundation
3*be3a49eeSEdward Tomasz Napierala  * All rights reserved.
4*be3a49eeSEdward Tomasz Napierala  *
5*be3a49eeSEdward Tomasz Napierala  * This software was developed by Edward Tomasz Napierala under sponsorship
6*be3a49eeSEdward Tomasz Napierala  * from the FreeBSD Foundation.
7*be3a49eeSEdward Tomasz Napierala  *
8*be3a49eeSEdward Tomasz Napierala  * Redistribution and use in source and binary forms, with or without
9*be3a49eeSEdward Tomasz Napierala  * modification, are permitted provided that the following conditions
10*be3a49eeSEdward Tomasz Napierala  * are met:
11*be3a49eeSEdward Tomasz Napierala  * 1. Redistributions of source code must retain the above copyright
12*be3a49eeSEdward Tomasz Napierala  *    notice, this list of conditions and the following disclaimer.
13*be3a49eeSEdward Tomasz Napierala  * 2. Redistributions in binary form must reproduce the above copyright
14*be3a49eeSEdward Tomasz Napierala  *    notice, this list of conditions and the following disclaimer in the
15*be3a49eeSEdward Tomasz Napierala  *    documentation and/or other materials provided with the distribution.
16*be3a49eeSEdward Tomasz Napierala  *
17*be3a49eeSEdward Tomasz Napierala  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18*be3a49eeSEdward Tomasz Napierala  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19*be3a49eeSEdward Tomasz Napierala  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20*be3a49eeSEdward Tomasz Napierala  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21*be3a49eeSEdward Tomasz Napierala  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*be3a49eeSEdward Tomasz Napierala  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23*be3a49eeSEdward Tomasz Napierala  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24*be3a49eeSEdward Tomasz Napierala  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25*be3a49eeSEdward Tomasz Napierala  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26*be3a49eeSEdward Tomasz Napierala  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27*be3a49eeSEdward Tomasz Napierala  * SUCH DAMAGE.
28*be3a49eeSEdward Tomasz Napierala  *
29*be3a49eeSEdward Tomasz Napierala  * $FreeBSD$
30*be3a49eeSEdward Tomasz Napierala  */
31*be3a49eeSEdward Tomasz Napierala 
32*be3a49eeSEdward Tomasz Napierala #ifndef FSTYP_H
33*be3a49eeSEdward Tomasz Napierala #define	FSTYP_H
34*be3a49eeSEdward Tomasz Napierala 
35*be3a49eeSEdward Tomasz Napierala #define	MIN(a,b) (((a)<(b))?(a):(b))
36*be3a49eeSEdward Tomasz Napierala 
37*be3a49eeSEdward Tomasz Napierala void	*read_buf(FILE *fp, off_t off, size_t len);
38*be3a49eeSEdward Tomasz Napierala char	*checked_strdup(const char *s);
39*be3a49eeSEdward Tomasz Napierala 
40*be3a49eeSEdward Tomasz Napierala int	fstyp_cd9660(FILE *fp, char *label, size_t size);
41*be3a49eeSEdward Tomasz Napierala int	fstyp_ext2fs(FILE *fp, char *label, size_t size);
42*be3a49eeSEdward Tomasz Napierala int	fstyp_msdosfs(FILE *fp, char *label, size_t size);
43*be3a49eeSEdward Tomasz Napierala int	fstyp_ntfs(FILE *fp, char *label, size_t size);
44*be3a49eeSEdward Tomasz Napierala int	fstyp_ufs(FILE *fp, char *label, size_t size);
45*be3a49eeSEdward Tomasz Napierala 
46*be3a49eeSEdward Tomasz Napierala #endif /* !FSTYP_H */
47