mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Pass the correct size argument to ioctl(DIOCGSECTORSIZE)
This commit is contained in:
parent
ab950d2d18
commit
e10312ca7b
1 changed files with 3 additions and 1 deletions
|
|
@ -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 a new issue