iPXE
Functions
imgarchive.c File Reference

Archive image management. More...

#include <stdio.h>
#include <string.h>
#include <ipxe/image.h>
#include <usr/imgarchive.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
 FILE_SECBOOT (PERMITTED)
 
int imgextract (struct image *image, const char *name)
 Extract archive image. More...
 

Detailed Description

Archive image management.

Definition in file imgarchive.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED  )

◆ imgextract()

int imgextract ( struct image image,
const char *  name 
)

Extract archive image.

Parameters
imageImage
nameExtracted image name (or NULL to use default)
Return values
rcReturn status code

Definition at line 45 of file imgarchive.c.

45  {
46  struct image *extracted;
47  int rc;
48 
49  /* Extract archive image */
50  if ( ( rc = image_extract ( image, name, &extracted ) ) != 0 ) {
51  printf ( "Could not extract image: %s\n", strerror ( rc ) );
52  return rc;
53  }
54 
55  return 0;
56 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
const char * name
Definition: ath9k_hw.c:1986
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:465
An executable image.
Definition: image.h:24
int image_extract(struct image *image, const char *name, struct image **extracted)
Extract archive image.
Definition: archive.c:45
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:79

References image_extract(), name, printf(), rc, and strerror().

Referenced by imgextract_exec().