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.

Detailed Description

CPIO archives.

Definition in file cpio.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
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.

References memcpy(), and snprintf().

Referenced by bzimage_load_initrd(), and bzimage_parse_cpio_cmdline().

                                                         {
        char buf[9];

        snprintf ( buf, sizeof ( buf ), "%08lx", value );
        memcpy ( field, buf, 8 );
}