Allow for the specification of bsize, fsize, and bps (blocks per segment)

for LFS filesystems.
This commit is contained in:
Justin T. Gibbs 1995-01-04 23:49:51 +00:00
parent 61acca9f2f
commit ca4693ed4b
2 changed files with 32 additions and 2 deletions

View File

@ -679,7 +679,7 @@ display(f, lp)
fprintf(f, "%d ", lp->d_drivedata[j]);
fprintf(f, "\n\n%d partitions:\n", lp->d_npartitions);
fprintf(f,
"# size offset fstype [fsize bsize cpg]\n");
"# size offset fstype [fsize bsize bps/cpg]\n");
pp = lp->d_partitions;
for (i = 0; i < lp->d_npartitions; i++, pp++) {
if (pp->p_size) {
@ -702,6 +702,12 @@ display(f, lp)
pp->p_cpg);
break;
case FS_BSDLFS:
fprintf(f, " %5d %5d %5d",
pp->p_fsize, pp->p_fsize * pp->p_frag,
pp->p_cpg);
break;
default:
fprintf(f, "%20.20s", "");
break;
@ -1120,6 +1126,15 @@ getasciilabel(f, lp)
NXTNUM(pp->p_cpg);
break;
case FS_BSDLFS:
NXTNUM(pp->p_fsize);
if (pp->p_fsize == 0)
break;
NXTNUM(v);
pp->p_frag = v / pp->p_fsize;
NXTNUM(pp->p_cpg);
break;
default:
break;
}

View File

@ -679,7 +679,7 @@ display(f, lp)
fprintf(f, "%d ", lp->d_drivedata[j]);
fprintf(f, "\n\n%d partitions:\n", lp->d_npartitions);
fprintf(f,
"# size offset fstype [fsize bsize cpg]\n");
"# size offset fstype [fsize bsize bps/cpg]\n");
pp = lp->d_partitions;
for (i = 0; i < lp->d_npartitions; i++, pp++) {
if (pp->p_size) {
@ -702,6 +702,12 @@ display(f, lp)
pp->p_cpg);
break;
case FS_BSDLFS:
fprintf(f, " %5d %5d %5d",
pp->p_fsize, pp->p_fsize * pp->p_frag,
pp->p_cpg);
break;
default:
fprintf(f, "%20.20s", "");
break;
@ -1120,6 +1126,15 @@ getasciilabel(f, lp)
NXTNUM(pp->p_cpg);
break;
case FS_BSDLFS:
NXTNUM(pp->p_fsize);
if (pp->p_fsize == 0)
break;
NXTNUM(v);
pp->p_frag = v / pp->p_fsize;
NXTNUM(pp->p_cpg);
break;
default:
break;
}