1 /*
2  * Copyright (c)2004 The DragonFly Project.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  *   Redistributions of source code must retain the above copyright
9  *   notice, this list of conditions and the following disclaimer.
10  *
11  *   Redistributions in binary form must reproduce the above copyright
12  *   notice, this list of conditions and the following disclaimer in
13  *   the documentation and/or other materials provided with the
14  *   distribution.
15  *
16  *   Neither the name of the DragonFly Project nor the names of its
17  *   contributors may be used to endorse or promote products derived
18  *   from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31  * OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 /*
35  * fn.h
36  * $Id: fn.h,v 1.3 2005/02/07 06:46:20 cpressey Exp $
37  */
38 
39 #ifndef __FN_H_
40 #define __FN_H_
41 
42 #include "libaura/dict.h"
43 #include "libdfui/dfui.h"
44 
45 #include "libinstaller/functions.h"
46 
47 /*** PROTOTYPES ***/
48 
49 /* General fn_ functions */
50 
51 void		 fn_select_disk(struct i_fn_args *);
52 void		 fn_select_slice(struct i_fn_args *);
53 void		 fn_get_passphrase(struct i_fn_args *);
54 
55 /* Configure an Installed System (only) */
56 
57 void 		 fn_root_passwd(struct i_fn_args *);
58 void 		 fn_add_user(struct i_fn_args *);
59 void		 fn_install_packages(struct i_fn_args *);
60 void		 fn_remove_packages(struct i_fn_args *);
61 void		 fn_select_services(struct i_fn_args *);
62 
63 int		 mount_target_system(struct i_fn_args *);
64 
65 /* Configure the LiveCD Environment -or- an Installed System */
66 
67 void		 fn_assign_datetime(struct i_fn_args *);
68 void		 fn_set_timezone(struct i_fn_args *);
69 void 		 fn_set_kbdmap(struct i_fn_args *);
70 void 		 fn_set_vidfont(struct i_fn_args *);
71 void 		 fn_set_scrnmap(struct i_fn_args *);
72 void		 fn_assign_hostname_domain(struct i_fn_args *);
73 void		 fn_assign_ip(struct i_fn_args *);
74 
75 /* LiveCD Utilities: Diagnostics */
76 
77 void		 fn_show_dmesg(struct i_fn_args *);
78 void		 fn_show_pciconf(struct i_fn_args *);
79 void		 fn_show_natacontrol(struct i_fn_args *);
80 
81 void		 show_ifconfig(struct dfui_connection *, char *);
82 
83 /* LiveCD Utilties: Disk Utilities */
84 
85 char		*fn_select_file(const char *, const char *, const char *,
86 				const char *, const char *, const char *,
87 				const struct i_fn_args *);
88 
89 void		 fn_format_disk_mbr(struct i_fn_args *);
90 void		 fn_format_disk_uefi(struct i_fn_args *);
91 void		 fn_install_bootblocks(struct i_fn_args *, const char *device);
92 void		 fn_wipe_start_of_disk(struct i_fn_args *);
93 void		 fn_wipe_start_of_slice(struct i_fn_args *);
94 void		 fn_format_msdos_floppy(struct i_fn_args *);
95 void		 fn_create_cdboot_floppy(struct i_fn_args *);
96 
97 int		 format_slice(struct i_fn_args *);
98 
99 void		 fn_create_subpartitions_ufs(struct i_fn_args *);
100 void		 fn_create_subpartitions_hammer(int which, struct i_fn_args *);
101 void		 fn_install_os(struct i_fn_args *);
102 
103 /* Global variables */
104 
105 struct		config_vars *rc_conf;
106 
107 #endif /* !__FN_H_ */
108