You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

imgmgmt.h 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _USR_IMGMGMT_H
  2. #define _USR_IMGMGMT_H
  3. /** @file
  4. *
  5. * Image management
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER );
  9. #include <ipxe/image.h>
  10. extern int imgdownload ( struct uri *uri, const char *name, const char *cmdline,
  11. int ( * action ) ( struct image *image ) );
  12. extern int imgdownload_string ( const char *uri_string, const char *name,
  13. const char *cmdline,
  14. int ( * action ) ( struct image *image ) );
  15. extern void imgstat ( struct image *image );
  16. extern void imgfree ( struct image *image );
  17. /**
  18. * Select an image for execution
  19. *
  20. * @v image Image
  21. * @ret rc Return status code
  22. */
  23. static inline int imgselect ( struct image *image ) {
  24. return image_select ( image );
  25. }
  26. /**
  27. * Find the previously-selected image
  28. *
  29. * @ret image Image, or NULL
  30. */
  31. static inline struct image * imgautoselect ( void ) {
  32. return image_find_selected();
  33. }
  34. /**
  35. * Execute an image
  36. *
  37. * @v image Image
  38. * @ret rc Return status code
  39. */
  40. static inline int imgexec ( struct image *image ) {
  41. return image_exec ( image );
  42. }
  43. #endif /* _USR_IMGMGMT_H */