Line data Source code
1 : /* 2 : Copyright 2018-2024, Barcelona Supercomputing Center (BSC), Spain 3 : Copyright 2015-2024, Johannes Gutenberg Universitaet Mainz, Germany 4 : 5 : This software was partially supported by the 6 : EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). 7 : 8 : This software was partially supported by the 9 : ADA-FS project under the SPPEXA project funded by the DFG. 10 : 11 : This file is part of GekkoFS. 12 : 13 : GekkoFS is free software: you can redistribute it and/or modify 14 : it under the terms of the GNU General Public License as published by 15 : the Free Software Foundation, either version 3 of the License, or 16 : (at your option) any later version. 17 : 18 : GekkoFS is distributed in the hope that it will be useful, 19 : but WITHOUT ANY WARRANTY; without even the implied warranty of 20 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 : GNU General Public License for more details. 22 : 23 : You should have received a copy of the GNU General Public License 24 : along with GekkoFS. If not, see <https://www.gnu.org/licenses/>. 25 : 26 : SPDX-License-Identifier: GPL-3.0-or-later 27 : */ 28 : 29 : //#include <io/command.hpp> 30 : 31 : #include <cstdlib> 32 : #include <string> 33 : #include <CLI/CLI.hpp> 34 : #include <commands.hpp> 35 : 36 : void 37 268 : init_commands(CLI::App& app) { 38 268 : open_init(app); 39 268 : opendir_init(app); 40 268 : mkdir_init(app); 41 268 : read_init(app); 42 268 : pread_init(app); 43 268 : readv_init(app); 44 268 : preadv_init(app); 45 268 : readdir_init(app); 46 268 : rmdir_init(app); 47 268 : stat_init(app); 48 268 : write_init(app); 49 268 : pwrite_init(app); 50 268 : writev_init(app); 51 268 : pwritev_init(app); 52 : #ifdef STATX_TYPE 53 268 : statx_init(app); 54 : #endif 55 268 : lseek_init(app); 56 268 : write_validate_init(app); 57 268 : directory_validate_init(app); 58 268 : write_random_init(app); 59 268 : truncate_init(app); 60 268 : access_init(app); 61 268 : statfs_init(app); 62 : // utils 63 268 : file_compare_init(app); 64 268 : chdir_init(app); 65 268 : getcwd_validate_init(app); 66 268 : symlink_init(app); 67 268 : unlink_init(app); 68 268 : dup_validate_init(app); 69 268 : syscall_coverage_init(app); 70 268 : rename_init(app); 71 268 : } 72 : 73 : 74 : int 75 268 : main(int argc, char* argv[]) { 76 : 77 804 : CLI::App app{"GekkoFS I/O client"}; 78 268 : app.require_subcommand(1); 79 1072 : app.get_formatter()->label("REQUIRED", ""); 80 536 : app.set_help_all_flag("--help-all", "Expand all help"); 81 268 : init_commands(app); 82 268 : CLI11_PARSE(app, argc, argv); 83 : 84 : return EXIT_SUCCESS; 85 : }