Home | History | Annotate | Line # | Download | only in fstyp
fstyp.h revision 1.3
      1 /*	$NetBSD: fstyp.h,v 1.3 2019/12/27 11:06:23 tkusumi Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 2017 The NetBSD Foundation, Inc.
      5  * Copyright (c) 2016 The DragonFly Project
      6  * Copyright (c) 2014 The FreeBSD Foundation
      7  * All rights reserved.
      8  *
      9  * This code is derived from software contributed to The NetBSD Foundation
     10  * by Tomohiro Kusumi <kusumi.tomohiro (at) gmail.com>.
     11  *
     12  * This software was developed by Edward Tomasz Napierala under sponsorship
     13  * from the FreeBSD Foundation.
     14  *
     15  * Redistribution and use in source and binary forms, with or without
     16  * modification, are permitted provided that the following conditions
     17  * are met:
     18  * 1. Redistributions of source code must retain the above copyright
     19  *    notice, this list of conditions and the following disclaimer.
     20  * 2. Redistributions in binary form must reproduce the above copyright
     21  *    notice, this list of conditions and the following disclaimer in the
     22  *    documentation and/or other materials provided with the distribution.
     23  *
     24  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     27  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     29  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     30  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     33  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34  * SUCH DAMAGE.
     35  *
     36  * $FreeBSD$
     37  */
     38 
     39 #ifndef FSTYP_H
     40 #define	FSTYP_H
     41 
     42 void	*read_buf(FILE *, off_t, size_t);
     43 char	*checked_strdup(const char *);
     44 void	rtrim(char *, size_t);
     45 
     46 int	fstyp_cd9660(FILE *, char *, size_t);
     47 int	fstyp_exfat(FILE *fp, char *label, size_t size);
     48 int	fstyp_ext2fs(FILE *, char *, size_t);
     49 int	fstyp_hfsp(FILE *fp, char *label, size_t size);
     50 int	fstyp_msdosfs(FILE *, char *, size_t);
     51 int	fstyp_ntfs(FILE *, char *, size_t);
     52 int	fstyp_ufs(FILE *, char *, size_t);
     53 #ifdef HAVE_ZFS
     54 int	fstyp_zfs(FILE *, char *, size_t);
     55 #endif
     56 
     57 #endif /* !FSTYP_H */
     58