From owner-freebsd-hackers Tue Jan 31 09:42:55 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id JAA22032 for hackers-outgoing; Tue, 31 Jan 1995 09:42:55 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id JAA22026 for ; Tue, 31 Jan 1995 09:42:46 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id EAA27602; Wed, 1 Feb 1995 04:39:30 +1100 Date: Wed, 1 Feb 1995 04:39:30 +1100 From: Bruce Evans Message-Id: <199501311739.EAA27602@godzilla.zeta.org.au> To: freebsd-hackers@freefall.cdrom.com, kargl@troutmask.apl.washington.edu Subject: Re: tar dumps core on 950112-SNAP Sender: hackers-owner@FreeBSD.org Precedence: bulk >Simple question: should tar dump core if it tries to >access /proc where /proc is, of course, mounted as a >procfs? No. I think /proc is still buggy. Regular files in it are irregular. Some are irregular enough to confuse tar. BTW, for `cd /proc; wc */*', wc gives up immediately after not being able to read the first file (0/ctl). >I am going to start to sup the -current tree, so I >wanted to backup my entire system. I cd to / and >simply issued `tar cvf /dev/rst0 .i >& tar.log &'. The system >barfed on /proc. If /proc is unmounted the tar executes >as expected. The following error message is printed >to the console. You have to skip /proc somehow. I use a regexp to weed out junk in "/" (most mount points, but not /usr). >One minor problem: Some programs include the following lines: >#include >int foo() { > extern char *sys_errlist[]; >.... >} >FreeBSD-2.[01].x declares >extern __const char *__const sys_errlist[]; ^^it doesn't have this bit probably should >in stdio.h. gcc complains about the redeclaration, then halts >compilation. I modified the sources to read >#include >#include >int foo() { >#if BSD < 199303 > extern char *sys_errlist[]; >#endif >.... >} >Is this the proper way to handle the problem? Not really. It works for one system, but for 100 systems that have sys_errlist it generalizes to a 100-line ifdef, and then there are systems that don't have sys_errlist but have strerror()... Bruce