RTEMS  5.0.0
Data Structures | Macros | Typedefs | Enumerations | Functions
ide_part_table.h File Reference

"MS-DOS-style" Partition Tables Support More...

#include <rtems/chain.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/endian.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <rtems.h>
#include <rtems/blkdev.h>
#include <rtems/libio.h>
#include <rtems/libio_.h>
#include <rtems/bdbuf.h>
#include <rtems/seterr.h>

Go to the source code of this file.

Data Structures

struct  rtems_sector_data_s
 
struct  rtems_part_desc_s
 
struct  rtems_disk_desc_s
 

Macros

#define RTEMS_IDE_SECTOR_BITS   9
 
#define RTEMS_IDE_SECTOR_SIZE   512
 
#define RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE   16
 
#define RTEMS_IDE_PARTITION_MAX_PARTITION_NUMBER   63
 
#define RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER   4
 
#define RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX   16
 
#define RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_DATA1   0x55
 
#define RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_DATA2   0xaa
 
#define RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_OFFSET   0x1fe
 
#define RTEMS_IDE_PARTITION_TABLE_OFFSET   0x1be
 
#define RTEMS_IDE_PARTITION_TABLE_SIZE   (4 * 16)
 
#define RTEMS_IDE_PARTITION_BOOTABLE_OFFSET   0
 
#define RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET   4
 
#define RTEMS_IDE_PARTITION_START_OFFSET   8
 
#define RTEMS_IDE_PARTITION_SIZE_OFFSET   12
 
#define LE_TO_CPU_U16(v)   le16toh(v)
 
#define LE_TO_CPU_U32(v)   le32toh(v)
 
#define CPU_TO_LE_U16(v)   htole16(v)
 
#define CPU_TO_LE_U32(v)   htole32(v)
 

Typedefs

typedef struct rtems_sector_data_s rtems_sector_data_t
 
typedef struct rtems_part_desc_s rtems_part_desc_t
 
typedef struct rtems_disk_desc_s rtems_disk_desc_t
 

Enumerations

enum  {
  EMPTY_PARTITION = 0x00, DOS_FAT12_PARTITION = 0x01, DOS_FAT16_PARTITION = 0x04, EXTENDED_PARTITION = 0x05,
  DOS_P32MB_PARTITION = 0x06, FAT32_PARTITION = 0x0B, FAT32_LBA_PARTITION = 0x0C, FAT16_LBA_PARTITION = 0x0E,
  DM6_PARTITION = 0x54, EZD_PARTITION = 0x55, DM6_AUX1PARTITION = 0x51, DM6_AUX3PARTITION = 0x53,
  LINUX_SWAP = 0x82, LINUX_NATIVE = 0x83, LINUX_EXTENDED = 0x85
}
 

Functions

void rtems_ide_part_table_free (rtems_disk_desc_t *disk_desc) RTEMS_DEPRECATED
 
rtems_status_code rtems_ide_part_table_get (const char *dev_name, rtems_disk_desc_t *disk_desc) RTEMS_DEPRECATED
 
rtems_status_code rtems_ide_part_table_initialize (const char *dev_name) RTEMS_DEPRECATED
 

Detailed Description

"MS-DOS-style" Partition Tables Support

Function Documentation

◆ rtems_ide_part_table_free()

void rtems_ide_part_table_free ( rtems_disk_desc_t disk_desc)

◆ rtems_ide_part_table_get()

rtems_status_code rtems_ide_part_table_get ( const char *  dev_name,
rtems_disk_desc_t disk_desc 
)

◆ rtems_ide_part_table_initialize()

rtems_status_code rtems_ide_part_table_initialize ( const char *  dev_name)