[EMAIL PROTECTED] wrote : | I think the check could be done in kernelspace with eu_check_symb_addr that was | remove for incomming cmvs.
The drawback with the check in kernel space is that, if new functions
are introduced (through a new BNM and new CMVs), then the driver need to
be modified to take this new one into account...
In fact there are pros and cons to even check the CMVs:
- checking enforce that the CMVs are known
- no check allow to add functions without changing anything beyond
CMVs file and BNM files
Moreover not checking is not a problem from the computer/kernel point of
view, as the CMVs (or more precisely the function to call in the modem)
are interpreted only by the modem ...
| Also in eu_decode_msg the subid checking is a bit strange :
| Something like
| switch(msg->subtype) {
| case SUBTYPE_FLASHACC_ENMODEMREBOOTREPLY ... SUBTYPE_FLASHACC_READREPLY:
| if (msg->type != MP_FUNCTION_TYPE_FLASHACC) {
| error
| }
|
| case ...
|
| would be a bit cleaner.
I don't think it's clearer: we check the subtype, and say: in case we
have the subtype x, and that the type was Y, do ...
I do prefer the top to bottom approach ..
| When the cmv works correctly, will all the option code in eu_msg.c will be
| removed (including linetype) ?
This will have my preference but it is still to be discussed ...
--
Frederick Ros aka Sleeper
Use self-identifying input. Allow defaults. Echo both on output.
- The Elements of Programming Style (Kernighan & Plaugher)
pgpwkYxndF3k8.pgp
Description: PGP signature
