Home | History | Annotate | Line # | Download | only in sysinst
disks_lfs.c revision 1.1
      1  1.1  dholland /*	$NetBSD: disks_lfs.c,v 1.1 2014/07/26 19:30:44 dholland Exp $	*/
      2  1.1  dholland 
      3  1.1  dholland /*
      4  1.1  dholland  * Copyright (c) 2001 Matthew R. Green
      5  1.1  dholland  * All rights reserved.
      6  1.1  dholland  *
      7  1.1  dholland  * Redistribution and use in source and binary forms, with or without
      8  1.1  dholland  * modification, are permitted provided that the following conditions
      9  1.1  dholland  * are met:
     10  1.1  dholland  * 1. Redistributions of source code must retain the above copyright
     11  1.1  dholland  *    notice, this list of conditions and the following disclaimer.
     12  1.1  dholland  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  dholland  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  dholland  *    documentation and/or other materials provided with the distribution.
     15  1.1  dholland  *
     16  1.1  dholland  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.1  dholland  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  1.1  dholland  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  1.1  dholland  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.1  dholland  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     21  1.1  dholland  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     22  1.1  dholland  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     23  1.1  dholland  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     24  1.1  dholland  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  1.1  dholland  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  1.1  dholland  * SUCH DAMAGE.
     27  1.1  dholland  */
     28  1.1  dholland 
     29  1.1  dholland /* this gets its own file as LFS includes interfere with other ones */
     30  1.1  dholland 
     31  1.1  dholland #include <sys/param.h>
     32  1.1  dholland #include <sys/mount.h>
     33  1.1  dholland #include <ufs/ufs/dinode.h>
     34  1.1  dholland #include <ufs/lfs/lfs.h>
     35  1.1  dholland 
     36  1.1  dholland #include "defs.h"
     37  1.1  dholland 
     38  1.1  dholland int
     39  1.1  dholland fs_is_lfs(void *fs)
     40  1.1  dholland {
     41  1.1  dholland 	struct dlfs *dlfs = (struct dlfs *)fs;
     42  1.1  dholland 
     43  1.1  dholland 	return (dlfs->dlfs_magic == LFS_MAGIC);
     44  1.1  dholland }
     45