diff options
-rw-r--r-- | release/Makefile | 6 | ||||
-rw-r--r-- | release/sysinstall/label.c | 16 | ||||
-rw-r--r-- | usr.sbin/sade/label.c | 16 | ||||
-rw-r--r-- | usr.sbin/sysinstall/label.c | 16 |
4 files changed, 35 insertions, 19 deletions
diff --git a/release/Makefile b/release/Makefile index b3cf9bf..e7e206c 100644 --- a/release/Makefile +++ b/release/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.160 1995/05/20 13:52:53 jkh Exp $ +# $Id: Makefile,v 1.161 1995/05/20 23:33:07 phk Exp $ # # How to roll a release: # @@ -448,6 +448,10 @@ boot.flp: rm -f release.4 release.6 cd ${.CURDIR} && ${MAKE} release.4 release.6 WHICH_CRUNCH=boot +fixit.flp: + rm -f release.4 release.10 + cd ${.CURDIR} && ${MAKE} release.4 release.10 WHICH_CRUNCH=fixit + ckRELEASEDIR: .if !defined(RELEASEDIR) @echo "To make a release RELEASEDIR must be defined" && false diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c index bd45853..68db110 100644 --- a/release/sysinstall/label.c +++ b/release/sysinstall/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.12 1995/05/20 19:22:21 jkh Exp $ + * $Id: label.c,v 1.13 1995/05/21 01:56:02 phk Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -181,17 +181,21 @@ static PartInfo * new_part(char *mpoint, Boolean newfs, u_long size) { PartInfo *ret; - u_long divisor; + u_long target,divisor; ret = (PartInfo *)safe_malloc(sizeof(PartInfo)); strncpy(ret->mountpoint, mpoint, FILENAME_MAX); strcpy(ret->newfs_cmd, "newfs"); - for(divisor = 4096 ; divisor > 17*4 ; divisor--) { - if (!(size % divisor)) { - sprintf(ret->newfs_cmd+strlen(ret->newfs_cmd)," -u %ld",divisor); + ret->newfs = newfs; + for(target = size; target; target--) { + for(divisor = 4096 ; divisor > 1023; divisor--) { + if (!(target % divisor)) { + sprintf(ret->newfs_cmd+strlen(ret->newfs_cmd), + " -u %ld",divisor); + return ret; + } } } - ret->newfs = newfs; return ret; } diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index bd45853..68db110 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.12 1995/05/20 19:22:21 jkh Exp $ + * $Id: label.c,v 1.13 1995/05/21 01:56:02 phk Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -181,17 +181,21 @@ static PartInfo * new_part(char *mpoint, Boolean newfs, u_long size) { PartInfo *ret; - u_long divisor; + u_long target,divisor; ret = (PartInfo *)safe_malloc(sizeof(PartInfo)); strncpy(ret->mountpoint, mpoint, FILENAME_MAX); strcpy(ret->newfs_cmd, "newfs"); - for(divisor = 4096 ; divisor > 17*4 ; divisor--) { - if (!(size % divisor)) { - sprintf(ret->newfs_cmd+strlen(ret->newfs_cmd)," -u %ld",divisor); + ret->newfs = newfs; + for(target = size; target; target--) { + for(divisor = 4096 ; divisor > 1023; divisor--) { + if (!(target % divisor)) { + sprintf(ret->newfs_cmd+strlen(ret->newfs_cmd), + " -u %ld",divisor); + return ret; + } } } - ret->newfs = newfs; return ret; } diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index bd45853..68db110 100644 --- a/usr.sbin/sysinstall/label.c +++ b/usr.sbin/sysinstall/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.12 1995/05/20 19:22:21 jkh Exp $ + * $Id: label.c,v 1.13 1995/05/21 01:56:02 phk Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -181,17 +181,21 @@ static PartInfo * new_part(char *mpoint, Boolean newfs, u_long size) { PartInfo *ret; - u_long divisor; + u_long target,divisor; ret = (PartInfo *)safe_malloc(sizeof(PartInfo)); strncpy(ret->mountpoint, mpoint, FILENAME_MAX); strcpy(ret->newfs_cmd, "newfs"); - for(divisor = 4096 ; divisor > 17*4 ; divisor--) { - if (!(size % divisor)) { - sprintf(ret->newfs_cmd+strlen(ret->newfs_cmd)," -u %ld",divisor); + ret->newfs = newfs; + for(target = size; target; target--) { + for(divisor = 4096 ; divisor > 1023; divisor--) { + if (!(target % divisor)) { + sprintf(ret->newfs_cmd+strlen(ret->newfs_cmd), + " -u %ld",divisor); + return ret; + } } } - ret->newfs = newfs; return ret; } |