X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;ds=sidebyside;f=scandir.cc;h=3634b59e7d57ae0b83397299e04dd77b41b86f94;hb=58a0d3f8749111c15e9afa9d929016d65ed32250;hp=bf4a583848cba3eb7602ddbc1a2ba2bc3619a154;hpb=b735fd32081b00b0c94196cf77c9b465703d8da5;p=cumulus.git diff --git a/scandir.cc b/scandir.cc index bf4a583..3634b59 100644 --- a/scandir.cc +++ b/scandir.cc @@ -403,8 +403,10 @@ int main(int argc, char *argv[]) while (1) { static struct option long_options[] = { - {"localdb", 1, 0, 0}, // 0 - {"exclude", 1, 0, 0}, // 1 + {"localdb", 1, 0, 0}, // 0 + {"exclude", 1, 0, 0}, // 1 + {"filter", 1, 0, 0}, // 2 + {"filter-extension", 1, 0, 0}, // 3 {NULL, 0, 0, 0}, }; @@ -422,6 +424,12 @@ int main(int argc, char *argv[]) case 1: // --exclude excludes.push_back(optarg); break; + case 2: // --filter + filter_program = optarg; + break; + case 3: // --filter-extension + filter_extension = optarg; + break; default: fprintf(stderr, "Unhandled long option!\n"); return 1; @@ -486,9 +494,9 @@ int main(int argc, char *argv[]) segment_list.insert(root->get_ref().get_segment()); descriptor << "Format: LBS Snapshot v0.1\n"; - descriptor << "Root: " << root->get_ref().to_string() << "\n"; strftime(desc_buf, sizeof(desc_buf), "%Y-%m-%d %H:%M:%S %z", &time_buf); descriptor << "Date: " << desc_buf << "\n"; + descriptor << "Root: " << root->get_ref().to_string() << "\n"; delete root;