From owner-freebsd-current Sun Dec 10 00:23:45 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA17456 for current-outgoing; Sun, 10 Dec 1995 00:23:45 -0800 (PST) Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA17451 for ; Sun, 10 Dec 1995 00:23:43 -0800 (PST) Received: (from julian@localhost) by ref.tfs.com (8.6.12/8.6.9) id AAA08292; Sun, 10 Dec 1995 00:22:25 -0800 From: Julian Elischer Message-Id: <199512100822.AAA08292@ref.tfs.com> Subject: Re: Erk...another? DEVFS bug To: scrappy@hub.org (Marc G. Fournier) Date: Sun, 10 Dec 1995 00:22:25 -0800 (PST) Cc: current@freebsd.org In-Reply-To: from "Marc G. Fournier" at Dec 9, 95 11:42:36 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-current@freebsd.org Precedence: bulk it's stack so the size isn't important and I just wanted to be sure of being safe from over-run I can imagine an alias for a device being raw-scsi-tape-non-rewind (yuck, but it's not impossible that some specialised device might do this.. I just added char naem[32]; whenever I needed it so I didn't have to think about it.. it costs nothing to do so as these routines are called very near the end of the call tree (towards the leaves) I also didn't make them #ifdef DEVFS simply to save my fingers.. it didn't seem important to do this.. if hter's no DEVFS it's just not used, and too many #ifdef lines make the code unreadable.. hey who killed all the name[] declarations anyway? don't they READ? it's simply a case of searching for the next occurance of 'name'? > > > Hi... > > Last few I set 'name' as being 8characters, but some of the > sprintf's in st.c seem to have the potential of excceeding that. > I saw a few commits (by Bruce?) that were defining name as 32, so > have used that here. > > > *** scsi/st.c.orig Sat Dec 9 23:39:54 1995 > --- scsi/st.c Sat Dec 9 23:40:37 1995 > *************** > *** 347,352 **** > --- 347,355 ---- > st_registerdev(int unit) > { > struct kern_devconf *kdc; > + #ifdef DEVFS > + char name[32]; > + #endif > > MALLOC(kdc, struct kern_devconf *, sizeof *kdc, M_TEMP, M_NOWAIT); > if(!kdc) return; > > Marc G. Fournier | POP Mail Telnet Acct DNS Hosting > scrappy@hub.org | WWW Services Database Services | Knowledge, > soon to be: | | Information and > scrappy@ki.net | WWW: http://hub.org | Communications, Inc > >