aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2012-03-24 01:16:37 +0000
committerMichael Brown <mcb30@ipxe.org>2012-03-24 23:12:04 +0000
commit1c127a696215bd75917c3ba836c2db11636b3ffb (patch)
treebd883060a15bfae71aef090481f9ea67d4fb43bc /src/tests/test.c
parent4766b1455f590760af778262be1fe2963a1549a1 (diff)
downloadipxe-1c127a696215bd75917c3ba836c2db11636b3ffb.tar.gz
[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/tests/test.c')
-rw-r--r--src/tests/test.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/tests/test.c b/src/tests/test.c
index b0a24c084..11dd2f5ef 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -149,12 +149,8 @@ static struct image_type test_image_type = {
.exec = test_image_exec,
};
-static void test_image_free ( struct refcnt *refcnt __unused ) {
- /* Do nothing */
-}
-
static struct image test_image = {
- .refcnt = REF_INIT ( test_image_free ),
+ .refcnt = REF_INIT ( ref_no_free ),
.name = "<TESTS>",
.type = &test_image_type,
};