Re: How eject (power off) a PC card from User Space
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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... 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)
-
Rick Sulack