mkfs_msdos.h revision 289376
1/*- 2 * Copyright (c) 2015 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Ed Maste under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * $FreeBSD: head/sbin/newfs_msdos/mkfs_msdos.h 289376 2015-10-15 19:00:33Z emaste $ 30 */ 31 32struct msdos_options { 33 const char *bootstrap; 34 const char *volume_label; 35 const char *OEM_string; 36 const char *floppy; 37 u_int fat_type; 38 u_int volume_id; 39 u_int bytes_per_sector; 40 u_int sectors_per_fat; 41 u_int block_size; 42 u_int sectors_per_cluster; 43 u_int directory_entries; 44 u_int drive_heads; 45 u_int info_sector; 46 u_int backup_sector; 47 u_int media_descriptor; 48 u_int num_FAT; 49 u_int hidden_sectors; 50 u_int reserved_sectors; 51 u_int size; 52 u_int sectors_per_track; 53 int no_create; 54 off_t create_size; 55 off_t offset; 56 int volume_id_set; 57 int media_descriptor_set; 58 int hidden_sectors_set; 59}; 60 61int mkfs_msdos(const char *, const char *, const struct msdos_options *); 62