Hi Marco, 2006 m. gruodis 11 d., pirmadienis 20:33, Marco d'Itri rašė: > I do not think that every mmc* block device is removable, What do you think about following pmount policy on determining removable block devices? I think it would be a reasonable thing to do.
Excerpt from `man pmount`:
o device is removable (USB, FireWire, or MMC device,
or /sys/block/drive/removable is 1)....
Excerpt from pmount-0.9.13/src/policy.c:366
int
device_removable( const char* device )
{
struct sysfs_device *dev;
static char* hotplug_buses[] = { "usb", "ieee1394", "mmc", "pcmcia",
NULL };
int removable;
char blockdevpath[PATH_MAX];
dev = find_sysfs_device( device, blockdevpath, sizeof( blockdevpath ) );
[... snip ... ]
/* if not, fall back to bus scanning (regard USB and FireWire as
removable) */
if( !removable )
removable = find_bus_ancestry( dev, hotplug_buses );
sysfs_close_device( dev );
[... snip ... ]
return removable;
}
pgp2y6pC2WUaS.pgp
Description: PGP signature

