53 struct uri uri_redacted;
54 char *uri_string_redacted;
58 memcpy ( &uri_redacted,
uri,
sizeof ( uri_redacted ) );
64 if ( ! uri_string_redacted ) {
86 goto err_create_downloader;
91 goto err_monojob_wait;
96 goto err_register_image;
101 err_create_downloader:
106 free ( uri_string_redacted );
193 printf (
"Could not create image\n" );
const char * equery
Query (with original URI encoding)
int imgmem(const char *name, userptr_t data, size_t len)
Create image from block of memory.
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
static void uri_put(struct uri *uri)
Decrement URI reference count.
int monojob_wait(const char *string, unsigned long timeout)
Wait for single foreground job to complete.
struct image * find_image(const char *name)
Find image by name.
struct image_type * type
Image type, if known.
struct image * image_memory(const char *name, userptr_t data, size_t len)
Create registered image from block of memory.
Uniform Resource Identifiers.
#define IMAGE_AUTO_UNREGISTER
Image will be automatically unregistered after execution.
char * name
Name of this image type.
char * cmdline
Command line to pass to image.
#define ENOMEM
Not enough space.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void * memcpy(void *dest, const void *src, size_t len) __nonnull
uint32_t userptr_t
A pointer to a user buffer.
void imgstat(struct image *image)
Display status of an image.
#define IMAGE_TAGS
Image tag table.
char * format_uri_alloc(const struct uri *uri)
Format URI.
int create_downloader(struct interface *job, struct image *image)
Instantiate a downloader.
int register_image(struct image *image)
Register executable image.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
size_t len
Length of raw file image.
#define IMAGE_HIDDEN
Image will be hidden from enumeration.
#define IMAGE_TRUSTED
Image is trusted.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
static void image_put(struct image *image)
Decrement reference count on an image.
Data transfer interface opening.
const char * efragment
Fragment (with original URI encoding)
int imgdownload_string(const char *uri_string, unsigned long timeout, struct image **image)
Download a new image.
uint8_t data[48]
Additional event data.
const char * password
Password.
const char * user
User name.
A Uniform Resource Identifier.
int imgdownload(struct uri *uri, unsigned long timeout, struct image **image)
Download a new image.
struct uri * resolve_uri(const struct uri *base_uri, struct uri *relative_uri)
Resolve base+relative URI.
struct uri * cwuri
Current working URI.
struct image * alloc_image(struct uri *uri)
Allocate executable image.
uint64_t tag
Identity tag.
#define NULL
NULL pointer (VOID *)
int imgacquire(const char *name_uri, unsigned long timeout, struct image **image)
Acquire an image.
struct uri * parse_uri(const char *uri_string)
Parse URI.