Di_system_dpkg

## Macros

#define | DI_SYSTEM_DPKG_ADMINDIR "/var/lib/dpkg/"
#define | DI_SYSTEM_DPKG_INFODIR DI_SYSTEM_DPKG_ADMINDIR "info/"
#define | DI_SYSTEM_DPKG_STATUSFILE DI_SYSTEM_DPKG_ADMINDIR "status"
#define | DI_SYSTEM_DPKG_TMPCONTROLDIR DI_SYSTEM_DPKG_ADMINDIR "tmp.ci/"

## Functions

int | di_system_dpkg_package_control_file_exec (di_package *package, const char *name, int argc, const char *const argv[])

## Detailed Description

## Function Documentation

## di_system_dpkg_package_control_file_exec()

int di_system_dpkg_package_control_file_exec | ( | di_package * | package,
|  | const char * | name,
|  | int | argc,
|  | const char *const | argv[] )

{
char buf[PATH_MAX];
const char *real_argv[argc + 2];
int i;
struct stat statbuf;
snprintf (buf, sizeof (buf), "%s%s.%s", DI_SYSTEM_DPKG_INFODIR, package->package, name);
if (stat (buf, &statbuf))
return -1;
if (!S_ISREG (statbuf.st_mode))
return -1;
real_argv[0] = buf;
for (i = 0; i < argc; i++)
real_argv[i+1] = argv[i];
real_argv[argc + 1] = NULL;
i = di_exec (buf, real_argv);
return di_exec_mangle_status (i);
}
di_exec
static int di_exec(const char *path, const char *const argv[])
Definition exec.h:78
di_exec_mangle_status
int di_exec_mangle_status(int status)
Definition exec.c:272
di_package::package
char * package
Definition package.h:99