Line data Source code
1 : /**
2 : * @file
3 : *
4 : * @brief
5 : *
6 : * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
7 : */
8 :
9 : #ifndef FSTAB_HPP
10 : #define FSTAB_HPP
11 :
12 : #include "coloredkdbio.hpp"
13 : #include <command.hpp>
14 : #include <kdb.hpp>
15 :
16 : class FstabCommand : public Command
17 : {
18 : kdb::KDB kdb;
19 :
20 : public:
21 : FstabCommand ();
22 : ~FstabCommand ();
23 :
24 0 : virtual std::string getShortOptions () override
25 : {
26 0 : return "";
27 : }
28 :
29 0 : virtual std::string getSynopsis () override
30 : {
31 0 : return "<key-name> <device> <mpoint> <type> <options>";
32 : }
33 :
34 78 : virtual std::string getShortHelpText () override
35 : {
36 234 : return "Create a new fstab entry.";
37 : }
38 :
39 0 : virtual std::string getLongHelpText () override
40 : {
41 : return "Because of the format of fstab entries\n"
42 : "it is not possible to set individual elements\n"
43 : "of new fstab entries.\n"
44 : "\n"
45 : "This utility creates a whole fstab entry\n"
46 : "with a single call to bypass this problem.\n"
47 : "The name of the entry will be ZZZNewFstabName\n"
48 : "because it expects the fstab plugin to rewrite\n"
49 : "the name to a proper one.\n"
50 : "\n"
51 0 : "So the command will only work with the fstab plugin mounted\n";
52 : }
53 :
54 : virtual int execute (Cmdline const & cmdline) override;
55 : };
56 :
57 : #endif
|