lib/cpio.c File Reference
Handle cpio payloads within rpm packages.
More...
#include "system.h"
#include "fsm.h"
#include <sys/types.h>
#include <rpmio_internal.h>
#include <rpmlib.h>
#include "rpmerr.h"
#include "debug.h"
Go to the source code of this file.
Detailed Description
Handle cpio payloads within rpm packages.
- Warning:
- FIXME: We don't translate between cpio and system mode bits! These should both be the same, but really odd things are going to happen if that's not true!
Definition in file cpio.c.
Define Documentation
#define GET_NUM_FIELD |
( |
phys, |
|
|
log |
|
) |
|
Value:
Definition at line 49 of file cpio.c.
#define SET_NUM_FIELD |
( |
phys, |
|
|
val, |
|
|
space |
|
) |
|
Value:sprintf(space, "%8.8lx", (unsigned long) (val)); \
memcpy(phys, space, 8);
Definition at line 52 of file cpio.c.
Function Documentation
int cpioHeaderRead |
( |
FSM_t |
fsm, |
|
|
struct stat * |
st | |
|
) |
| | |
Read cpio header.
- Return values:
-
| fsm | file path and stat info |
- Returns:
- 0 on success
< Don't depend on sizeof(struct)
Definition at line 118 of file cpio.c.
int cpioHeaderWrite |
( |
FSM_t |
fsm, |
|
|
struct stat * |
st | |
|
) |
| | |
Write cpio header.
- Return values:
-
| fsm | file path and stat info |
- Returns:
- 0 on success
< Don't depend on sizeof(struct)
< Don't depend on sizeof(struct)
Definition at line 82 of file cpio.c.
int cpioTrailerWrite |
( |
FSM_t |
fsm |
) |
|
Write cpio trailer.
- Return values:
-
| fsm | file path and stat info |
- Returns:
- 0 on success
< Don't depend on sizeof(struct)
< Don't depend on sizeof(struct)
< Don't depend on sizeof(struct)
Definition at line 56 of file cpio.c.
static int strntoul |
( |
const char * |
str, |
|
|
char ** |
endptr, |
|
|
int |
base, |
|
|
int |
num | |
|
) |
| | [static] |
Convert string to unsigned integer (with buffer size check).
- Parameters:
-
- Return values:
-
| address | of 1st character not processed |
- Parameters:
-
| base | numerical conversion base |
| num | max no. of bytes to read |
- Returns:
- converted integer
Definition at line 30 of file cpio.c.
Variable Documentation
Definition at line 20 of file fsm.c.