Recent changes

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

 



The following changes since commit 173dbaa47e3a477db65aa9fb1932a33d87436994:

  Fio 1.57 (2011-07-14 20:20:25 +0200)

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

Jens Axboe (1):
      Make string-set options behave more like bool options

 parse.c |   32 +++++++++-----------------------
 1 files changed, 9 insertions(+), 23 deletions(-)

---

Diff of recent changes:

diff --git a/parse.c b/parse.c
index ef23fbe..ad2782f 100644
--- a/parse.c
+++ b/parse.c
@@ -498,10 +498,17 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 
 		break;
 	}
-	case FIO_OPT_BOOL: {
+	case FIO_OPT_BOOL:
+	case FIO_OPT_STR_SET: {
 		fio_opt_int_fn *fn = o->cb;
 
-		ret = check_int(ptr, &il);
+		if (ptr)
+			ret = check_int(ptr, &il);
+		else if (o->type == FIO_OPT_BOOL)
+			ret = 1;
+		else
+			il = 1;
+
 		if (ret)
 			break;
 
@@ -537,27 +544,6 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 		}
 		break;
 	}
-	case FIO_OPT_STR_SET: {
-		fio_opt_str_set_fn *fn = o->cb;
-
-		if (fn)
-			ret = fn(data);
-		else {
-			if (first) {
-				if (o->roff1)
-					*(unsigned int *) o->roff1 = 1;
-				else
-					val_store(ilp, 1, o->off1, 0, data);
-			}
-			if (!more) {
-				if (o->roff2)
-					*(unsigned int *) o->roff2 = 1;
-				else if (o->off2)
-					val_store(ilp, 1, o->off2, 0, data);
-			}
-		}
-		break;
-	}
 	case FIO_OPT_DEPRECATED:
 		fprintf(stdout, "Option %s is deprecated\n", o->name);
 		break;
--
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