Logo Search packages:      
Sourcecode: makebootfat version File versions  Download package

part.h

/*
 * This file is part of the Advance project.
 *
 * Copyright (C) 2004 Andrea Mazzoleni
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details. 
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __PART_H
#define __PART_H

#include "disk.h"

/**
 * Partition entry.
 */
00029 struct partition_entry {
00030       unsigned char status; /**< Boot status. */
00031       unsigned char start_head; /**< Starting head. */
00032       unsigned char start_seccyl[2]; /**< Starting sector cylinder. */
00033       unsigned char type; /**< Type. */
00034       unsigned char end_head; /**< Ending head. */
00035       unsigned char end_seccyl[2]; /**< Ending sector cylinder. */
00036       unsigned char start[4]; /**< Start linear sector. */
00037       unsigned char size[4]; /**< Size in linear sector. */
};

/**
 * Partition table.
 */
00043 struct partition_table {
00044       unsigned char bootcode[0x1BE]; /**< Boot code. */
00045       struct partition_entry entries[4]; /**< Partition entries. */
00046       unsigned char id[2]; /**< Partition ID 0xAA55. */
};

void part_setup(unsigned char* mbr, unsigned entry, unsigned fat_bit, unsigned fat_begin, unsigned fat_size, const struct disk_geometry* geometry);
int part_fat_setup(unsigned char* mbr, const unsigned char* boot, unsigned bit, unsigned pos);

#endif


Generated by  Doxygen 1.6.0   Back to index