[maemo-developers] Finding the mmc cards

From: Kees Jongenburger kees.jongenburger at gmail.com
Date: Wed Aug 29 09:53:35 EEST 2007
On 8/29/07, Tony Maro <tonymaro at gmail.com> wrote:
> After our thread some weeks ago regarding reading the serial number from a
> MMC card, I've since implemented detection of the MMC card's presence by the
> existence of those same files.  I know my solution works on my device
> perfectly.
>
Hello I use
cat /proc/partitions on my desktop system to see what the partition
are available
on my desktop system bus perhaps listening to dbus or kernel events is
the right way :)
looking at mtab or the output of mount will also help

greetings


> I figure it's probably a bad decision, because the architecture could change
> somewhat with the next hardware or software release.
>
> Can someone tell me, is there an approved / documented way of identifying
> the location of any MMC cards currently installed?  I've noticed you can't
> simply look for /media/mmcX because that directory will exist even if there
> is no card inserted.
>
> Also, what determines MMC1 vs MMC2 as the card's path for internal/external?
>  Is it possible these paths would change at some date?  I know some Linux
> distro's with SATA drives had a problem with the drives changing their
> /dev/sdX path every reboot.  I know that MY Nokia isn't doing anything
> similar, but I figure it's possible that my /media/mmc1 might be internal,
> but for someone else it could be the external slot - or maybe in the next
> hardware revision or something.
>
> I did find the alias names located in the /sys/ path that specify "internal"
> is for one and "external" or removable or something for the other.  Also,
> are the names and paths the same for the 770's?  Since I have an n800 I
> don't know.  I'm hesitant to read too much data from /sys/ because it all
> looks _so_ Maemo-specific I wonder if I will tie my code too closely to one
> hardware revision.
>
> Just looking for the most _compatible_ way to identify if/when and where a
> media card is present.
>
> And as usual, from Python.
>
> Thanks,
> Tony
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>

More information about the maemo-developers mailing list