Browse Source

BUGFIX:

1. gettimeofday bad param list
2. No buffering at file.
pull/1/head
gkostka 11 years ago
parent
commit
0f1cc07213
  1. 3
      blockdev/filedev/ext4_filedev.c
  2. 2
      demos/generic/main.c

3
blockdev/filedev/ext4_filedev.c

@ -73,6 +73,9 @@ static int filedev_open(struct ext4_blockdev *bdev)
if(!dev_file)
return EIO;
/*No buffering at file.*/
setbuf(dev_file, 0);
if(fseek(dev_file, 0, SEEK_END))
return EFAULT;

2
demos/generic/main.c

@ -208,7 +208,7 @@ static void block_stats(void)
static clock_t get_ms(void)
{
struct timeval t;
gettimeofday(&t);
gettimeofday(&t, NULL);
return (t.tv_sec * 1000) + (t.tv_usec / 1000);
}

Loading…
Cancel
Save