pkginfo
extern int pkginfo __P((struct pkginfo *info, char *pkginst, ...));
extern int fpkginfo __P((struct pkginfo *info, char *pkginst));
extern void pkginfoFree(struct pkginfo **r_info);
extern boolean_t pkginfoIsPkgInstalled(struct pkginfo **r_pinfo,
if (inst && (pkginfo(&info, inst, NULL, NULL) == 0)) {
static struct pkginfo info;
struct pinfo *pkginfo;
pkginfo = extptr[n]->cf_ent.pinfo;
if (write(fd_drb, pkginfo,
pkginfo = pkginfo->next; /* May be several */
} while (pkginfo);
struct pinfo *pkginfo;
pkginfo = cf_ent->pinfo;
while (pkginfo) {
next = pkginfo->next;
free(pkginfo);
pkginfo = next;
assert(pinfo != (struct pkginfo *)NULL);
struct pkginfo *pinf = (struct pkginfo *)NULL;
r = pkginfo(pinf, pkgWild, NULL, NULL);
_pkginfoInit(struct pkginfo *a_info)
assert(a_info != (struct pkginfo *)NULL);
static struct pkginfo *
struct pkginfo *pinf;
pinf = (struct pkginfo *)calloc(1, sizeof (struct pkginfo));
if (pinf == (struct pkginfo *)NULL) {
pkginfoIsPkgInstalled(struct pkginfo **r_pinfo, char *a_pkgInst)
struct pkginfo *pinf;
if (r_pinfo != (struct pkginfo **)NULL) {
*r_pinfo = (struct pkginfo *)NULL;
r = pkginfo(pinf, a_pkgInst, NULL, NULL);
if (r_pinfo != (struct pkginfo **)NULL) {
static void _pkginfoInit(struct pkginfo *a_info);
static struct pkginfo *_pkginfoFactory(void);
pkginfoFree(struct pkginfo **r_info)
struct pkginfo *pinfo;
assert(r_info != (struct pkginfo **)NULL);
*r_info = (struct pkginfo *)NULL;
pkg_installed = pkginfoIsPkgInstalled((struct pkginfo **)NULL,
static struct pkginfo info;
if (pkginfo(&info, choice->pkginst, ckarch, ckvers)) {
(void) pkginfo(&info, NULL); /* free up all memory and open fds */
struct pkginfo info;
while (pkginfo(&info, newinst, NULL, NULL) == 0) {
prompt(struct pkginfo *info, int npkgs)
static char *prompt(struct pkginfo *info, int npkgs);
getinst(int *updatingExisting, struct pkginfo *info, int npkgs,
prvinfo = (struct pkginfo *)calloc(MALSIZ, sizeof (struct pkginfo));
if (pkginfo(&prvinfo[npkgs], pkgwild, NULL, NULL)) {
prvinfo = (struct pkginfo *)realloc(prvinfo,
(npkgs+MALSIZ) * sizeof (struct pkginfo));
struct pkginfo *prvinfo;
extern char *getinst __P((int *updatingExisting, struct pkginfo *info,
if (pkginfoIsPkgInstalled((struct pkginfo **)NULL, a_pkgInst) !=
struct pkginfo *pinfo = (struct pkginfo *)NULL;
extern int pkginfo(struct pkginfo *, char *, ...),
char pkginfo[MAXPATHLEN];
if (snprintf(pkginfo, sizeof (pkginfo),
>= sizeof (pkginfo))
if ((fp = fopen(pkginfo, "r")) == NULL)
fpkginfo(struct pkginfo *info, char *pkginst)
initpkg(struct pkginfo *info)
rdconfig(struct pkginfo *info, char *pkginst, char *ckvers)
static void initpkg(struct pkginfo *);
static int rdconfig(struct pkginfo *, char *, char *);
pkginfo(struct pkginfo *info, char *pkginst, ...)
extern int fpkginfo(struct pkginfo *, char *);
struct pkginfo info;
if (pkginfo(&info, "all", NULL, NULL)) {
} while (pkginfo(&info, "all", NULL, NULL) == 0);
(void) pkginfo(&info, NULL, NULL, NULL);
(void) pkginfo(&info, NULL, NULL, NULL);
pkginfo(&info, inst, NULL, NULL);
extern int fpkginfo(struct pkginfo *info, char *pkginst);
extern int fpkginfo(struct pkginfo *info, char *pkginst);
struct pkginfo info;