[thin_delta] --version/-V
This commit is contained in:
29
thin-provisioning/thin_delta.cc
Normal file
29
thin-provisioning/thin_delta.cc
Normal file
@@ -0,0 +1,29 @@
|
||||
#include <getopt.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "version.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
char const shortopts[] = "V";
|
||||
option const longopts[] = {
|
||||
{ "version", no_argument, NULL, 'V'}
|
||||
};
|
||||
|
||||
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'V':
|
||||
cout << THIN_PROVISIONING_TOOLS_VERSION << endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
Reference in New Issue
Block a user