From: Jens Axboe Date: Sat, 6 Feb 2010 22:36:26 +0000 (+0100) Subject: get_file_type() should use stat(), not lstat() X-Git-Tag: fio-1.37~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b30d395ec288508f9c787af11d0f52e9df26e39f;p=fio.git get_file_type() should use stat(), not lstat() We care about the device, not the potential link we are passed. Reported-by: "H. Tolley" Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index cbef672e..c1889813 100644 --- a/filesetup.c +++ b/filesetup.c @@ -770,7 +770,7 @@ static void get_file_type(struct fio_file *f) else f->filetype = FIO_TYPE_FILE; - if (!lstat(f->file_name, &sb)) { + if (!stat(f->file_name, &sb)) { if (S_ISBLK(sb.st_mode)) f->filetype = FIO_TYPE_BD; else if (S_ISCHR(sb.st_mode))