Nut/OS  4.10.3
API Reference
dospart.h
Go to the documentation of this file.
00001 #ifndef FS_DOSPART_H_
00002 #define FS_DOSPART_H_
00003 
00004 /*
00005  * Copyright (C) 2005 by egnite Software GmbH. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. Neither the name of the copyright holders nor the names of
00017  *    contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00021  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00023  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00024  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00025  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00026  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00027  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00028  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00030  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  */
00035 
00056 #include <sys/types.h>
00057 #include <stdint.h>
00058 
00063 
00068 
00069 #define PTYPE_EMPTY         0x00
00070 #define PTYPE_FAT12         0x01
00071 #define PTYPE_FAT16         0x04
00072 #define PTYPE_DOS_EXT       0x05
00073 #define PTYPE_FAT16_BIG     0x06
00074 #define PTYPE_IFS           0x07
00075 #define PTYPE_OS2V1         0x08
00076 #define PTYPE_AIXDATA       0x09
00077 #define PTYPE_OS2BM         0x0A
00078 #define PTYPE_FAT32         0x0B
00079 #define PTYPE_FAT32_LBA     0x0C
00080 #define PTYPE_FAT16_LBA     0x0E
00081 #define PTYPE_EXT_LBA       0x0F
00082 #define PTYPE_OPUS          0x10
00083 #define PTYPE_FAT12_HIDDEN  0x11
00084 #define PTYPE_OEM           0x12
00085 #define PTYPE_FAT16_HIDDEN  0x14
00086 #define PTYPE_FAT16_BIGH    0x16
00087 #define PTYPE_IFS_HIDDEN    0x17
00088 #define PTYPE_AST_SLEEP     0x18
00089 #define PTYPE_FAT32_HIDDEN  0x1B
00090 #define PTYPE_FAT32_LBAH    0x1C
00091 #define PTYPE_FAT16_LBAH    0x1E
00092 #define PTYPE_DOS33_NEC     0x24
00093 #define PTYPE_JFS           0x35
00094 #define PTYPE_MINIX         0x41
00095 #define PTYPE_DYN           0x42
00096 #define PTYPE_UNIX_SYSV     0x63
00097 #define PTYPE_LINUX_SWAP    0x82
00098 #define PTYPE_LINUX         0x83
00099 #define PTYPE_PM_HIBERNATE  0x84
00100 #define PTYPE_LINUX_EXT     0x85
00101 #define PTYPE_FAT16_MULTI   0x86
00102 #define PTYPE_NTFS_MULTI    0x87
00103 #define PTYPE_LT_HIBERNATE  0xA0
00104 #define PTYPE_BSD           0xA5
00105 #define PTYPE_OPENBSD       0xA6
00106 #define PTYPE_MACOSX        0xA8
00107 #define PTYPE_NETBSD        0xA9
00108 #define PTYPE_MACOSX_BOOT   0xAB
00109 #define PTYPE_BSD_SWAP      0xB8
00110 #define PTYPE_CPM86         0xD8
00111 #define PTYPE_DATA          0xDA
00112 #define PTYPE_DRCPM         0xDB
00113 #define PTYPE_OEM_DELL      0xDE
00114 #define PTYPE_GPT           0xEE
00115 #define PTYPE_EFI           0xEF
00116 #define PTYPE_OEM_IBM       0xFE
00117 
00125 #define DOSPART_TYPEPOS     54
00126 
00130 #define DOSPART_SECTORPOS   446
00131 
00137 #define DOSPART_MAGICPOS    510
00138 
00144 typedef struct __attribute__ ((packed)) _DOSPART {
00146     uint8_t part_state;
00148     uint8_t part_start[3];
00150     uint8_t part_type;
00152     uint8_t part_end[3];
00154     uint32_t part_sect_offs;
00156     uint32_t part_sects;
00157 } DOSPART;
00158 
00161 #endif