SunOS 3.5 dd (ibs == obs) != bs
Griff Smith
ggs at ulysses.homer.nj.att.com
Sat Nov 12 02:45:28 AEST 1988
In article <429 at auspex.UUCP>, guy at auspex.UUCP (Guy Harris) writes:
> The S5R3 "dd", although it has all the V7/BSD "dd" features, doesn't
> have the "fflag" hack - it may copy stuff more efficiently and thus not
> bother with that particular fast path. Griff?
I didn't use the fflag hack. The strategy on the new one is to assume
that a simple read-write loop will work until proven otherwise. For
otherwise, a large switch selects one of 28 separately coded conversion
loops to process each input block. If the fast path isn't suppressed,
the conversion dispatch loop falls into this case after doing a `read'
(flsh flushes the output buffer):
/* Simple copy: no conversion, preserve the input block size */
case COPY:
obc = ibc;
(void)flsh();
break;
The following conditions suppress the fast path:
1) A zero value for the `bs' option
2) Any data conversions other than `swab', `noerror' and `sync'.
The V9 Research Unix System version takes this one step further: it uses
the fast path if ibs == obs (at least it did the last time I checked).
I think this is wrong, it increases the chance that I will write a tape
that has the wrong block size; I have to remember to use an ibs that is
!= obs to force obs to be what I intend.
--
Griff Smith AT&T (Bell Laboratories), Murray Hill
Phone: 1-201-582-7736
UUCP: {most AT&T sites}!ulysses!ggs
Internet: ggs at ulysses.att.com
More information about the Comp.unix.questions
mailing list