Fix the SRB_INTERNAL_DBG macro for #62

 - The local variable name was succeptible to override any previous
variable declaration, thus messing with the format argument's value
 - Long name added to prevent collisions of identifiers.
Fix a small compilation issue on some systems.

This was related to some ISO C90 rules preventing the declaration of variables
within the body of a function.
Rework the attach function

 - Prevent going further if no device slot is available
 - Might fix some issues related to trying to attach more devices than
statically pre-allocated.