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 1011B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 image *image, struct uri *uri,
  11. int ( * action ) ( struct image *image ) );
  12. extern int imgfetch ( struct image *image, const char *uri_string,
  13. int ( * action ) ( struct image *image ) );
  14. extern void imgstat ( struct image *image );
  15. extern void imgfree ( struct image *image );
  16. /**
  17. * Select an image for execution
  18. *
  19. * @v image Image
  20. * @ret rc Return status code
  21. */
  22. static inline int imgselect ( struct image *image ) {
  23. return image_select ( image );
  24. }
  25. /**
  26. * Find the previously-selected image
  27. *
  28. * @ret image Image, or NULL
  29. */
  30. static inline struct image * imgautoselect ( void ) {
  31. return image_find_selected();
  32. }
  33. /**
  34. * Execute an image
  35. *
  36. * @v image Image
  37. * @ret rc Return status code
  38. */
  39. static inline int imgexec ( struct image *image ) {
  40. return image_exec ( image );
  41. }
  42. #endif /* _USR_IMGMGMT_H */