From 6cb3631902fd964ad78a78a2b8af4f37d7ec5c7e Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 12 Nov 2021 20:14:00 +0100 Subject: [PATCH] Add ignored -A / --all parameter, for better mlocate compatibility. --- plocate.1 | 5 +++++ plocate.cpp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/plocate.1 b/plocate.1 index 3d02f2f..53354dc 100644 --- a/plocate.1 +++ b/plocate.1 @@ -58,6 +58,11 @@ bit set to access the index (which is built as root), but by testing visibility as the calling user. .SH OPTIONS +.TP +\fB\-A\fR, \fB\-\-all\fR +Ignored for compatibility with +.BR mlocate (1). + .TP \fB\-b\fR, \fB\-\-basename\fR Match only against the file name portion of the path name, diff --git a/plocate.cpp b/plocate.cpp index 6b8b3d8..a1cd97a 100644 --- a/plocate.cpp +++ b/plocate.cpp @@ -837,6 +837,7 @@ int main(int argc, char **argv) static const struct option long_options[] = { { "help", no_argument, 0, 'h' }, { "count", no_argument, 0, 'c' }, + { "all", no_argument, 0, 'A' }, { "basename", no_argument, 0, 'b' }, { "database", required_argument, 0, 'd' }, { "existing", no_argument, 0, 'e' }, @@ -857,11 +858,14 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); for (;;) { int option_index = 0; - int c = getopt_long(argc, argv, "bcd:ehil:n:N0rwVD", long_options, &option_index); + int c = getopt_long(argc, argv, "Abcd:ehil:n:N0rwVD", long_options, &option_index); if (c == -1) { break; } switch (c) { + case 'A': + // Ignored. + break; case 'b': match_basename = true; break; -- 2.39.2