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  * flow.h
36  * $Id: flow.h,v 1.10 2005/03/20 18:40:40 den Exp $
37  */
38 
39 #ifndef __FLOW_H_
40 #define __FLOW_H_
41 
42 #define	DISK_MIN	2048
43 #define	HAMMER_MIN	51200
44 #if defined(__i386__)
45 #define	SWAP_MAX	32768
46 #elif defined(__x86_64__)
47 #define	SWAP_MAX	524288
48 #endif
49 
50 #define	MTPT_ROOT	0
51 #define	MTPT_SWAP	1
52 #define	MTPT_VAR	2
53 #define	MTPT_TMP	3
54 #define	MTPT_USR	4
55 #define	MTPT_HOME	5
56 
57 struct i_fn_args;
58 int use_hammer;
59 int during_install;
60 /*** PROTOTYPES ***/
61 
62 /* Menus */
63 
64 #ifdef ENABLE_NLS
65 void		 state_lang_menu(struct i_fn_args *);
66 #endif
67 void		 state_welcome(struct i_fn_args *);
68 void		 state_welcome_system(struct i_fn_args *);
69 void 		 state_configure_menu(struct i_fn_args *);
70 void 		 state_utilities_menu(struct i_fn_args *);
71 
72 void 		 state_environment_menu(struct i_fn_args *);
73 void 		 state_diagnostics_menu(struct i_fn_args *);
74 void 		 state_diskutil_menu(struct i_fn_args *);
75 
76 /* Install */
77 
78 void		 state_begin_install(struct i_fn_args *);
79 void		 state_begin_upgrade(struct i_fn_args *);
80 void		 state_select_disk(struct i_fn_args *);
81 void		 state_ask_fs(struct i_fn_args *);
82 void		 state_format_disk(struct i_fn_args *);
83 void		 state_select_slice(struct i_fn_args *);
84 void		 state_create_subpartitions(struct i_fn_args *);
85 void		 state_install_os(struct i_fn_args *);
86 void		 state_install_bootstrap(struct i_fn_args *);
87 void		 state_finish_install(struct i_fn_args *);
88 void		 state_reboot(struct i_fn_args *);
89 void		 state_setup_remote_installation_server(struct i_fn_args *);
90 
91 /* Entry Point */
92 
93 int		 flow(int, char *, char *, int livecd_configuration, int upgrade_menu_toggle);
94 
95 #endif /* !__FLOW_H_ */
96