Add externs to avoid multiple definitions, and then add missing definitions.
[rrq/maintain_lilo.git] / src / bsect.h
1 /* bsect.h  -  Boot sector handling
2  * 
3  * Copyright 1992-1998 Werner Almesberger
4  * Copyright 1999-2007 John Coffman
5  * Copyright 2009-2011 Joachim Wiedorn
6  * All rights reserved.
7  * 
8  * Licensed under the terms contained in the file 'COPYING'
9  * in the source directory.
10  */
11
12 #ifndef BSECT_H
13 #define BSECT_H
14 #include "common.h"
15
16 char *pw_input(void);
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);
20
21
22 #ifdef LCF_BUILTIN
23 BUILTIN_FILE *select_loader(void);
24 /* return the pointer to the selected built-in secondary loader */
25 #endif
26
27 void bsect_read(char *boot_dev,BOOT_SECTOR *buffer);
28 /* Read the boot sector stored on BOOT_DEV into BUFFER. */
29
30 void bsect_open(char *boot_dev,char *map_file,char *install,int delay,
31   int timeout, int raid_offset);
32
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. */
37
38 int bsect_number(void);
39 /* Returns the number of successfully defined boot images. */
40
41 #ifdef LCF_VIRTUAL
42 void check_vmdefault(void);
43 /* Verify existence of vmdefault image, if vmdefault is used */
44 #endif
45
46 #ifdef LCF_NOKEYBOARD
47 void check_nokbdefault(void);
48 /* Verify existence of nokbdefault image, if nokbdefault is used */
49 #endif
50
51 void check_fallback(void);
52 /* Verifies that all fallback options specify valid images. */
53
54 void check_unattended(void);
55 /* checks that unattended won't hang up on password */
56
57 void bsect_update(char *backup_file, int force_backup, int pass);
58 /* Updates the boot sector and the map file. */
59
60 void bsect_raid_update(char *boot_dev, unsigned int raid_offset, 
61         char *backup_file, int force_backup, int pass, int mask);
62
63 /* Update the boot sector and the map file, with RAID considerations */
64
65 void bsect_cancel(void);
66
67 /* Cancels all changes. (Deletes the temporary map file and doesn't update
68    the boot sector. */
69
70 void do_image(void);
71
72 /* Define a "classic" boot image. (Called from the configuration parser.) */
73
74 void do_unstripped(void);
75
76 /* Define an unstripped kernel. */
77
78 void do_other(void);
79
80 /* Define an other operating system. */
81
82 void bsect_uninstall(char *boot_dev_name,char *backup_file,int validate);
83
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. */
88
89 #endif