Make a fixit.flp target too.

Improve the search code for the -u # argument to newfs.
This commit is contained in:
Poul-Henning Kamp 1995-05-21 03:20:05 +00:00
parent 0cee912e58
commit e841846b60
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8666
4 changed files with 35 additions and 19 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}