Date: Sun, 10 Dec 1995 00:22:25 -0800 (PST) From: Julian Elischer <julian@ref.tfs.com> To: scrappy@hub.org (Marc G. Fournier) Cc: current@freebsd.org Subject: Re: Erk...another? DEVFS bug Message-ID: <199512100822.AAA08292@ref.tfs.com> In-Reply-To: <Pine.BSF.3.91.951209234108.14962B-100000@hub.org> from "Marc G. Fournier" at Dec 9, 95 11:42:36 pm
next in thread | previous in thread | raw e-mail | index | archive | help
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
>
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512100822.AAA08292>
