david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

34 Commits

Author SHA1 Message Date
Michael Brown a258b0897b [downloader] Allow underlying downloads to provide detailed job progress
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-09-05 23:23:22 +01:00
Michael Brown 89c6db838f [downloader] Treat redirection failures as fatal
Debugged-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-04 16:20:01 +01:00
Michael Brown a8bef53908 [downloader] Update image URI in response to a redirection
Update the image's recorded URI when a download redirection occurs.
This ensures that URIs relative to a redirected download are resolved
correctly.

In particular, this allows for the use of relative URIs in scripts
that are themselves downloaded via a redirection, such as the HTTP 301
redirection used to fix up URIs pointing to directories but omitting
the trailing slash (e.g. "http://boot.ipxe.org/demo", which will be
redirected to "http://boot.ipxe.org/demo/").

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-01-09 13:30:42 +00:00
Michael Brown 2b15ae5507 [downloader] Provide direct access to the underlying data transfer buffer
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-07-22 21:17:47 +01:00
Michael Brown ae5e7f0cf4 [downloader] Use generic data-transfer buffer mechanism
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-07-22 21:17:47 +01:00
Michael Brown 2f020a8df3 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:29 +00:00
Michael Brown 4e78733094 [downloader] Profile receive datapath
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-28 12:31:39 +01:00
Michael Brown c165e8d1fc [image] Ensure every image has a fully resolved URI
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-02-27 13:32:58 +00:00
Michael Brown 5674a3c087 [job] Allow job_progress() to return an ongoing job status code, if known
Some background jobs have a meaningful ongoing status code (e.g. the
current link status for a job waiting for a network link to come up).
Allow this to be exposed via the job_progress() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 16:17:28 +00:00
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Michael Brown cef3beaba4 [downloader] Use a more meaningful error message when out of memory
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-27 00:43:07 +01:00
Michael Brown 9445cb9f8b [downloader] Abort download immediately if buffer resizing fails
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-27 00:38:19 +01:00
Michael Brown 5a91f5646a [downloader] Log final status of all downloads
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-26 22:47:50 +01:00
Michael Brown 34b6ecb2f1 [image] Simplify image management
Refactor the {load,exec} image operations as {probe,exec}.  This makes
the probe mechanism cleaner, eliminates some forward declarations,
avoids holding magic state in image->priv, eliminates the possibility
of screwing up between the "load" and "exec" stages, and makes the
documentation simpler since the concept of "loading" (as distinct from
"executing") no longer needs to be explained.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 00:37:50 +00:00
Michael Brown 3c9c27b8e6 [image] Allow download job to complete before acting upon image
Allow the monojob controlling the download to complete before calling
register_image() and friends.  This allows the trailing "ok" from
monojob.c to be printed before the image starts executing (and
possibly printing output of its own).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 19:29:24 +00:00
Michael Brown 364b92521a [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 <mcb30@ipxe.org>
2010-09-03 21:21:14 +01:00
Michael Brown 4327d5d39f [interface] Convert all data-xfer interfaces to generic interfaces
Remove data-xfer as an interface type, and replace data-xfer
interfaces with generic interfaces supporting the data-xfer methods.

Filter interfaces (as used by the TLS layer) are handled using the
generic pass-through interface capability.  A side-effect of this is
that deliver_raw() no longer exists as a data-xfer method.  (In
practice this doesn't lose any efficiency, since there are no
instances within the current codebase where xfer_deliver_raw() is used
to pass data to an interface supporting the deliver_raw() method.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 15:50:31 +01:00
Michael Brown a03dd97e6b [interface] Convert all job-control interfaces to generic interfaces
Remove job-control as an interface type, and replace job-control
interfaces with generic interfaces supporting the close() method.
(Both done() and kill() are absorbed into the function of close();
kill() is merely close(-ECANCELED).)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 14:40:09 +01:00
Michael Brown 4bfd5b52c1 [refcnt] Add ref_init() wrapper function
Standardise on using ref_init() to initialise an embedded reference
count, to match the coding style used by other embedded objects.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-06-22 14:26:40 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Michael Brown c9c411286a [job] Report progress of downloader jobs via job_progress() 2009-08-31 19:33:55 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 323cdf8c4c [xfer] Implement xfer_vreopen() to properly handle redirections
When handling a redirection event, we need to close the existing
connection before opening the new connection.
2009-03-30 13:24:56 +01:00
Michael Brown f6a8158eed Make seek information part of the xfer metadata, rather than an entirely
separate xfer method.

Add missing .alloc_iob entries to several xfer_interface_operations
structures.
2008-01-08 16:46:55 +00:00
Michael Brown b34d4d0449 Separate the "is data ready" function of xfer_seek() into an
xfer_window() function, which can return a scalar rather than a
boolean.
2007-07-08 14:11:07 +01:00
Michael Brown ca4c6f9eee Kill off unused request() method in data-xfer interface. 2007-07-08 02:10:54 +01:00
Holger Lubitz 6d0332b5b3 convert to zalloc 2007-07-06 20:19:55 +02:00
Michael Brown 73fe1ba9dd Kill off job::start() (it was only ever added as part of an aborted
attempt at triggering TCP-related protocols to start).
2007-06-28 01:09:45 +01:00
Michael Brown 7c8cc3ef6c Use standard xfer_open() argument list for downloader instantiator 2007-06-09 17:42:46 +01:00
Michael Brown 10d0a1f8c7 Modify data-xfer semantics: it is no longer necessary to call one of
request(), seek() or deliver_xxx() in order to start the data flow.
Autonomous generators must be genuinely autonomous (having their own
process), or otherwise arrange to be called.  TCP does this by
starting the retry timer immediately.

Add some debugging statements.
2007-05-26 15:04:36 +00:00
Michael Brown 59e738d756 Prefix all the open()-family routines with xfer_, to disambiguate them
from the normal POSIX-style open()
2007-05-18 14:16:06 +00:00
Michael Brown b1755462ab Do not hold self-references. This then avoids the problem of having to
ensure that we only drop our self-reference exactly once.

To maintain the guarantee that an object won't go out of scope
unexpectedly while one of its event handlers is being called, the
event-calling functions now automatically obtain and drop extra
references.
2007-05-15 16:53:46 +00:00
Michael Brown 5471bfbbbe Data-transfer interface should now be functionally complete. 2007-05-15 15:23:09 +00:00
Michael Brown 53da1f1402 Initial sketch for a downloader object 2007-05-01 00:09:19 +00:00