projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3eeeab
)
Need to prefix directory= setting before checking dir part of filename=
author
Jens Axboe
<jens.axboe@oracle.com>
Mon, 7 Apr 2008 07:00:54 +0000
(09:00 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 7 Apr 2008 07:00:54 +0000
(09:00 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
options.c
patch
|
blob
|
blame
|
history
diff --git
a/options.c
b/options.c
index ead31ace29c00fb88247ea82ec76502edafb582a..20549edfe5ebbadfdc64efabf9700c0bffc74d3e 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-274,8
+274,14
@@
static int check_dir(struct thread_data *td, char *fname)
{
char file[PATH_MAX], *dir;
struct stat sb;
+ int elen = 0;
- strcpy(file, fname);
+ if (td->o.directory) {
+ strcpy(file, td->o.directory);
+ elen = strlen(file);
+ }
+
+ sprintf(file + elen, "/%s", fname);
dir = dirname(file);
if (lstat(dir, &sb) < 0) {