From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: [PATCH] fs-backend: fix ioctl(BLKGETSIZE) call on 64bit Date: Tue, 15 Jul 2008 17:15:28 +0100 Message-ID: <20080715161528.GQ4529@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org fs-backend: fix ioctl(BLKGETSIZE) call on 64bit Signed-off-by: Samuel Thibault diff -r 064c96848e2f tools/fs-back/fs-ops.c --- a/tools/fs-back/fs-ops.c Mon Jul 14 16:48:24 2008 +0100 +++ b/tools/fs-back/fs-ops.c Tue Jul 15 17:16:24 2008 +0100 @@ -240,7 +240,7 @@ buf->stat_gid = stat.st_gid; #ifdef BLKGETSIZE if (S_ISBLK(stat.st_mode)) { - int sectors; + unsigned long sectors; if (ioctl(fd, BLKGETSIZE, §ors)) { perror("getting device size\n"); buf->stat_size = 0;