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?
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.