diff --git a/src/bin/filteredquery/FilteredQuery.cpp b/src/bin/filteredquery/FilteredQuery.cpp index 2bd17f3cfe..03cf8a8be6 100644 --- a/src/bin/filteredquery/FilteredQuery.cpp +++ b/src/bin/filteredquery/FilteredQuery.cpp @@ -126,14 +126,6 @@ TFilteredQuery::GetNextEntry(BEntry *entry, bool traverse) } -int32 -TFilteredQuery::GetNextDirents(dirent *buf, size_t length, int32 count) -{ - // TODO: Implement ? - return 0; -} - - status_t TFilteredQuery::Clear() { diff --git a/src/bin/filteredquery/FilteredQuery.h b/src/bin/filteredquery/FilteredQuery.h index e95d3a0d55..e5c59c3a5a 100644 --- a/src/bin/filteredquery/FilteredQuery.h +++ b/src/bin/filteredquery/FilteredQuery.h @@ -34,7 +34,6 @@ public: virtual status_t GetNextRef(entry_ref *ref); virtual status_t GetNextEntry(BEntry *entry, bool traverse = false); - virtual int32 GetNextDirents(dirent *buf, size_t length, int32 count = INT_MAX); status_t Clear(); diff --git a/src/bin/filteredquery/query.cpp b/src/bin/filteredquery/query.cpp index 4377c003a8..681337dbec 100644 --- a/src/bin/filteredquery/query.cpp +++ b/src/bin/filteredquery/query.cpp @@ -63,10 +63,10 @@ bool o_subfolders = false; void usage(void) { - printf("usage: %s [ -e ] [ -a || -v ] expression\n" + printf("usage: %s [ -e ] [ -p ] [ -s ] [ -a || -v ] expression\n" " -e\t\tdon't escape meta-characters\n" - " -p \tsearch only in the given path\n" - " -s\t\tinclude subfolders (valid only if -p is used)\n" + " -p \tsearch only in the given path. Defaults to the current directory.\n" + " -s\t\tinclude subfolders\n" " -a\t\tperform the query on all volumes\n" " -v \tperform the query on just one volume; can be any\n" "\t\tfile on that volume. Defaults to the current volume.\n" @@ -84,8 +84,8 @@ perform_query(BVolume &volume, const char *predicate, const char *filterpath) // Set up the volume and predicate for the query. query.SetVolume(&volume); query.SetPredicate(predicate); + folder_params options; if (filterpath != NULL) { - folder_params options; options.path = filterpath; options.includeSubFolders = o_subfolders; query.AddFilter(FilterByFolder, &options); @@ -137,7 +137,7 @@ main(int32 argc, const char **argv) // Parse command-line arguments. int opt; - while ((opt = getopt(argc, (char **)argv, "eavsd:")) != -1) { + while ((opt = getopt(argc, (char **)argv, "easv:p:")) != -1) { switch(opt) { case 'a': o_all_volumes = true;