summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/dist.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-10-14 11:23:48 +0000
committerjkh <jkh@FreeBSD.org>1998-10-14 11:23:48 +0000
commit8104dd7dfbd89a424b4b21842ac6fa3751292dcc (patch)
treedb690a2b851cef4f0da6af0cbb6dc29935668305 /release/sysinstall/dist.c
parent58669a215ced32babcc670f94638c0e6b9371c73 (diff)
downloadFreeBSD-src-8104dd7dfbd89a424b4b21842ac6fa3751292dcc.zip
FreeBSD-src-8104dd7dfbd89a424b4b21842ac6fa3751292dcc.tar.gz
Use properties code.
Diffstat (limited to 'release/sysinstall/dist.c')
-rw-r--r--release/sysinstall/dist.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index b11ed60..ad2ae0c 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.126 1998/09/23 12:13:47 jkh Exp $
+ * $Id: dist.c,v 1.127 1998/09/29 07:27:33 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -37,6 +37,7 @@
#include "sysinstall.h"
#include <sys/time.h>
#include <signal.h>
+#include <libutil.h>
unsigned int Dists;
unsigned int DESDists;
@@ -558,25 +559,25 @@ distExtract(char *parent, Distribution *me)
}
}
else if (fp > 0) {
- int status;
- Attribs *dist_attr;
+ properties dist_attr;
if (isDebug())
msgDebug("Parsing attributes file for distribution %s\n", dist);
- dist_attr = alloca(sizeof(Attribs) * MAX_ATTRIBS);
- status = attr_parse(dist_attr, fp);
+ dist_attr = properties_read(fileno(fp));
intr = check_for_interrupt();
- if (intr || DITEM_STATUS(status) == DITEM_FAILURE)
+ if (intr || !dist_attr) {
msgConfirm("Cannot parse information file for the %s distribution: %s\n"
"Please verify that your media is valid and try again.",
dist, !intr ? "I/O error" : "User interrupt");
+ }
else {
- tmp = attr_match(dist_attr, "pieces");
+ tmp = property_find(dist_attr, "pieces");
if (tmp)
numchunks = strtol(tmp, 0, 0);
}
fclose(fp);
+ properties_free(dist_attr);
if (!numchunks)
continue;
}
OpenPOWER on IntegriCloud