source: bootcd/isolinux/syslinux-6.03/libinstaller/syslinux.h @ dd1be7c

Last change on this file since dd1be7c was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 2.1 KB
Line 
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#ifdef __CHECKER__
21# define _slimg __attribute__((noderef,address_space(1)))
22# define _force __attribute__((force))
23#else
24# define _slimg
25# define _force
26#endif
27
28/* The standard boot sector and ldlinux image */
29extern unsigned char syslinux_bootsect[];
30extern const unsigned int syslinux_bootsect_len;
31extern const int syslinux_bootsect_mtime;
32
33extern unsigned char _slimg syslinux_ldlinux[];
34extern const unsigned int syslinux_ldlinux_len;
35extern const int syslinux_ldlinux_mtime;
36
37extern unsigned char _slimg syslinux_ldlinuxc32[];
38extern const unsigned int syslinux_ldlinuxc32_len;
39
40#define boot_sector     syslinux_bootsect
41#define boot_sector_len syslinux_bootsect_len
42#define boot_image      syslinux_ldlinux
43#define boot_image_len  syslinux_ldlinux_len
44
45extern unsigned char syslinux_mbr[];
46extern const unsigned int syslinux_mbr_len;
47extern const int syslinux_mbr_mtime;
48
49/* Sector size assumptions... */
50#define SECTOR_SHIFT    9
51#define SECTOR_SIZE     (1 << SECTOR_SHIFT)
52
53/* This takes a boot sector and merges in the syslinux fields */
54void syslinux_make_bootsect(void *bs, int fs_type);
55
56/* Check to see that what we got was indeed an MS-DOS boot sector/superblock */
57const char *syslinux_check_bootsect(const void *bs, int *fs_type);
58
59/* This patches the boot sector and ldlinux.sys based on a sector map */
60typedef uint64_t sector_t;
61int syslinux_patch(const sector_t *sectors, int nsectors,
62                   int stupid, int raid_mode,
63                   const char *subdir, const char *subvol);
64
65#endif
Note: See TracBrowser for help on using the repository browser.