NetBSD-Bugs archive

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

Re: port-sparc64/46652 (sparc ofwboot.net fails to load kernel via tftp)



The following reply was made to PR port-sparc64/46652; it has been noted by 
GNATS.

From: "S.P.Zeidler" <spz%serpens.de@localhost>
To: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, 
port-sparc64-maintainer%NetBSD.org@localhost,
        netbsd-bugs%NetBSD.org@localhost
Subject: Re: port-sparc64/46652 (sparc ofwboot.net fails to load kernel via
 tftp)
Date: Wed, 4 Jul 2012 15:43:41 +0200

 Hi Tsutsui-san,
 
 Thus wrote Izumi Tsutsui (tsutsui%ceres.dti.ne.jp@localhost):
 
 > Ok, tftp requires own initialization (net_sock in of->f_devdata),
 > but the previous code (using int**) was a bit confusing.
 > 
 > How about passing (struct open_file *) as
 > lib/libsa/tftp.c:tftp_open() does?
 
 Why do you want to obscure what kind of data gets carried from
 generator to consumer in f_devdata in the tftp case?
 Using int ** is a (poor, but present) type check by the compiler,
 after all.
 
 If the reason why it's int ** is too confusing, a comment should be added.
 
 The code would be less clear to me, not more, if you handed over the
 pointer to the entire open_file struct when all you want to do is set
 one member of it (which is a dedicated "I'm void * so you can stick in
 whatever both ends need", too).
 
 regards,
        spz
 -- 
 spz%serpens.de@localhost (S.P.Zeidler)
 


Home | Main Index | Thread Index | Old Index