Pass the correct size argument to ioctl(DIOCGSECTORSIZE)
This commit is contained in:
parent
ab950d2d18
commit
e10312ca7b
@ -45,6 +45,7 @@ fifolog_create(const char *fn, off_t size, ssize_t recsize)
|
||||
{
|
||||
int i, fd;
|
||||
ssize_t u;
|
||||
u_int uu;
|
||||
off_t ms;
|
||||
struct stat st;
|
||||
char *buf;
|
||||
@ -79,7 +80,8 @@ fifolog_create(const char *fn, off_t size, ssize_t recsize)
|
||||
}
|
||||
|
||||
/* For raw disk with larger sectors: use 1 sector */
|
||||
i = ioctl(fd, DIOCGSECTORSIZE, &u);
|
||||
i = ioctl(fd, DIOCGSECTORSIZE, &uu);
|
||||
u = uu;
|
||||
if (i == 0 && (u > recsize || (recsize % u) != 0))
|
||||
recsize = u;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user