Christoph Egger
2007-Dec-06 18:52 UTC
[Xen-devel] [PATCH][TOOLS] blktap: factor out linux specific code
Hi! Attached patch factors out linux specific code from block drivers into a separate file. This makes it easy to add support for *BSD and Solaris. No functional change on Linux-side. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> P.S.: There can be factored out a lot of code from the block drivers into OS and block common files. -- AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
John Levon
2007-Dec-06 19:00 UTC
Re: [Xen-devel] [PATCH][TOOLS] blktap: factor out linux specific code
On Thu, Dec 06, 2007 at 07:52:32PM +0100, Christoph Egger wrote:> - s->fd_end = lseek64(fd, 0, SEEK_END); > - if (s->fd_end == (off64_t)-1) > + s->fd_end = lseek(fd, 0, SEEK_END); > + if (s->fd_end == (off_t)-1)Why this change? Seems that it will break for any large file? regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Dec-07 00:37 UTC
Re: [Xen-devel] [PATCH][TOOLS] blktap: factor out linux specific code
On 6/12/07 19:00, "John Levon" <levon@movementarian.org> wrote:> On Thu, Dec 06, 2007 at 07:52:32PM +0100, Christoph Egger wrote: > >> - s->fd_end = lseek64(fd, 0, SEEK_END); >> - if (s->fd_end == (off64_t)-1) >> + s->fd_end = lseek(fd, 0, SEEK_END); >> + if (s->fd_end == (off_t)-1) > > Why this change? Seems that it will break for any large file?Nope, we turn on implicit 64-bit-safe file operations by throwing LFS goodness into CFLAGS and LDFLAGS in tools/Rules.mk. There''s no need to use the explicit *64 function and typedef names. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel