]> git.ozlabs.org Git - petitboot/blob - ui/twin/pbt-main.h
utils: Add busybox reboot script
[petitboot] / ui / twin / pbt-main.h
1 /*
2  *  Copyright Geoff Levand <geoff@infradead.org>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; version 2 of the License.
7  *
8  *  This program is distributed in the hope that it will be useful,
9  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  *  GNU General Public License for more details.
12  *
13  *  You should have received a copy of the GNU General Public License
14  *  along with this program; if not, write to the Free Software
15  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16  */
17
18 #if !defined(_PBT_MAIN_H)
19 #define _PBT_MAIN_H
20
21 #include "pbt-scr.h"
22
23 /**
24  * enum opt_value - Tri-state options variables.
25  */
26
27 enum pbt_opt_value {pbt_opt_undef = 0, pbt_opt_yes, pbt_opt_no};
28
29 /**
30  * struct opts - Values from command line options.
31  */
32
33 struct pbt_opts {
34         enum pbt_twin_backend backend;
35         enum pbt_opt_value show_help;
36         const char *log_file;
37         enum pbt_opt_value reset_defaults;
38         enum pbt_opt_value start_daemon;
39         enum pbt_opt_value use_timeout;
40         enum pbt_opt_value show_version;
41 };
42
43
44 void pbt_print_version(void);
45 void pbt_print_usage(void);
46 int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[]);
47
48 #endif