From owner-svn-src-head@freebsd.org Tue Nov 22 22:11:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DB4EC4F30A; Tue, 22 Nov 2016 22:11:00 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C430D19F1; Tue, 22 Nov 2016 22:10:59 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMMAwUa074733; Tue, 22 Nov 2016 22:10:58 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMMAw0R074732; Tue, 22 Nov 2016 22:10:58 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201611222210.uAMMAw0R074732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Tue, 22 Nov 2016 22:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309025 - head/usr.sbin/fifolog/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 22:11:00 -0000 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;