xref: /haiku/src/add-ons/kernel/file_systems/fat/bsd/sys/conf.h (revision 8bacd281ba5156920f4b8cfa1da7520122beab78)
1 /*-
2  * SPDX-License-Identifier: BSD-3-Clause
3  *
4  * Copyright (c) 1990, 1993
5  *	The Regents of the University of California.  All rights reserved.
6  * Copyright (c) 2000
7  *	Poul-Henning Kamp.  All rights reserved.
8  * (c) UNIX System Laboratories, Inc.
9  * All or some portions of this file are derived from material licensed
10  * to the University of California by American Telephone and Telegraph
11  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
12  * the permission of UNIX System Laboratories, Inc.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions
16  * are met:
17  * 1. Redistributions of source code must retain the above copyright
18  *    notice, this list of conditions and the following disclaimer.
19  * 2. Redistributions in binary form must reproduce the above copyright
20  *    notice, this list of conditions and the following disclaimer in the
21  *    documentation and/or other materials provided with the distribution.
22  * 3. Neither the name of the University nor the names of its contributors
23  *    may be used to endorse or promote products derived from this software
24  *    without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36  * SUCH DAMAGE.
37  */
38 #ifndef FAT_CONF_H
39 #define FAT_CONF_H
40 
41 
42 // Modified to support the Haiku FAT driver.
43 
44 struct cdev {
45 	int si_refcount;
46 	struct mount* si_mountpt;
47 	char si_name[SPECNAMELEN + 1];
48 
49 	// Members added for Haiku port
50 	char si_device[B_PATH_NAME_LENGTH + 1];
51 	int si_fd;
52 	off_t si_mediasize;
53 	dev_t si_id;
54 	device_geometry* si_geometry;
55 		// cylinder_count, head_count, and sectors_per_track are not always populated when mounting
56 		// use si_medisize to access device size instead
57 };
58 
59 /* Defined uid and gid values. */
60 #define UID_ROOT 0
61 #define GID_WHEEL 0
62 
63 
64 #endif // FAT_CONF_H
65