iPXE
Functions
cpio.c File Reference

CPIO archives. More...

#include <stdio.h>
#include <string.h>
#include <ipxe/cpio.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
void cpio_set_field (char *field, unsigned long value)
 Set field within a CPIO header. More...
 

Detailed Description

CPIO archives.

Definition in file cpio.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ cpio_set_field()

void cpio_set_field ( char *  field,
unsigned long  value 
)

Set field within a CPIO header.

Parameters
fieldField within CPIO header
valueValue to set

Definition at line 42 of file cpio.c.

42  {
43  char buf[9];
44 
45  snprintf ( buf, sizeof ( buf ), "%08lx", value );
46  memcpy ( field, buf, 8 );
47 }
void * memcpy(void *dest, const void *src, size_t len) __nonnull
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
Definition: vsprintf.c:382

References memcpy(), snprintf(), and value.

Referenced by bzimage_load_initrd(), and bzimage_parse_cpio_cmdline().