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_VERSION_MAIN 0 36 #define APP_VERSION_SUB 5 37 #define IMPL_NAME "*NetBSD userland UDF" 38 39 40 /* global variables describing disc and format requests */ 41 extern int fd; /* device: file descriptor */ 42 extern char *dev; /* device: name */ 43 extern struct mmc_discinfo mmc_discinfo;/* device: disc info */ 44 45 extern char *format_str; /* format: string representation */ 46 extern int format_flags; /* format: attribute flags */ 47 extern int media_accesstype; /* derived from current mmc cap */ 48 extern int check_surface; /* for rewritables */ 49 50 extern int wrtrack_skew; 51 extern int meta_perc; 52 extern float meta_fract; 53 54 55 /* shared structure between udf_create.c users */ 56 struct udf_create_context context; 57 struct udf_disclayout layout; 58 59 /* prototypes */ 60 int udf_write_sector(void *sector, uint64_t location); 61 int udf_update_trackinfo(struct mmc_discinfo *di, struct mmc_trackinfo *ti); 62 63 /* tmp */ 64 int writeout_write_queue(void); 65 int udf_surface_check(void); 66 67 #endif /* _FS_UDF_UDF_WRITE_H_ */ 68