Deleted Added
full compact
newfs_msdos.8 (228740) newfs_msdos.8 (231564)
1.\" Copyright (c) 1998 Robert Nordier
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
20.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
22.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
24.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
1.\" Copyright (c) 1998 Robert Nordier
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
20.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
22.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
24.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/sbin/newfs_msdos/newfs_msdos.8 228740 2011-12-20 15:50:54Z pfg $
26.\" $FreeBSD: head/sbin/newfs_msdos/newfs_msdos.8 231564 2012-02-12 18:29:56Z ed $
27.\"
28.Dd July 25, 2010
29.Dt NEWFS_MSDOS 8
30.Os
31.Sh NAME
32.Nm newfs_msdos
33.Nd construct a new MS-DOS (FAT) file system
34.Sh SYNOPSIS

--- 140 unchanged lines hidden (view full) ---

175.Pp
176FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter
177Block)" in the first of the "reserved" sectors which precede the actual
178file system.
179For reference purposes, this structure is presented
180below.
181.Bd -literal
182struct bsbpb {
27.\"
28.Dd July 25, 2010
29.Dt NEWFS_MSDOS 8
30.Os
31.Sh NAME
32.Nm newfs_msdos
33.Nd construct a new MS-DOS (FAT) file system
34.Sh SYNOPSIS

--- 140 unchanged lines hidden (view full) ---

175.Pp
176FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter
177Block)" in the first of the "reserved" sectors which precede the actual
178file system.
179For reference purposes, this structure is presented
180below.
181.Bd -literal
182struct bsbpb {
183 u_int16_t bpbBytesPerSec; /* [-S] bytes per sector */
184 u_int8_t bpbSecPerClust; /* [-c] sectors per cluster */
185 u_int16_t bpbResSectors; /* [-r] reserved sectors */
186 u_int8_t bpbFATs; /* [-n] number of FATs */
187 u_int16_t bpbRootDirEnts; /* [-e] root directory entries */
188 u_int16_t bpbSectors; /* [-s] total sectors */
189 u_int8_t bpbMedia; /* [-m] media descriptor */
190 u_int16_t bpbFATsecs; /* [-a] sectors per FAT */
191 u_int16_t bpbSecPerTrack; /* [-u] sectors per track */
192 u_int16_t bpbHeads; /* [-h] drive heads */
193 u_int32_t bpbHiddenSecs; /* [-o] hidden sectors */
194 u_int32_t bpbHugeSectors; /* [-s] big total sectors */
183 uint16_t bpbBytesPerSec; /* [-S] bytes per sector */
184 uint8_t bpbSecPerClust; /* [-c] sectors per cluster */
185 uint16_t bpbResSectors; /* [-r] reserved sectors */
186 uint8_t bpbFATs; /* [-n] number of FATs */
187 uint16_t bpbRootDirEnts; /* [-e] root directory entries */
188 uint16_t bpbSectors; /* [-s] total sectors */
189 uint8_t bpbMedia; /* [-m] media descriptor */
190 uint16_t bpbFATsecs; /* [-a] sectors per FAT */
191 uint16_t bpbSecPerTrack; /* [-u] sectors per track */
192 uint16_t bpbHeads; /* [-h] drive heads */
193 uint32_t bpbHiddenSecs; /* [-o] hidden sectors */
194 uint32_t bpbHugeSectors; /* [-s] big total sectors */
195};
196/* FAT32 extensions */
197struct bsxbpb {
195};
196/* FAT32 extensions */
197struct bsxbpb {
198 u_int32_t bpbBigFATsecs; /* [-a] big sectors per FAT */
199 u_int16_t bpbExtFlags; /* control flags */
200 u_int16_t bpbFSVers; /* file system version */
201 u_int32_t bpbRootClust; /* root directory start cluster */
202 u_int16_t bpbFSInfo; /* [-i] file system info sector */
203 u_int16_t bpbBackup; /* [-k] backup boot sector */
198 uint32_t bpbBigFATsecs; /* [-a] big sectors per FAT */
199 uint16_t bpbExtFlags; /* control flags */
200 uint16_t bpbFSVers; /* file system version */
201 uint32_t bpbRootClust; /* root directory start cluster */
202 uint16_t bpbFSInfo; /* [-i] file system info sector */
203 uint16_t bpbBackup; /* [-k] backup boot sector */
204};
205.Ed
206.Sh LIMITATION
207The maximum file size is 4GB, even if the file system itself is bigger.
208.Sh EXIT STATUS
209Exit status is 0 on success and 1 on error.
210.Sh EXAMPLES
211Create a file system, using default parameters, on

--- 30 unchanged lines hidden ---
204};
205.Ed
206.Sh LIMITATION
207The maximum file size is 4GB, even if the file system itself is bigger.
208.Sh EXIT STATUS
209Exit status is 0 on success and 1 on error.
210.Sh EXAMPLES
211Create a file system, using default parameters, on

--- 30 unchanged lines hidden ---