diff options
author | jkh <jkh@FreeBSD.org> | 1996-06-08 07:15:55 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-06-08 07:15:55 +0000 |
commit | 88fea1c3af7f34d83d24cfa5e8f36b317b77d5bf (patch) | |
tree | 31f9f8b5d434abfdd2876eb3e61b16cef2c7a3c0 /usr.sbin/sysinstall/index.c | |
parent | 2a03e988da43e97ce7ad936d8d66606c4db8e434 (diff) | |
download | FreeBSD-src-88fea1c3af7f34d83d24cfa5e8f36b317b77d5bf.zip FreeBSD-src-88fea1c3af7f34d83d24cfa5e8f36b317b77d5bf.tar.gz |
Merge changes from HEAD.
Diffstat (limited to 'usr.sbin/sysinstall/index.c')
-rw-r--r-- | usr.sbin/sysinstall/index.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index d08f98b..ad537fc 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: index.c,v 1.30 1996/05/23 16:34:27 jkh Exp $ + * $Id: index.c,v 1.31 1996/06/08 07:02:19 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -384,15 +384,8 @@ pkg_checked(dialogMenuItem *self) { PkgNodePtr kp = self->data, plist = (PkgNodePtr)self->aux; - if (kp->type == PACKAGE && kp->name && plist) { - int i; - - i = index_search(plist, kp->name, NULL) ? TRUE : FALSE; - if (!RunningAsInit) - return i || package_exists(kp->name); - else - return i; - } + if (kp->type == PACKAGE && plist) + return index_search(plist, kp->name, NULL) ? TRUE : FALSE; else return FALSE; } @@ -409,16 +402,14 @@ pkg_fire(dialogMenuItem *self) sp = index_search(plist, kp->name, NULL); /* Not already selected? */ if (!sp) { - if (RunningAsInit || !package_exists(kp->name)) { - PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode)); + PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode)); - *np = *kp; - np->next = plist->kids; - plist->kids = np; - msgInfo("Added %s to selection list", kp->name); - } + *np = *kp; + np->next = plist->kids; + plist->kids = np; + msgInfo("Added %s to selection list", kp->name); } - else { + else if (sp) { msgInfo("Removed %s from selection list", kp->name); index_delete(sp); } |