Home | History | Annotate | Line # | Download | only in newfs_udf
newfs_udf.h revision 1.1
      1 /*
      2  * Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions
      7  * are met:
      8  * 1. Redistributions of source code must retain the above copyright
      9  *    notice, this list of conditions and the following disclaimer.
     10  * 2. Redistributions in binary form must reproduce the above copyright
     11  *    notice, this list of conditions and the following disclaimer in the
     12  *    documentation and/or other materials provided with the distribution.
     13  *
     14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     15  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     16  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     17  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     18  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     19  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     21  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     23  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     24  *
     25  */
     26 
     27 #ifndef _FS_UDF_NEWFS_UDF_H_
     28 #define _FS_UDF_NEWFS_UDF_H_
     29 
     30 /* general settings */
     31 #define UDF_512_TRACK	0	/* NOT recommended */
     32 #define UDF_META_PERC  20	/* picked */
     33 
     34 /* Identifying myself */
     35 #define APP_NAME		"*NetBSD newfs"
     36 #define APP_VERSION_MAIN	0
     37 #define APP_VERSION_SUB		4
     38 #define IMPL_NAME		"*NetBSD userland UDF"
     39 
     40 
     41 /* global variables describing disc and format requests */
     42 extern int	 fd;				/* device: file descriptor */
     43 extern char	*dev;				/* device: name		   */
     44 extern struct mmc_discinfo mmc_discinfo;	/* device: disc info	   */
     45 
     46 extern char	*format_str;			/* format: string representation */
     47 extern int	 format_flags;			/* format: attribute flags	 */
     48 extern int	 media_accesstype;		/* derived from current mmc cap  */
     49 extern int	 check_surface;			/* for rewritables               */
     50 
     51 extern int	 wrtrack_skew;
     52 extern int	 meta_perc;
     53 extern float	 meta_fract;
     54 
     55 
     56 /* shared structure between udf_create.c users */
     57 struct udf_create_context context;
     58 struct udf_disclayout     layout;
     59 
     60 /* prototypes */
     61 int udf_write_sector(void *sector, uint32_t location);
     62 int udf_update_trackinfo(struct mmc_discinfo *di, struct mmc_trackinfo *ti);
     63 
     64 /* tmp */
     65 int writeout_write_queue(void);
     66 int udf_surface_check(void);
     67 
     68 #endif /* _FS_UDF_UDF_WRITE_H_ */
     69