DragonFly BSD
DragonFly submit List (threaded) for 2003-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: truss and procfs


To: eirikn@xxxxxxxxxxxx
From: Hiten Pandya <hmp@xxxxxxxxxxxxx>
Date: Sun, 19 Oct 2003 14:21:14 +0100

Eirik Nygaard wrote:
truss(1) always looks for procfs in /proc, it also bails out with some not
very informative error messages if procfs is not mounted.
http://eirikn.kerneled.com/dragonfly/truss-procfs.diff checks where procfs
is mounted and if it is not present truss now tells the user what is
wrong.


Hi Eirik,


	Hmm, I did a quick review, and the following type of changes
	freaked me out, as they are a No No:

	-  char buf[32];
	+  char buf[PATH_MAX + NAME_MAX];

	You shouldn't do PATH_MAX + NAME_MAX, because PATH_MAX is
	supposed to be the total maximum including the name.  Your
	defines will expand to 1024+255 which is scary. ;-)

Regards,

--
Hiten Pandya
hmp@xxxxxxxxxxxxx




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]