Improved English in the messages printed by diskerr().
Fixed some formatting bugs.
This commit is contained in:
parent
64cda4e365
commit
9fec7300da
@ -107,10 +107,10 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
|
|||||||
* 1023/255/63.
|
* 1023/255/63.
|
||||||
*/
|
*/
|
||||||
if ((ssector < ssector1
|
if ((ssector < ssector1
|
||||||
&& ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1
|
&& ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1
|
||||||
&& chs_scyl == 1023)
|
&& chs_scyl == 1023)
|
||||||
|| (secpercyl != 0
|
|| (secpercyl != 0
|
||||||
&& (ssector1 - ssector) % (1024 * secpercyl) == 0)))
|
&& (ssector1 - ssector) % (1024 * secpercyl) == 0)))
|
||||||
|| (dp->dp_scyl == 255 && dp->dp_shd == 255
|
|| (dp->dp_scyl == 255 && dp->dp_shd == 255
|
||||||
&& dp->dp_ssect == 255)) {
|
&& dp->dp_ssect == 255)) {
|
||||||
TRACE(("%s: C/H/S start %d/%d/%d, start %lu: allow\n",
|
TRACE(("%s: C/H/S start %d/%d/%d, start %lu: allow\n",
|
||||||
@ -126,10 +126,10 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset )
|
|||||||
|
|
||||||
/* Allow certain bogus C/H/S values for esector, as above. */
|
/* Allow certain bogus C/H/S values for esector, as above. */
|
||||||
if ((esector < esector1
|
if ((esector < esector1
|
||||||
&& ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1
|
&& ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1
|
||||||
&& chs_ecyl == 1023)
|
&& chs_ecyl == 1023)
|
||||||
|| (secpercyl != 0
|
|| (secpercyl != 0
|
||||||
&& (esector1 - esector) % (1024 * secpercyl) == 0)))
|
&& (esector1 - esector) % (1024 * secpercyl) == 0)))
|
||||||
|| (dp->dp_ecyl == 255 && dp->dp_ehd == 255
|
|| (dp->dp_ecyl == 255 && dp->dp_ehd == 255
|
||||||
&& dp->dp_esect == 255)) {
|
&& dp->dp_esect == 255)) {
|
||||||
TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n",
|
TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n",
|
||||||
@ -186,7 +186,7 @@ dsinit(dev, lp, sspp)
|
|||||||
bp->b_flags |= B_READ;
|
bp->b_flags |= B_READ;
|
||||||
BUF_STRATEGY(bp, 1);
|
BUF_STRATEGY(bp, 1);
|
||||||
if (biowait(bp) != 0) {
|
if (biowait(bp) != 0) {
|
||||||
diskerr(bp, "error reading primary partition table",
|
diskerr(bp, "reading primary partition table: error",
|
||||||
LOG_PRINTF, 0, (struct disklabel *)NULL);
|
LOG_PRINTF, 0, (struct disklabel *)NULL);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
error = EIO;
|
error = EIO;
|
||||||
@ -195,8 +195,7 @@ dsinit(dev, lp, sspp)
|
|||||||
|
|
||||||
/* Weakly verify it. */
|
/* Weakly verify it. */
|
||||||
cp = bp->b_data;
|
cp = bp->b_data;
|
||||||
sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE, RAW_PART,
|
sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE, RAW_PART, partname);
|
||||||
partname);
|
|
||||||
if (cp[0x1FE] != 0x55 || cp[0x1FF] != 0xAA) {
|
if (cp[0x1FE] != 0x55 || cp[0x1FF] != 0xAA) {
|
||||||
if (bootverbose)
|
if (bootverbose)
|
||||||
printf("%s: invalid primary partition table: no magic\n",
|
printf("%s: invalid primary partition table: no magic\n",
|
||||||
@ -338,7 +337,7 @@ dsinit(dev, lp, sspp)
|
|||||||
sp -= NDOSPART;
|
sp -= NDOSPART;
|
||||||
for (dospart = 0; dospart < NDOSPART; dospart++, sp++)
|
for (dospart = 0; dospart < NDOSPART; dospart++, sp++)
|
||||||
if (sp->ds_type == DOSPTYP_EXTENDED ||
|
if (sp->ds_type == DOSPTYP_EXTENDED ||
|
||||||
sp->ds_type == DOSPTYP_EXTENDEDX)
|
sp->ds_type == DOSPTYP_EXTENDEDX)
|
||||||
mbr_extended(bp->b_dev, lp, ssp,
|
mbr_extended(bp->b_dev, lp, ssp,
|
||||||
sp->ds_offset, sp->ds_size, sp->ds_offset,
|
sp->ds_offset, sp->ds_size, sp->ds_offset,
|
||||||
max_nsectors, max_ntracks, mbr_offset);
|
max_nsectors, max_ntracks, mbr_offset);
|
||||||
@ -384,7 +383,7 @@ mbr_extended(dev, lp, ssp, ext_offset, ext_size, base_ext_offset, nsectors,
|
|||||||
bp->b_flags |= B_READ;
|
bp->b_flags |= B_READ;
|
||||||
BUF_STRATEGY(bp, 1);
|
BUF_STRATEGY(bp, 1);
|
||||||
if (biowait(bp) != 0) {
|
if (biowait(bp) != 0) {
|
||||||
diskerr(bp, "error reading extended partition table",
|
diskerr(bp, "reading extended partition table: error",
|
||||||
LOG_PRINTF, 0, (struct disklabel *)NULL);
|
LOG_PRINTF, 0, (struct disklabel *)NULL);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
goto done;
|
goto done;
|
||||||
@ -412,7 +411,7 @@ mbr_extended(dev, lp, ssp, ext_offset, ext_size, base_ext_offset, nsectors,
|
|||||||
&& dp->dp_start == 0 && dp->dp_size == 0)
|
&& dp->dp_start == 0 && dp->dp_size == 0)
|
||||||
continue;
|
continue;
|
||||||
if (dp->dp_typ == DOSPTYP_EXTENDED ||
|
if (dp->dp_typ == DOSPTYP_EXTENDED ||
|
||||||
dp->dp_typ == DOSPTYP_EXTENDEDX) {
|
dp->dp_typ == DOSPTYP_EXTENDEDX) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE,
|
sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE,
|
||||||
|
Loading…
Reference in New Issue
Block a user