1/* ----------------------------------------------------------------------- * 2 * 3 * Copyright 1998-2008 H. Peter Anvin - All Rights Reserved 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330, 8 * Boston MA 02111-1307, USA; either version 2 of the License, or 9 * (at your option) any later version; incorporated herein by reference. 10 * 11 * ----------------------------------------------------------------------- */ 12 13#ifndef SYSLINUX_H 14#define SYSLINUX_H 15 16#include <inttypes.h> 17#include "advconst.h" 18#include "setadv.h" 19 20/* The standard boot sector and ldlinux image */ 21extern unsigned char syslinux_bootsect[]; 22extern const unsigned int syslinux_bootsect_len; 23extern const int syslinux_bootsect_mtime; 24 25extern unsigned char syslinux_ldlinux[]; 26extern const unsigned int syslinux_ldlinux_len; 27extern const int syslinux_ldlinux_mtime; 28 29#define boot_sector syslinux_bootsect 30#define boot_sector_len syslinux_bootsect_len 31#define boot_image syslinux_ldlinux 32#define boot_image_len syslinux_ldlinux_len 33 34extern unsigned char syslinux_mbr[]; 35extern const unsigned int syslinux_mbr_len; 36extern const int syslinux_mbr_mtime; 37 38/* Sector size assumptions... */ 39#define SECTOR_SHIFT 9 40#define SECTOR_SIZE (1 << SECTOR_SHIFT) 41 42/* This takes a boot sector and merges in the syslinux fields */ 43void syslinux_make_bootsect(void *); 44 45/* Check to see that what we got was indeed an MS-DOS boot sector/superblock */ 46const char *syslinux_check_bootsect(const void *bs); 47 48/* This patches the boot sector and ldlinux.sys based on a sector map */ 49typedef uint64_t sector_t; 50int syslinux_patch(const sector_t *sectors, int nsectors, 51 int stupid, int raid_mode, 52 const char *subdir, const char *subvol); 53 54#endif 55

