Hi! I have to detect a memory card added on N900. Which solution I can use? First thing that I thought was a DBus. I thinked that I can read info from some "org.freedesktop.hal.devices" to decide - memory card is mounted or not. But I found that no static name of device for MMC card. No guarantee when card is added, an old uid is assigned to it. Maybe some other way to use DBus for detect memory card?
And the second solution is check a directory /media/mmc1 for some files. But it`s not correct way, becouse maybe no file is present in dir, or card may be mounted not on /media/mmc1 dir.
Any suggestions? )
ADD: So, third solution! ) For MMC card kernel created a file /dev/mmcblk1p1. As I understand it, name 'mmcblk1p1' is permanent for MMC card in N900 device. It is a correct solution?
And the second solution is check a directory /media/mmc1 for some files. But it`s not correct way, becouse maybe no file is present in dir, or card may be mounted not on /media/mmc1 dir.
Any suggestions? )
ADD: So, third solution! ) For MMC card kernel created a file /dev/mmcblk1p1. As I understand it, name 'mmcblk1p1' is permanent for MMC card in N900 device. It is a correct solution?
Last edited by Grinchman; 2010-11-10 at 10:46.