Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Nov 2016 22:10:58 +0000 (UTC)
From:      Poul-Henning Kamp <phk@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r309025 - head/usr.sbin/fifolog/lib
Message-ID:  <201611222210.uAMMAw0R074732@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: phk
Date: Tue Nov 22 22:10:58 2016
New Revision: 309025
URL: https://svnweb.freebsd.org/changeset/base/309025

Log:
  Pass the correct size argument to ioctl(DIOCGSECTORSIZE)

Modified:
  head/usr.sbin/fifolog/lib/fifolog_create.c

Modified: head/usr.sbin/fifolog/lib/fifolog_create.c
==============================================================================
--- head/usr.sbin/fifolog/lib/fifolog_create.c	Tue Nov 22 21:02:35 2016	(r309024)
+++ head/usr.sbin/fifolog/lib/fifolog_create.c	Tue Nov 22 22:10:58 2016	(r309025)
@@ -45,6 +45,7 @@ fifolog_create(const char *fn, off_t siz
 {
 	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 siz
 	}
 
 	/* 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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611222210.uAMMAw0R074732>