libextractor
1.11
About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.
![]() ![]() |
plugin to support RPM files More...
#include "platform.h"
#include "extractor.h"
#include <stdint.h>
#include <rpm/rpmlib.h>
#include <rpm/rpmts.h>
#include <rpm/rpmlog.h>
#include <pthread.h>
#include <sys/types.h>
#include <signal.h>
Go to the source code of this file.
Data Structures | |
struct | PipeArgs |
struct | Matches |
Macros | |
#define | BUF_SIZE (16 * 1024) |
Functions | |
static void * | pipe_feeder (void *args) |
static int | discard_log_callback (rpmlogRec rec, void *ctx) |
void | EXTRACTOR_rpm_extract_method (struct EXTRACTOR_ExtractContext *ec) |
Variables | |
static struct Matches | tests [] |
plugin to support RPM files
Definition in file rpm_extractor.c.
#define BUF_SIZE (16 * 1024) |
Size of the buffer we use for reading.
Definition at line 71 of file rpm_extractor.c.
|
static |
LOG callback called by librpm. Does nothing, we just need this to override the default behavior.
Definition at line 132 of file rpm_extractor.c.
Referenced by EXTRACTOR_rpm_extract_method().
void EXTRACTOR_rpm_extract_method | ( | struct EXTRACTOR_ExtractContext * | ec | ) |
Main entry method for the 'application/x-rpm' extraction plugin.
ec | extraction context provided to the plugin |
Definition at line 250 of file rpm_extractor.c.
References EXTRACTOR_ExtractContext::cls, discard_log_callback(), PipeArgs::ec, EXTRACTOR_METAFORMAT_UTF8, EXTRACTOR_METATYPE_MIMETYPE, PipeArgs::lock, NULL, PipeArgs::pi, pipe_feeder(), EXTRACTOR_ExtractContext::proc, Matches::rtype, PipeArgs::shutdown, Matches::tag, tests, and Matches::type.
|
static |
Main function of a helper thread that passes the package data to librpm.
args | the 'struct PipeArgs*' |
Definition at line 82 of file rpm_extractor.c.
References BUF_SIZE, EXTRACTOR_ExtractContext::cls, PipeArgs::ec, PipeArgs::lock, NULL, PipeArgs::pi, EXTRACTOR_ExtractContext::read, and PipeArgs::shutdown.
Referenced by EXTRACTOR_rpm_extract_method().
|
static |
List of mappings from RPM tags to LE types.
Definition at line 132 of file rpm_extractor.c.
Referenced by EXTRACTOR_rpm_extract_method().