1 /* bsect.h - Boot sector handling
3 * Copyright 1992-1998 Werner Almesberger
4 * Copyright 1999-2007 John Coffman
5 * Copyright 2009-2010 Joachim Wiedorn
8 * Licensed under the terms contained in the file 'COPYING'
9 * in the source directory.
17 void bmp_do_timer(char *cp, MENUTABLE *menu);
18 void bmp_do_table(char *cp, MENUTABLE *menu);
19 void bmp_do_colors(char *cp, MENUTABLE *menu);
23 BUILTIN_FILE *select_loader(void);
24 /* return the pointer to the selected built-in secondary loader */
27 void bsect_read(char *boot_dev,BOOT_SECTOR *buffer);
28 /* Read the boot sector stored on BOOT_DEV into BUFFER. */
30 void bsect_open(char *boot_dev,char *map_file,char *install,int delay,
31 int timeout, int raid_offset);
33 /* Loads the boot sector of the specified device and merges it with a new
34 boot sector (if install != NULL). Sets the boot delay to 'delay' 1/10 sec.
35 Sets the input timeout to 'timeout' 1/10 sec (no timeout if -1). Creates a
36 temporary map file. */
38 int bsect_number(void);
39 /* Returns the number of successfully defined boot images. */
42 void check_vmdefault(void);
43 /* Verify existence of vmdefault image, if vmdefault is used */
47 void check_nokbdefault(void);
48 /* Verify existence of nokbdefault image, if nokbdefault is used */
51 void check_fallback(void);
52 /* Verifies that all fallback options specify valid images. */
54 void check_unattended(void);
55 /* checks that unattended won't hang up on password */
57 void bsect_update(char *backup_file, int force_backup, int pass);
58 /* Updates the boot sector and the map file. */
60 void bsect_raid_update(char *boot_dev, unsigned int raid_offset,
61 char *backup_file, int force_backup, int pass, int mask);
63 /* Update the boot sector and the map file, with RAID considerations */
65 void bsect_cancel(void);
67 /* Cancels all changes. (Deletes the temporary map file and doesn't update
72 /* Define a "classic" boot image. (Called from the configuration parser.) */
74 void do_unstripped(void);
76 /* Define an unstripped kernel. */
80 /* Define an other operating system. */
82 void bsect_uninstall(char *boot_dev_name,char *backup_file,int validate);
84 /* Restores the backed-up boot sector of the specified device. If
85 'boot_dev_name' is NULL, the current root device is used. If 'backup_file'
86 is NULL, the default backup file is used. A time stamp contained in the
87 boot sector is verified if 'validate' is non-zero. */