Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2012 08:34:14 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r237558 - in user/ae/bootcode/sys/boot: common i386/libi386
Message-ID:  <201206250834.q5P8YEcr060773@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Mon Jun 25 08:34:14 2012
New Revision: 237558
URL: http://svn.freebsd.org/changeset/base/237558

Log:
  Change the type of d_offset field to off_t.
  In preparation to moving of the MI code from biosdisk.c to disk.c,
  add CTASSERT to check that size of struct i386_devdesc is enough to
  store disk_devdesc.

Modified:
  user/ae/bootcode/sys/boot/common/disk.h
  user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c

Modified: user/ae/bootcode/sys/boot/common/disk.h
==============================================================================
--- user/ae/bootcode/sys/boot/common/disk.h	Mon Jun 25 08:15:59 2012	(r237557)
+++ user/ae/bootcode/sys/boot/common/disk.h	Mon Jun 25 08:34:14 2012	(r237558)
@@ -84,7 +84,7 @@ struct disk_devdesc
 	void		*d_opendata;
 	int		d_slice;
 	int		d_partition;
-	int		d_offset;
+	off_t		d_offset;
 };
 
 /*

Modified: user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c	Mon Jun 25 08:15:59 2012	(r237557)
+++ user/ae/bootcode/sys/boot/i386/libi386/biosdisk.c	Mon Jun 25 08:34:14 2012	(r237558)
@@ -47,8 +47,11 @@ __FBSDID("$FreeBSD$");
 #include <bootstrap.h>
 #include <btxv86.h>
 #include <edd.h>
+#include "disk.h"
 #include "libi386.h"
 
+CTASSERT(sizeof(struct i386_devdesc) >= sizeof(struct disk_devdesc));
+
 #define BIOS_NUMDRIVES		0x475
 #define BIOSDISK_SECSIZE	512
 #define BUFSIZE			(1 * BIOSDISK_SECSIZE)



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