Man page - libr_write(3)
Packages contains this manual
Manual
libr_write
NAMESYNOPSIS
DESCRIPTION
SEE ALSO
AUTHOR
NAME
libr_write - Adds a libr resource to an ELF binary.
SYNOPSIS
#include < libr.h >
int libr_write(libr_file *handle, char *resourcename, char *buffer, size_t size, libr_type_t type, libr_overwrite_t overwrite);
DESCRIPTION
Adds a libr-compatible resource into the ELF binary. The handle must be opened using libr_open (3) with either LIBR_WRITE or LIBR_READ_WRITE access in order to add a resource.
Parameters
handle
A handle returned
by
libr_open
(3).
resourcename
The name of the resource to create.
buffer
A string containing the data of the resource.
size
The total size of the buffer.
type
The method which should be used for storing the
data (either
LIBR_UNCOMPRESSED
or
LIBR_COMPRESSED
).
overwrite
Whether overwriting an existing resource
should be permitted (either
LIBR_NOOVERWRITE
or
LIBR_OVERWRITE
).
Returns
Returns 1 on success, 0 on failure.
SEE ALSO
libr_open (3)
AUTHOR
Erich Hoover ehoover@mines.edu