
On 6/4/2010 2:42 PM, Timur Tabi wrote:
Andy Fleming wrote:
You just noted that tsec_eth_init should return the number of tsecs initialized successfully. Therefore, the callers can check that number, and respond accordingly. tsec_initialize() can report the error. If we want more elaborate error handling, we can devise something. But with the new scheme, an error in one tsec (like a riser card not being plugged in) will cause all of the tsecs to not be initialized, which seems silly.
Ok, so the rule is: a function which initializes one interface can return an error<0, but a function which initializes multiple interfaces should not. V2 coming right up.
Sorry for the confusion. The way we handle errors isn't through return code but rather through printf()... In future, the return code may be used to keep track of the number of properly initialized interfaces. Looks like v2 should work.
regards, Ben