freeipmi-devel
[Top][All Lists]
Advanced

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

Re: [Freeipmi-devel] assemble_ipmi_kcs_pkt


From: Anand Babu
Subject: Re: [Freeipmi-devel] assemble_ipmi_kcs_pkt
Date: Sat, 13 Mar 2004 15:15:36 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hi Al,
I always had macros to calculate the length. And I mostly combining
error code and result in return value. 

But you are correct, 
 - returning length makes more sense in assemble-X function.
 - uniformity among lower level driver APIs.
 - length cannot be negative. So both len and error-code can be
   combined.

Happy Hacking,
--ab

,----[ Albert Chu <address@hidden> ]
| Hey AB,
| 
| Is there a reason why this function should return 0 instead of the
| length of data copied into the buffer??  To me, assemble_X functions
| should hide the details of how packets are assembled.  This is what we
| do with assemble_ipmi_lan.  Let the function handle the packet
| assembly, then inform the user of how much data they should send out
| through ipmi_lan_send or whatever send function they wish.
| 
| Al
`----

-- 
 _.|_ 
(_||_)
Free as in Freedom <www.gnu.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]