From owner-freebsd-current Wed Aug 26 06:27:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA28521 for freebsd-current-outgoing; Wed, 26 Aug 1998 06:27:08 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from goliath.camtech.net.au (goliath.camtech.net.au [203.5.73.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA28515 for ; Wed, 26 Aug 1998 06:27:06 -0700 (PDT) (envelope-from thyerm@camtech.net.au) Received: from camtech.net.au (dialup-ad-10-45.camtech.net.au [203.28.1.173]) by goliath.camtech.net.au (8.8.5/8.8.2) with ESMTP id WAA05680; Wed, 26 Aug 1998 22:55:21 +0930 (CST) Message-ID: <35E40C49.C673670C@camtech.net.au> Date: Wed, 26 Aug 1998 22:53:21 +0930 From: Matthew Thyer X-Mailer: Mozilla 4.5b1 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: joelh@gnu.org CC: wosch@panke.de.freebsd.org, current@FreeBSD.ORG Subject: Re: file segment sizes of a core dump References: <199808231906.VAA04727@campa.panke.de> <35E18FF5.B7FADA7B@camtech.net.au> <19980824193728.B4111@panke.de> <199808251931.OAA00986@detlev.UUCP> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Good point. Maybe a hybrid check which includes the /usr/share/misc/magic test and a check for the existance of the segments could be used. I dont know what segments are mandatory in a core file and it could be a truncated file so maybe this is not a good idea. Assuming the user knows what they are doing along with the magic test should be enough. Joel Ray Holveck wrote: > > >> Why require an option ? > >> Why not make size do what you want automatically when it detects > >> that you are running it on a core file ? > > How do you know that the file is a FreeBSD core file and not garbage? > > file(1) has a gross hack to identify core files, see /usr/share/misc/magic. > > Why would you run size on garbage? > > Best, > joelh > > -- > Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan > Fourth law of programming: > Anything that can go wrong wi > sendmail: segmentation violation - core dumped > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message -- /=====================================================================\ |Work: Matthew.Thyer@dsto.defence.gov.au | Home: thyerm@camtech.net.au| \=====================================================================/ "If it is true that our Universe has a zero net value for all conserved quantities, then it may simply be a fluctuation of the vacuum of some larger space in which our Universe is imbedded. In answer to the question of why it happened, I offer the modest proposal that our Universe is simply one of those things which happen from time to time." E. P. Tryon from "Nature" Vol.246 Dec.14, 1973 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message