EmbLogic's Blog

ioctl..

In the ioctl function at driver level……..,
the switch(cmd) statement have ‘cmd’ as the argument but we can see cmd is of ‘unsigned int’ type…
i want to ask how the switch function perform case matching….
switch(cmd)
{
case IOSQSET:
case IOSQUANTUM:
because after ‘case’ we have written a string..and ‘cmd’ is int type…..how?

One Response to ioctl..

  1. niket says:

    dear
    we define the IOSQSET as macro and this macro is define for the int value
    so this switch case work :-) and this string is treated as to compare int value.

Leave a Reply to niket Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>