projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
01617be
)
[PATCH] Further job parsing fixes
author
Jens Axboe
<axboe@suse.de>
Thu, 8 Dec 2005 19:05:38 +0000
(20:05 +0100)
committer
Jens Axboe
<axboe@suse.de>
Thu, 8 Dec 2005 19:05:38 +0000
(20:05 +0100)
fio-ini.c
patch
|
blob
|
blame
|
history
diff --git
a/fio-ini.c
b/fio-ini.c
index eca7e2fbb5776c2e8ddce5ddb7c901f67bf9e02d..2941a670f6a78603774b77b26d8782bc6a7378b2 100644
(file)
--- a/
fio-ini.c
+++ b/
fio-ini.c
@@
-336,7
+336,7
@@
static int str_cnv(char *p, unsigned long long *val)
char *str;
int len;
char *str;
int len;
- str = str
str(p, "="
);
+ str = str
chr(p, '='
);
if (!str)
return 1;
if (!str)
return 1;
@@
-384,7
+384,7
@@
static int check_str(char *p, char *name, str_cb_fn *cb, struct thread_data *td)
if (!s)
return 1;
if (!s)
return 1;
- s = str
str(s, "="
);
+ s = str
chr(s, '='
);
if (!s)
return 1;
if (!s)
return 1;
@@
-400,7
+400,7
@@
static int check_strstore(char *p, char *name, char *dest)
if (!s)
return 1;
if (!s)
return 1;
- s = str
str(p, "="
);
+ s = str
chr(p, '='
);
if (!s)
return 1;
if (!s)
return 1;
@@
-470,14
+470,19
@@
static int check_range(char *p, char *name, unsigned long *s, unsigned long *e)
static int check_int(char *p, char *name, unsigned int *val)
{
static int check_int(char *p, char *name, unsigned int *val)
{
- char
str[128]
;
+ char
*str
;
- sprintf(str, "%s=%%d", name);
- if (sscanf(p, str, val) == 1)
- return 0;
+ str = strstr(p, name);
+ if (!str)
+ return 1;
+
+ str = strchr(p, '=');
+ if (!str)
+ return 1;
+
+ str++;
- sprintf(str, "%s = %%d", name);
- if (sscanf(p, str, val) == 1)
+ if (sscanf(str, "%u", val) == 1)
return 0;
return 1;
return 0;
return 1;