Re: How eject (power off) a PC card from User Space
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Rick, Thanks again for you help, Martin On 15.01.2005, at 02:05, Rick Sulack wrote: On Jan 14, 2005, at 6:32 AM, Martin Bestmann wrote: Hi, this is from actual code: info->service is of type io_object_t int PCCardEjectCard(PCCardSocketHandle_t handle) { IOReturn err = kIOReturnNoMemory; DeviceInfo * info = (DeviceInfo *)handle; CFMutableDictionaryRef ejectCommand; ejectCommand = CFDictionaryCreateMutable( kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); return err; } _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... thanks very much that works great. The other problem that I have is that I need to tell the cardbus/IOPCardBridge to look for cards already inside the slot and to activate them. Basically simulate an insert of a card. The reason for this is that the tool I'm writing is used for testing GSM PC Cards and the test suite requires to power off the card at a certain point and then activate the card again. Due to the fact that no one is sitting in front of the machine during the test to pull out the card and push it back in I need some call (to be called from User space) to tell the OS to research for cards already in the slot. I need to write a command line tool which simply ejects (powers off) a specific PC card which is in the PC card slot. Basically I need the same functionality as the "PCCard.menu" extra when you choose "Power off Card" from the PC Card menu icon in the menu bar. Does someone know how to do this? printf("PCCardEjectCard called for socket %s (%p)\n", info->name, info); if (ejectCommand) { CFDictionarySetValue(ejectCommand, CFSTR("eject request"), CFSTR("value ignored")); err = IORegistryEntrySetCFProperties(info->service, ejectCommand); } -rick __ rick sulack darwin core os group apple computer, inc -------------------------------------------------------------- "More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity" -Wulf 1972 This email sent to site_archiver@lists.apple.com
participants (1)
-
Martin Bestmann