Konstantin V(deleted)
|
MCD : external insertion notification doesn`t work
|
Konstantin V(deleted)
03/03/2012 12:58 PM
post91902
|
MCD : external insertion notification doesn`t work
Hello QNX Developers,
My needs perfectly described by "CD-changer controlled by external firmware" section of MCD documentation.
I need to avoid using built-in CD_MEDIA_IOBLK MCD routine and report CD insertion/ejection events externally.
However, when I do that, configured start/stop rules are NOT executed.
MCD is executed with '-vvvv' CL option.
From sloginfo, I can see that notifications are received by MCD:
Jan 01 03:03:41.632.3 00023 00 /dev/cd0 media inserted
Jan 01 03:03:52.597.3 00023 00 /dev/cd0 media ejected
Implementation is really simple and is pretty much a copy-paste from official documentation. Suppose that it is OK, as
MCD does indicate these reports in the log (in case of insertion, "/dev/cd0" is written to /dev/mcd/.insert, in case of
ejection, write it to /dev/mcd/.eject)
Snippet of my mcd.cfg :
[/dev/cd*]
Start Rule = MOUNT
Stop Rule = UNMOUNT
[MOUNT]
Callout = MOUNT_FSYS
Argument = /etc/mcd.mnt
[UNMOUNT]
Callout = UNMOUNT_FSYS
Note :
In case of I switch to built-in CD_MEDIA_IOBLK routine, MOUNT rule is executed and CD is mounted.
(To do that, I only need to add following lines to [/dev/cd*] device entry)
> Callout = CD_MEDIA_IOBLK
> Argument = 1000,2000
> Priority = 11,10
Thank you!
|
|
|