[various] Improve documentation
Output file must be preallocated.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <getopt.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "base/output_file_requirements.h"
|
||||
#include "persistent-data/file_utils.h"
|
||||
#include "thin-provisioning/commands.h"
|
||||
#include "human_readable_format.h"
|
||||
@@ -99,7 +100,10 @@ thin_repair_cmd::run(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!output_path) {
|
||||
if (output_path)
|
||||
check_output_file_requirements(*output_path);
|
||||
|
||||
else {
|
||||
cerr << "no output file provided" << endl;
|
||||
usage(cerr);
|
||||
return 1;
|
||||
|
@@ -16,6 +16,7 @@
|
||||
// with thin-provisioning-tools. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "base/output_file_requirements.h"
|
||||
#include "persistent-data/file_utils.h"
|
||||
#include "thin-provisioning/commands.h"
|
||||
#include "thin-provisioning/emitter.h"
|
||||
@@ -138,7 +139,8 @@ thin_restore_cmd::run(int argc, char **argv)
|
||||
cerr << "No output file provided." << endl << endl;
|
||||
usage(cerr);
|
||||
return 1;
|
||||
}
|
||||
} else
|
||||
check_output_file_requirements(output);
|
||||
|
||||
return restore(input, output, quiet);
|
||||
}
|
||||
|
Reference in New Issue
Block a user