[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)
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,
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).
Main Index |
Thread Index |