#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
Go to the source code of this file.
Data Structures | |
struct | magic |
union | magic::VALUETYPE |
struct | mlist |
struct | magic_set |
struct | magic_set::cont |
struct | magic_set::out |
Defines | |
#define | MAGIC "/etc/magic" |
#define | PATHSEP ':' |
#define | private static |
#define | public |
#define | HOWMANY (256 * 1024) |
#define | MAXMAGIS 8192 |
#define | MAXDESC 64 |
#define | MAXstring 32 |
#define | MAGICNO 0xF11E041C |
#define | VERSIONNO 2 |
#define | FILE_MAGICSIZE (32 * 4) |
#define | FILE_LOAD 0 |
#define | FILE_CHECK 1 |
#define | FILE_COMPILE 2 |
#define | INDIR 1 |
#define | UNSIGNED 2 |
#define | OFFADD 4 |
#define | INDIROFFADD 8 |
#define | FILE_BYTE 1 |
#define | FILE_SHORT 2 |
#define | FILE_LONG 4 |
#define | FILE_STRING 5 |
#define | FILE_DATE 6 |
#define | FILE_BESHORT 7 |
#define | FILE_BELONG 8 |
#define | FILE_BEDATE 9 |
#define | FILE_LESHORT 10 |
#define | FILE_LELONG 11 |
#define | FILE_LEDATE 12 |
#define | FILE_PSTRING 13 |
#define | FILE_LDATE 14 |
#define | FILE_BELDATE 15 |
#define | FILE_LELDATE 16 |
#define | FILE_REGEX 17 |
#define | FILE_BESTRING16 18 |
#define | FILE_LESTRING16 19 |
#define | FILE_SEARCH 20 |
#define | FILE_FORMAT_NAME |
#define | FILE_FMT_NUM "cduxXi" |
#define | FILE_FMT_STR "s" |
#define | FILE_FORMAT_STRING |
#define | FILE_OPS "&|^+-*/%" |
#define | FILE_OPAND 0 |
#define | FILE_OPOR 1 |
#define | FILE_OPXOR 2 |
#define | FILE_OPADD 3 |
#define | FILE_OPMINUS 4 |
#define | FILE_OPMULTIPLY 5 |
#define | FILE_OPDIVIDE 6 |
#define | FILE_OPMODULO 7 |
#define | FILE_OPINVERSE 0x40 |
#define | FILE_OPINDIRECT 0x80 |
#define | BIT(A) (1 << (A)) |
#define | STRING_IGNORE_LOWERCASE BIT(0) |
#define | STRING_COMPACT_BLANK BIT(1) |
#define | STRING_COMPACT_OPTIONAL_BLANK BIT(2) |
#define | CHAR_IGNORE_LOWERCASE 'c' |
#define | CHAR_COMPACT_BLANK 'B' |
#define | CHAR_COMPACT_OPTIONAL_BLANK 'b' |
#define | strerror(e) (((e) >= 0 && (e) < sys_nerr) ? sys_errlist[(e)] : "Unknown error") |
#define | strtoul(a, b, c) strtol(a, b, c) |
#define | FILE_RCSID(id) |
Functions | |
const char * | file_fmttime (uint32_t, int) |
int | file_buffer (struct magic_set *ms, int, const void *, size_t) |
int | file_fsmagic (struct magic_set *ms, const char *fn, struct stat *sb) |
int | file_pipe2file (struct magic_set *ms, int fd, const void *startbuf, size_t nbytes) |
int | file_printf (struct magic_set *ms, const char *,...) |
int | file_reset (struct magic_set *ms) |
int | file_tryelf (struct magic_set *ms, int, const unsigned char *, size_t) |
int | file_zmagic (struct magic_set *ms, int, const unsigned char *, size_t) |
int | file_ascmagic (struct magic_set *ms, const unsigned char *, size_t) |
int | file_is_tar (struct magic_set *ms, const unsigned char *, size_t) |
int | file_softmagic (struct magic_set *ms, const unsigned char *, size_t) |
mlist * | file_apprentice (struct magic_set *ms, const char *, int) |
uint32_t | file_signextend (struct magic_set *ms, struct magic *, uint32_t) |
void | file_delmagic (struct magic *p, int type, size_t entries) |
void | file_badread (struct magic_set *ms) |
void | file_badseek (struct magic_set *ms) |
void | file_oomem (struct magic_set *ms) |
void | file_error (struct magic_set *ms, int, const char *,...) |
void | file_magwarn (struct magic_set *ms, const char *,...) |
void | file_mdump (struct magic *m) |
void | file_showstr (FILE *fp, const char *, size_t) |
size_t | file_mbswidth (const char *) |
const char * | file_getbuffer (struct magic_set *ms) |
Variables | |
int | sys_nerr |
char * | sys_errlist [] |
#define FILE_FORMAT_NAME |
Value:
/* 0 */ "invalid 0", \ /* 1 */ "byte", \ /* 2 */ "short", \ /* 3 */ "invalid 3", \ /* 4 */ "long", \ /* 5 */ "string", \ /* 6 */ "date", \ /* 7 */ "beshort", \ /* 8 */ "belong", \ /* 9 */ "bedate", \ /* 10 */ "leshort", \ /* 11 */ "lelong", \ /* 12 */ "ledate", \ /* 13 */ "pstring", \ /* 14 */ "ldate", \ /* 15 */ "beldate", \ /* 16 */ "leldate", \ /* 17 */ "regex", \ /* 18 */ "bestring16", \ /* 19 */ "lestring16", \ /* 20 */ "search",
#define FILE_FORMAT_STRING |
Value:
/* 0 */ NULL, \ /* 1 */ FILE_FMT_NUM, \ /* 2 */ FILE_FMT_NUM, \ /* 3 */ NULL, \ /* 4 */ FILE_FMT_NUM, \ /* 5 */ FILE_FMT_STR, \ /* 6 */ FILE_FMT_STR, \ /* 7 */ FILE_FMT_NUM, \ /* 8 */ FILE_FMT_NUM, \ /* 9 */ FILE_FMT_STR, \ /* 10 */ FILE_FMT_NUM, \ /* 11 */ FILE_FMT_NUM, \ /* 12 */ FILE_FMT_STR, \ /* 13 */ FILE_FMT_STR, \ /* 14 */ FILE_FMT_STR, \ /* 15 */ FILE_FMT_STR, \ /* 16 */ FILE_FMT_STR, \ /* 17 */ FILE_FMT_STR, \ /* 18 */ FILE_FMT_STR, \ /* 19 */ FILE_FMT_STR, \ /* 20 */ FILE_FMT_STR,
#define FILE_RCSID | ( | id | ) |
#define strerror | ( | e | ) | (((e) >= 0 && (e) < sys_nerr) ? sys_errlist[(e)] : "Unknown error") |
Definition at line 318 of file rpmfile.h.
Referenced by checkOwners(), checkPassPhrase(), cpioStrerror(), dbiOpen(), doScript(), fdFgets(), fdWritable(), fsmStage(), Fstrerror(), getFdErrstr(), getFilesystemList(), getOutputFrom(), load(), lzdClose(), lzdWrite(), main(), makeGPGSignature(), makePGPSignature(), packageBinaries(), processSourceFiles(), rpmdbRebuild(), rpmfcClassify(), rpmGetFilesystemUsage(), rpmProblemString(), rpmQueryVerify(), runScript(), ufdRead(), ufdWrite(), unwrap(), and urlStrerror().
#define strtoul | ( | a, | |||
b, | |||||
c | ) | strtol(a, b, c) |
Definition at line 323 of file rpmfile.h.
Referenced by addCanon(), parseFormat(), parseNum(), rpmQueryVerify(), and strntoul().
int file_ascmagic | ( | struct magic_set * | ms, | |
const unsigned char * | , | |||
size_t | ||||
) |
void file_badread | ( | struct magic_set * | ms | ) |
void file_badseek | ( | struct magic_set * | ms | ) |
int file_buffer | ( | struct magic_set * | ms, | |
int | , | |||
const void * | , | |||
size_t | ||||
) |
void file_delmagic | ( | struct magic * | p, | |
int | type, | |||
size_t | entries | |||
) |
void file_error | ( | struct magic_set * | ms, | |
int | , | |||
const char * | , | |||
... | ||||
) |
const char* file_fmttime | ( | uint32_t | , | |
int | ||||
) |
int file_fsmagic | ( | struct magic_set * | ms, | |
const char * | fn, | |||
struct stat * | sb | |||
) |
const char* file_getbuffer | ( | struct magic_set * | ms | ) |
int file_is_tar | ( | struct magic_set * | ms, | |
const unsigned char * | , | |||
size_t | ||||
) |
void file_magwarn | ( | struct magic_set * | ms, | |
const char * | , | |||
... | ||||
) |
size_t file_mbswidth | ( | const char * | ) |
void file_mdump | ( | struct magic * | m | ) |
void file_oomem | ( | struct magic_set * | ms | ) |
int file_pipe2file | ( | struct magic_set * | ms, | |
int | fd, | |||
const void * | startbuf, | |||
size_t | nbytes | |||
) |
int file_printf | ( | struct magic_set * | ms, | |
const char * | , | |||
... | ||||
) |
int file_reset | ( | struct magic_set * | ms | ) |
void file_showstr | ( | FILE * | fp, | |
const char * | , | |||
size_t | ||||
) |
int file_softmagic | ( | struct magic_set * | ms, | |
const unsigned char * | , | |||
size_t | ||||
) |
int file_tryelf | ( | struct magic_set * | ms, | |
int | , | |||
const unsigned char * | , | |||
size_t | ||||
) |
int file_zmagic | ( | struct magic_set * | ms, | |
int | , | |||
const unsigned char * | , | |||
size_t | ||||
) |
char* sys_errlist[] |
int sys_nerr |