[Midnightbsd-cvs] src: usr.sbin/sysinstall: I need to pay more attention when I'm tired.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri May 2 01:51:26 EDT 2008


Log Message:
-----------
I need to pay more attention when I'm tired.

Modified Files:
--------------
    src/usr.sbin/sysinstall:
        dist.c (r1.4 -> r1.5)
        install.c (r1.4 -> r1.5)

-------------- next part --------------
Index: dist.c
===================================================================
RCS file: /home/cvs/src/usr.sbin/sysinstall/dist.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -L usr.sbin/sysinstall/dist.c -L usr.sbin/sysinstall/dist.c -u -r1.4 -r1.5
--- usr.sbin/sysinstall/dist.c
+++ usr.sbin/sysinstall/dist.c
@@ -268,15 +268,15 @@
 {
     dialog_clear_norefresh();
     if (!msgYesNo("Would you like to install the MidnightBSD ports collection?\n\n"
-		  "This will give you ready access to over 13,300 ported software packages,\n"
-		  "at a cost of around 440MB of disk space when \"clean\" and possibly\n"
+		  "This will give you ready access to over 2,000 ported software packages,\n"
+		  "at a cost of around 100MB of disk space when \"clean\" and possibly\n"
 		  "much more than that when a lot of the distribution tarballs are loaded\n"
 		  "(unless you have the extra discs available from a MidnightBSD CD/DVD distribution\n"
 		  "and can mount them on /cdrom, in which case this is far less of a problem).\n\n"
 		  "The ports collection is a very valuable resource and well worth having\n"
 		  "on your /usr partition, so it is advisable to say Yes to this option.\n\n"
 		  "For more information on the ports collection & the latest ports, visit:\n"
-		  "    http://www.midnightbsd.org/ports\n"))
+		  "    http://www.midnightbsd.org/mports\n"))
 	Dists |= DIST_PORTS;
     else
 	Dists &= ~DIST_PORTS;
@@ -365,16 +365,18 @@
 distUnsetCustom(dialogMenuItem *self)
 {
     char *cp, *cp2, *tmp;
+    size_t tmplen;
 
     if (!(tmp = variable_get(VAR_DISTS))) {
 	msgDebug("distUnsetCustom() called without %s variable set.\n", VAR_DISTS);
 	return DITEM_FAILURE;
     }
 
-    cp = alloca(strlen(tmp) + 1);
+    tmplen = strlen(tmp);
+    cp = alloca(tmplen + 1);
     if (!cp)
-	msgFatal("Couldn't alloca() %d bytes!\n", (int)(strlen(tmp) + 1));
-    strcpy(cp, tmp);
+	msgFatal("Couldn't alloca() %d bytes!\n", (int)(tmplen + 1));
+    strlcpy(cp, tmp, tmplen + 1);
     while (cp) {
 	if ((cp2 = index(cp, ' ')) != NULL)
 	    *(cp2++) = '\0';
Index: install.c
===================================================================
RCS file: /home/cvs/src/usr.sbin/sysinstall/install.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -L usr.sbin/sysinstall/install.c -L usr.sbin/sysinstall/install.c -u -r1.4 -r1.5
--- usr.sbin/sysinstall/install.c
+++ usr.sbin/sysinstall/install.c
@@ -107,9 +107,10 @@
 	for (c1 = disk->chunks->part; c1; c1 = c1->next) {
 #ifdef __ia64__
 	    c2 = c1;
+#else
 	    if (c1->type == freebsd) {
 		for (c2 = c1->part; c2; c2 = c2->next) {
-
+#endif
 		    pi = (PartInfo *)c2->private_data;
 		    if (c2->type == part && c2->subtype != FS_SWAP && pi != NULL) {
 			if (!strcmp(pi->mountpoint, "/")) {
@@ -195,8 +196,10 @@
 
 #ifdef __ia64__
 	    c2 = c1;
+#else
 	    if (c1->type == freebsd) {
 		for (c2 = c1->part; c2; c2 = c2->next) {
+#endif
 		    if (c2->type == part && c2->subtype == FS_SWAP && !SwapChunk) {
 			SwapChunk = c2;
 			if (isDebug())
@@ -1056,8 +1059,10 @@
 	if (c1->type == part) {
 		c2 = c1;
 		{
+#else
 	    if (c1->type == freebsd) {
 		for (c2 = c1->part; c2; c2 = c2->next) {
+#endif
 		    if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
 			PartInfo *tmp = (PartInfo *)c2->private_data;
 


More information about the Midnightbsd-cvs mailing list