Re: How eject (power off) a PC card from User Space
Re: How eject (power off) a PC card from User Space
- Subject: Re: How eject (power off) a PC card from User Space
- From: Rick Sulack <email@hidden>
- Date: Fri, 14 Jan 2005 17:05:04 -0800
On Jan 14, 2005, at 6:32 AM, Martin Bestmann wrote:
Hi,
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?
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;
printf("PCCardEjectCard called for socket %s (%p)\n", info->name,
info);
ejectCommand = CFDictionaryCreateMutable( kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
if (ejectCommand) {
CFDictionarySetValue(ejectCommand, CFSTR("eject request"),
CFSTR("value ignored"));
err = IORegistryEntrySetCFProperties(info->service, ejectCommand);
}
return err;
}
-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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden