View | Details | Raw Unified | Return to bug 16803
Collapse All | Expand All

(-)diskslice_machdep.c (-2 / +2 lines)
Lines 121-133 Link Here
121
		  + mbr_offset;
121
		  + mbr_offset;
122
	esector1 = ssector1 + dp->dp_size - 1;
122
	esector1 = ssector1 + dp->dp_size - 1;
123
123
124
	/* Allow certain bogus C/H/S values for esector, as above. */
124
	/* Allow certain bogus C/H/S values for esector, as above and 1023/254/63. */
125
	if (esector < esector1
125
	if (esector < esector1
126
	    && ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1
126
	    && ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1
127
		 && chs_ecyl == 1023)
127
		 && chs_ecyl == 1023)
128
		|| (secpercyl != 0
128
		|| (secpercyl != 0
129
		    && (esector1 - esector) % (1024 * secpercyl) == 0))
129
		    && (esector1 - esector) % (1024 * secpercyl) == 0))
130
	    || (dp->dp_ecyl == 255 && dp->dp_ehd == 255
130
	    || (dp->dp_ecyl == 255 && dp->dp_ehd | 1 == 255
131
		&& dp->dp_esect == 255)) {
131
		&& dp->dp_esect == 255)) {
132
		TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n",
132
		TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n",
133
		       sname, chs_ecyl, dp->dp_ehd, chs_esect, esector1));
133
		       sname, chs_ecyl, dp->dp_ehd, chs_esect, esector1));

Return to bug 16803