summaryrefslogtreecommitdiffstats
path: root/src/core/parseopt.c
diff options
context:
space:
mode:
authorMichael Brown2012-03-24 02:16:37 +0100
committerMichael Brown2012-03-25 00:12:04 +0100
commit1c127a696215bd75917c3ba836c2db11636b3ffb (patch)
treebd883060a15bfae71aef090481f9ea67d4fb43bc /src/core/parseopt.c
parent[build] Fix compilation under Cygwin (diff)
downloadipxe-1c127a696215bd75917c3ba836c2db11636b3ffb.tar.gz
ipxe-1c127a696215bd75917c3ba836c2db11636b3ffb.tar.xz
ipxe-1c127a696215bd75917c3ba836c2db11636b3ffb.zip
[image] Simplify image management commands and internal API
Remove the name, cmdline, and action parameters from imgdownload() and imgdownload_string(). These functions now simply download and return an image. Add the function imgacquire(), which will interpret a "name or URI string" parameter and return either an existing image or a newly downloaded image. Use imgacquire() to merge similar image-management commands that currently differ only by whether they take the name of an existing image or the URI of a new image to download. For example, "chain" and "imgexec" can now be merged. Extend imgstat and imgfree commands to take an optional list of images. Remove the arbitrary restriction on the length of image names. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/parseopt.c')
-rw-r--r--src/core/parseopt.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/core/parseopt.c b/src/core/parseopt.c
index f953b421..2739bd87 100644
--- a/src/core/parseopt.c
+++ b/src/core/parseopt.c
@@ -115,28 +115,6 @@ int parse_netdev ( const char *text, struct net_device **netdev ) {
}
/**
- * Parse image name
- *
- * @v text Text
- * @ret image Image
- * @ret rc Return status code
- */
-int parse_image ( const char *text, struct image **image ) {
-
- /* Sanity check */
- assert ( text != NULL );
-
- /* Find network device */
- *image = find_image ( text );
- if ( ! *image ) {
- printf ( "\"%s\": no such image\n", text );
- return -ENOENT;
- }
-
- return 0;
-}
-
-/**
* Parse flag
*
* @v text Text (ignored)