Recent changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit 7de870993035f855e1d1299a2b5c2c90b792c238:

  Add an option "cgroup_nodelete" to not delete cgroups after job completion (2010-03-31 22:55:15 +0200)

are available in the git repository at:
  git://git.kernel.dk/fio.git master

Jens Axboe (1):
      Make the 'closest option' print a bit better

 parse.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

---

Diff of recent changes:

diff --git a/parse.c b/parse.c
index 785d569..ad2b1e3 100644
--- a/parse.c
+++ b/parse.c
@@ -837,7 +837,7 @@ static void print_option(struct fio_option *o)
 int show_cmd_help(struct fio_option *options, const char *name)
 {
 	struct fio_option *o, *closest;
-	unsigned int best_dist;
+	unsigned int best_dist = -1U;
 	int found = 0;
 	int show_all = 0;
 
@@ -890,7 +890,12 @@ int show_cmd_help(struct fio_option *options, const char *name)
 		return 0;
 
 	printf("No such command: %s", name);
-	if (closest) {
+
+	/*
+	 * Only print an appropriately close option, one where the edit
+	 * distance isn't too big. Otherwise we get crazy matches.
+	 */
+	if (closest && best_dist < 3) {
 		printf(" - showing closest match\n");
 		printf("%20s: %s\n", closest->name, closest->help);
 		show_option_help(closest, stdout);
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux