• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How eject (power off) a PC card from User Space
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How eject (power off) a PC card from User Space
      • From: Martin Bestmann <email@hidden>
References: 
 >How eject (power off) a PC card from User Space (From: Martin Bestmann <email@hidden>)

  • Prev by Date: Re: gcc4 and casting lvalues
  • Next by Date: Re: How eject (power off) a PC card from User Space
  • Previous by thread: How eject (power off) a PC card from User Space
  • Next by thread: Re: How eject (power off) a PC card from User Space
  • Index(es):
    • Date
    • Thread