🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by ittvaxswatt Wed, 25 Nov 1981 18:33
dd(1) bug
#6
Author: ittvaxswatt
Date: Wed, 25 Nov 1981 18:33
39 lines
1298 bytes
Wed Nov 25 18:29:27 EST 1981 (reported by swatt)
 [ ]	Bug in dd(1) "swab" routine prevents swabbing the bytes in the
	last word if the wordsize of a file is odd.  Fix is:

	-----------------------------------------------------------------
	cp /usr/src/cmd/dd.c /tmp/upd.$$.tmp ; chmod +w /tmp/upd.$$.tmp
	ed - /tmp/upd.$$.tmp <<\!xxFUNNYxx
	332c
			c = ((ibc & ~1)>>1);
	.
	1c
	static char *sccsid = "@(#)dd.c	4.2 (ITT) 11/25/81";
	.
	w
	q
	!xxFUNNYxx
	diff /usr/src/cmd/dd.c /tmp/upd.$$.tmp >/tmp/upd.$$.dif
	if cmp - /tmp/upd.$$.dif <<\!xxFUNNYxx
	1c1
	< static char *sccsid = "@(#)dd.c	4.1 (Berkeley) 10/1/80";
	---
	> static char *sccsid = "@(#)dd.c	4.2 (ITT) 11/25/81";
	332c332
	< 		c = (ibc>>1) & ~1;
	---
	> 		c = ((ibc & ~1)>>1);
	!xxFUNNYxx
	then
		: 'compare equal, ok'
		rm -f dd.c
		cp /tmp/upd.$$.tmp dd.c ; chmod a-w dd.c
	else
		echo "Old source file not same version;" \
			"use diff listings by hand"
	fi
	rm -f /tmp/upd.$$.tmp /tmp/upd.$$.dif
	-----------------------------------------------------------------
	[ /bin/dd:
		dd.c	4.1 (Berkeley) 10/1/80 ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads