"Fossies" - the Fresh Open Source Software Archive 
Member "fstransform-0.9.4/fsremap/src/args.hh" (31 Mar 2019, 3051 Bytes) of package /linux/misc/fstransform-0.9.4.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "args.hh" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
0.9.3_vs_0.9.4.
1 /*
2 * fstransform - transform a file-system to another file-system type,
3 * preserving its contents and without the need for a backup
4 *
5 * Copyright (C) 2011-2012 Massimiliano Ghilardi
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * main.hh
21 *
22 * Created on: Mar 20, 2011
23 * Author: max
24 */
25
26 #ifndef FSREMAP_ARGS_HH
27 #define FSREMAP_ARGS_HH
28
29 #include "types.hh" // for ft_uint, ft_size
30
31 FT_NAMESPACE_BEGIN
32
33 enum fr_storage_size { FC_MEM_BUFFER_SIZE, FC_SECONDARY_STORAGE_SIZE, FC_PRIMARY_STORAGE_EXACT_SIZE, FC_SECONDARY_STORAGE_EXACT_SIZE, FC_STORAGE_SIZE_N, };
34
35 enum fr_clear_free_space { FC_CLEAR_AUTODETECT, FC_CLEAR_ALL, FC_CLEAR_MINIMAL, FC_CLEAR_NONE, };
36 enum fr_job_id_kind { FC_JOB_ID_AUTODETECT = 0 };
37 enum fr_io_kind { FC_IO_AUTODETECT, FC_IO_TEST, FC_IO_SELF_TEST, FC_IO_POSIX, FC_IO_PREALLOC };
38 enum fr_mount_points { FC_MOUNT_POINT_DEVICE = 0, FC_MOUNT_POINT_LOOP_FILE, FC_MOUNT_POINTS_N };
39 enum fr_ui_kind { FC_UI_NONE, FC_UI_TTY };
40
41 class fr_args
42 {
43 public:
44 const char * program_name; // detected from command line. default: "fsremap"
45 const char * root_dir; // write logs and persistence files inside this folder. if NULL, will autodetect
46 const char * io_args[3]; // some I/O will need less than 3 arguments
47 const char * mount_points[FC_MOUNT_POINTS_N]; // device and loop file mount points. currently only needed by fr_io_prealloc
48 const char * loop_dev; // loop device. currently only needed by fr_io_prealloc
49 const char * ui_arg;
50 const char * cmd_losetup; // 'losetup' command. currently only needed by fr_io_prealloc
51 const char * cmd_umount;
52 ft_size storage_size[FC_STORAGE_SIZE_N]; // if 0, will autodetect
53 ft_uint job_id; // if FC_JOB_ID_AUTODETECT, will autodetect
54 fr_clear_free_space job_clear;
55 fr_io_kind io_kind; // if FC_IO_AUTODETECT, will autodetect
56 fr_ui_kind ui_kind;
57 bool force_run; // if true, some sanity checks will be WARNINGS instead of ERRORS
58 bool simulate_run; // if true, remapping algorithm runs WITHOUT reading or writing device blocks
59 bool ask_questions; // if true, remapping algorithm will ask confirmation and read answer from stdin before actually starting
60
61 fr_args();
62 };
63
64
65 FT_NAMESPACE_END
66
67 #endif /* FSREMAP_ARGS_HH */