Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - MCD : external insertion notification doesn`t work: Page 1 of 2 (2 Items)
   
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!