Functions |
char ** | splitString (const char *str, int length, char sep) |
| Split string into fields separated by a character.
|
void | freeSplitString (char **list) |
| Free split string argv array.
|
static char * | stripTrailingChar (char *s, char c) |
| Remove occurences of trailing character from string.
|
int | dosetenv (const char *name, const char *value, int overwrite) |
| Like the libc function, but malloc()'s the space needed.
|
int | doputenv (const char *str) |
| Like the libc function, but malloc()'s the space needed.
|
int | makeTempFile (const char *prefix, const char **fnptr, FD_t *fdptr) |
| Return file handle for a temporaray file.
|
char * | currentDirectory (void) |
| Return (malloc'd) current working directory.
|
void | compressFilelist (Header h) |
| Convert absolute path tag to (dirname,basename,dirindex) tags.
|
void | expandFilelist (Header h) |
| Convert (dirname,basename,dirindex) tags to absolute path tag.
|
void | buildOrigFileList (Header h, const char ***fileListPtr, int *fileCountPtr) |
int | myGlobPatternP (const char *patternURL) |
int | rpmGlob (const char *patterns, int *argcPtr, const char ***argvPtr) |
void | providePackageNVR (Header h) |
| Retrofit a Provides: name = version-release dependency into legacy packages.
|
int | domd5 (const char *fn, unsigned char *digest, int asAscii) |
| Calculate MD5 sum for file.
|
static int | mdfile (const char *fn, unsigned char *digest) |
| Return MD5 sum of file as ASCII string.
|
static int | mdbinfile (const char *fn, unsigned char *bindigest) |
| Return MD5 sum of file as binary data.
|
int makeTempFile |
( |
const char * |
prefix, |
|
|
const char ** |
fnptr, |
|
|
FD_t * |
fdptr | |
|
) |
| | |
Return file handle for a temporaray file.
A unique temporaray file path will be generated using rpmGenPath(prefix, "%{_tmppath}/", "rpm-tmp.XXXXX") where "XXXXXX" is filled in using rand(3). The file is opened, and the link count and (dev,ino) location are verified after opening. The file name and the open file handle are returned.
- Parameters:
-
| prefix | leading part of temp file path |
- Return values:
-
| fnptr | temp file name (or NULL) |
| fdptr | temp file handle |
- Returns:
- 0 on success
Definition at line 170 of file misc.c.