Subject: Name collision between 'dump' and libc.a (#301) Index: etc/dump/{dumpmain,dumptape}.c 2.11BSD Description: 'dump' hangs or crashes when used as follows: dump 0f /usr/root.dump /dev/rra0a Repeat-By: Dump a raw device containing a filesystem to a file rather than a tape. Fix: The problem is a name collision between dump's "rewind" routine and the rewind(3) routine in /lib/libc.a. The name collision came about when the new version of 'fstab.c' (which contains the functions getfsent(3), setfsent(3), etc) was added to the system recently. The new version calls 'rewind(3)' to seek back to the beginning of /etc/fstab. But since 'dumptape.c' in the sources to dump defined 'rewind' first the libc.a definition was never seen, resulting in 'setfsent' calling the wrong function. To fix the problem the 'rewind' routine in the "dump" sources was renamed to 'tape_rewind'. Cut where indicated, saving to a file (/tmp/301). Then: patch -p0 < /tmp/301 cd /usr/src/etc/dump make make install make clean This and previous updates/fixes for 2.11BSD are available via anonymous ftp to FTP.IIPO.GTEGSC.COM in the directory /pub/2.11BSD. ============================cut here========================== *** /usr/src/etc/dump/dumpmain.c.old Tue Dec 6 21:26:20 1994 --- /usr/src/etc/dump/dumpmain.c Wed Feb 7 19:38:07 1996 *************** *** 1,5 **** #if !defined(lint) && defined(DOSCCS) ! static char *sccsid = "@(#)dumpmain.c 1.3 (2.11BSD GTE) 12/6/94"; #endif #include "dump.h" --- 1,5 ---- #if !defined(lint) && defined(DOSCCS) ! static char *sccsid = "@(#)dumpmain.c 1.4 (2.11BSD GTE) 1996/2/7"; #endif #include "dump.h" *************** *** 308,314 **** msg("DUMP IS DONE\n"); putitime(); ! rewind(); broadcast("DUMP IS DONE!\7\7\n"); Exit(X_FINOK); } --- 308,314 ---- msg("DUMP IS DONE\n"); putitime(); ! tape_rewind(); broadcast("DUMP IS DONE!\7\7\n"); Exit(X_FINOK); } *** /usr/src/etc/dump/dumptape.c.old Sun Feb 28 17:47:30 1993 --- /usr/src/etc/dump/dumptape.c Wed Feb 7 19:38:43 1996 *************** *** 5,11 **** */ #if !defined(lint) && defined(DOSCCS) ! static char sccsid[] = "@(#)dumptape.c 5.5 (Berkeley) 5/23/86"; #endif #include --- 5,11 ---- */ #if !defined(lint) && defined(DOSCCS) ! static char sccsid[] = "@(#)dumptape.c 5.5.1 (2.11BSD) 1996/2/7"; #endif #include *************** *** 147,153 **** timeest(); } ! rewind() { int f; --- 147,153 ---- timeest(); } ! tape_rewind() { int f; *************** *** 174,180 **** close_rewind() { ! rewind(); if (!nogripe) { msg("Change Tapes: Mount tape #%d\n", tapeno+1); broadcast("CHANGE TAPES!\7\7\n"); --- 174,180 ---- close_rewind() { ! tape_rewind(); if (!nogripe) { msg("Change Tapes: Mount tape #%d\n", tapeno+1); broadcast("CHANGE TAPES!\7\7\n"); *** /VERSION.old Sat Feb 3 20:58:01 1996 --- /VERSION Wed Feb 7 19:51:21 1996 *************** *** 1,4 **** ! Current Patch Level: 300 2.11 BSD ============ --- 1,4 ---- ! Current Patch Level: 301 2.11 BSD ============