Fixed issue #19 added a --version switch

Used the compile time VERSION define
Version message conforms to GNU Coding Standards


git-svn-id: http://s3fs.googlecode.com/svn/trunk@213 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
mooredan@suncup.net 2010-10-21 14:23:43 +00:00
parent 0d130efe60
commit 4dd73defab

View File

@ -1733,6 +1733,18 @@ string StringToLower(string strToConvert) {
static struct fuse_operations s3fs_oper;
int main(int argc, char *argv[]) {
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--version") == 0) {
cout << "Amazon Simple Storage Service File System " << VERSION << endl;
cout << "Copyright (C) 2010 Randy Rizun <rrizun@gmail.com>" << endl;
cout << "License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>" << endl;
cout << "This is free software: you are free to change and redistribute it." << endl;
cout << "There is NO WARRANTY, to the extent permitted by law." << endl;
exit(0);
}
}
memset(&s3fs_oper, 0, sizeof(s3fs_oper));
struct fuse_args custom_args = FUSE_ARGS_INIT(argc, argv);