#include "system.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include "rpmts.h"
#include "rpmlock.h"
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | rpmlock |
Defines | |
#define | RPMLOCK_PATH "/var/lock/rpm/transaction" |
Enumerations | |
enum | { RPMLOCK_READ = 1 << 0, RPMLOCK_WRITE = 1 << 1, RPMLOCK_WAIT = 1 << 2 } |
Functions | |
static rpmlock | rpmlock_new (const char *rootdir) |
static void | rpmlock_free (rpmlock lock) |
static int | rpmlock_acquire (rpmlock lock, int mode) |
static void | rpmlock_release (rpmlock lock) |
void * | rpmtsAcquireLock (rpmts ts) |
void | rpmtsFreeLock (void *lock) |
Variables | |
static const char * | rpmlock_path_default = "%{?_rpmlock_path}" |
static const char * | rpmlock_path = NULL |
#define RPMLOCK_PATH "/var/lock/rpm/transaction" |
anonymous enum |
static int rpmlock_acquire | ( | rpmlock | lock, | |
int | mode | |||
) | [static] |
Definition at line 84 of file rpmlock.c.
References rpmlock::fd, rpmlock::openmode, RPMLOCK_READ, RPMLOCK_WAIT, and SEEK_SET.
Referenced by rpmtsAcquireLock().
static void rpmlock_free | ( | rpmlock | lock | ) | [static] |
Definition at line 74 of file rpmlock.c.
References rpmlock::fd.
Referenced by rpmtsAcquireLock(), and rpmtsFreeLock().
static rpmlock rpmlock_new | ( | const char * | rootdir | ) | [static] |
Definition at line 32 of file rpmlock.c.
References _free(), rpmExpand(), RPMLOCK_PATH, rpmlock_path, rpmlock_path_default, RPMLOCK_READ, RPMLOCK_WRITE, and xstrdup().
Referenced by rpmtsAcquireLock().
static void rpmlock_release | ( | rpmlock | lock | ) | [static] |
Definition at line 109 of file rpmlock.c.
References rpmlock::fd, and SEEK_SET.
Referenced by rpmtsFreeLock().
void* rpmtsAcquireLock | ( | rpmts | ts | ) |
Definition at line 127 of file rpmlock.c.
References _, rpmlock::openmode, rpmlock_acquire(), rpmlock_free(), rpmlock_new(), rpmlock_path, RPMLOCK_WAIT, RPMLOCK_WRITE, RPMMESS_ERROR, RPMMESS_WARNING, rpmMessage, and rpmtsRootDir().
Referenced by rpmtsInitDB(), rpmtsRebuildDB(), and rpmtsRun().
void rpmtsFreeLock | ( | void * | lock | ) |
Definition at line 153 of file rpmlock.c.
References rpmlock_free(), and rpmlock_release().
Referenced by rpmtsInitDB(), rpmtsRebuildDB(), and rpmtsRun().
const char* rpmlock_path = NULL [static] |
const char* rpmlock_path_default = "%{?_rpmlock_path}" [static] |