xref: /haiku/src/add-ons/kernel/file_systems/fat/bsd/sys/conf.h (revision b14c5d98b225acec03021f53f8a42190eafd95e4)
1342a1b22SJim906 /*-
2342a1b22SJim906  * SPDX-License-Identifier: BSD-3-Clause
3342a1b22SJim906  *
4342a1b22SJim906  * Copyright (c) 1990, 1993
5342a1b22SJim906  *	The Regents of the University of California.  All rights reserved.
6342a1b22SJim906  * Copyright (c) 2000
7342a1b22SJim906  *	Poul-Henning Kamp.  All rights reserved.
8342a1b22SJim906  * (c) UNIX System Laboratories, Inc.
9342a1b22SJim906  * All or some portions of this file are derived from material licensed
10342a1b22SJim906  * to the University of California by American Telephone and Telegraph
11342a1b22SJim906  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
12342a1b22SJim906  * the permission of UNIX System Laboratories, Inc.
13342a1b22SJim906  *
14342a1b22SJim906  * Redistribution and use in source and binary forms, with or without
15342a1b22SJim906  * modification, are permitted provided that the following conditions
16342a1b22SJim906  * are met:
17342a1b22SJim906  * 1. Redistributions of source code must retain the above copyright
18342a1b22SJim906  *    notice, this list of conditions and the following disclaimer.
19342a1b22SJim906  * 2. Redistributions in binary form must reproduce the above copyright
20342a1b22SJim906  *    notice, this list of conditions and the following disclaimer in the
21342a1b22SJim906  *    documentation and/or other materials provided with the distribution.
22342a1b22SJim906  * 3. Neither the name of the University nor the names of its contributors
23342a1b22SJim906  *    may be used to endorse or promote products derived from this software
24342a1b22SJim906  *    without specific prior written permission.
25342a1b22SJim906  *
26342a1b22SJim906  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27342a1b22SJim906  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28342a1b22SJim906  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29342a1b22SJim906  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30342a1b22SJim906  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31342a1b22SJim906  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32342a1b22SJim906  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33342a1b22SJim906  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34342a1b22SJim906  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35342a1b22SJim906  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36342a1b22SJim906  * SUCH DAMAGE.
37342a1b22SJim906  */
38342a1b22SJim906 #ifndef FAT_CONF_H
39342a1b22SJim906 #define FAT_CONF_H
40342a1b22SJim906 
41342a1b22SJim906 
42342a1b22SJim906 // Modified to support the Haiku FAT driver.
43342a1b22SJim906 
44342a1b22SJim906 struct cdev {
45342a1b22SJim906 	int si_refcount;
46342a1b22SJim906 	struct mount* si_mountpt;
47342a1b22SJim906 	char si_name[SPECNAMELEN + 1];
48342a1b22SJim906 
49342a1b22SJim906 	// Members added for Haiku port
50342a1b22SJim906 	char si_device[B_PATH_NAME_LENGTH + 1];
51342a1b22SJim906 	int si_fd;
52342a1b22SJim906 	off_t si_mediasize;
53342a1b22SJim906 	dev_t si_id;
54342a1b22SJim906 	device_geometry* si_geometry;
55*b14c5d98SJim906 		// cylinder_count, head_count, and sectors_per_track are not always populated when mounting
56*b14c5d98SJim906 		// use si_medisize to access device size instead
57342a1b22SJim906 };
58342a1b22SJim906 
59342a1b22SJim906 /* Defined uid and gid values. */
60342a1b22SJim906 #define UID_ROOT 0
61342a1b22SJim906 #define GID_WHEEL 0
62342a1b22SJim906 
63342a1b22SJim906 
64342a1b22SJim906 #endif // FAT_CONF_H
65