summaryrefslogtreecommitdiff
path: root/gpxe/src/core/hw.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
committerH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
commitf2f897a1762fab84d2905f32b1c15dd7b42abb56 (patch)
treea38f51d3f1fcbf44afddb4736d549c12eaf491be /gpxe/src/core/hw.c
parent72d2959272b4616f17a97667e6dfa9d06bf109a3 (diff)
downloadsyslinux-f2f897a1762fab84d2905f32b1c15dd7b42abb56.tar.gz
gpxe: delete long since obsolete snapshot of gPXE
gPXE has been deprecated in favor of iPXE for many, many years now. It is much better than users get it directly from the iPXE project, since we should no longer need any special modifications for Syslinux use. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/core/hw.c')
-rw-r--r--gpxe/src/core/hw.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/gpxe/src/core/hw.c b/gpxe/src/core/hw.c
deleted file mode 100644
index 65604ee0..00000000
--- a/gpxe/src/core/hw.c
+++ /dev/null
@@ -1,74 +0,0 @@
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <gpxe/refcnt.h>
-#include <gpxe/process.h>
-#include <gpxe/xfer.h>
-#include <gpxe/open.h>
-
-/** @file
- *
- * "Hello World" data source
- *
- */
-
-struct hw {
- struct refcnt refcnt;
- struct xfer_interface xfer;
- struct process process;
-};
-
-static const char hw_msg[] = "Hello world!\n";
-
-static void hw_finished ( struct hw *hw, int rc ) {
- xfer_nullify ( &hw->xfer );
- xfer_close ( &hw->xfer, rc );
- process_del ( &hw->process );
-}
-
-static void hw_xfer_close ( struct xfer_interface *xfer, int rc ) {
- struct hw *hw = container_of ( xfer, struct hw, xfer );
-
- hw_finished ( hw, rc );
-}
-
-static struct xfer_interface_operations hw_xfer_operations = {
- .close = hw_xfer_close,
- .vredirect = ignore_xfer_vredirect,
- .window = unlimited_xfer_window,
- .alloc_iob = default_xfer_alloc_iob,
- .deliver_iob = xfer_deliver_as_raw,
- .deliver_raw = ignore_xfer_deliver_raw,
-};
-
-static void hw_step ( struct process *process ) {
- struct hw *hw = container_of ( process, struct hw, process );
- int rc;
-
- if ( xfer_window ( &hw->xfer ) ) {
- rc = xfer_deliver_raw ( &hw->xfer, hw_msg, sizeof ( hw_msg ) );
- hw_finished ( hw, rc );
- }
-}
-
-static int hw_open ( struct xfer_interface *xfer, struct uri *uri __unused ) {
- struct hw *hw;
-
- /* Allocate and initialise structure */
- hw = zalloc ( sizeof ( *hw ) );
- if ( ! hw )
- return -ENOMEM;
- xfer_init ( &hw->xfer, &hw_xfer_operations, &hw->refcnt );
- process_init ( &hw->process, hw_step, &hw->refcnt );
-
- /* Attach parent interface, mortalise self, and return */
- xfer_plug_plug ( &hw->xfer, xfer );
- ref_put ( &hw->refcnt );
- return 0;
-}
-
-struct uri_opener hw_uri_opener __uri_opener = {
- .scheme = "hw",
- .open = hw_open,
-};