From 364b92521ad19051083db605de3b8a058374e096 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 2 Jul 2010 12:12:16 +0100 Subject: [xfer] Generalise metadata "whence" field to "flags" field iPXE has never supported SEEK_END; the usage of "whence" offers only the options of SEEK_SET and SEEK_CUR and so is effectively a boolean flag. Further flags will be required to support additional metadata required by the Fibre Channel network model, so repurpose the "whence" field as a generic "flags" field. xfer_seek() has always been used with SEEK_SET, so remove the "whence" field altogether from its argument list. Signed-off-by: Michael Brown --- src/core/downloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/downloader.c') diff --git a/src/core/downloader.c b/src/core/downloader.c index 488c86d9c..3e21ee9a3 100644 --- a/src/core/downloader.c +++ b/src/core/downloader.c @@ -160,7 +160,7 @@ static int downloader_xfer_deliver ( struct downloader *downloader, int rc; /* Calculate new buffer position */ - if ( meta->whence != SEEK_CUR ) + if ( meta->flags & XFER_FL_ABS_OFFSET ) downloader->pos = 0; downloader->pos += meta->offset; -- cgit v1.2.3-55-g7522