Re: Lion changes

2011-07-21 Thread Richard Somers
On Jul 21, 2011, at 11:33 AM, vincent habchi wrote: > But anyhow, as somebody pointed out, there are far better ways to get the MAC > address of the en0 port than executing BSD commands in a subprocess. Apple sample code GetPrimaryMACAddress works well with Lion. http://developer.apple.co

Re: Lion changes

2011-07-21 Thread vincent habchi
Hi, > NSString *tempFilePath = @"/Users/john/OutCocoa.txt"; > NSString *commandLine = [NSString stringWithFormat:@"/sbin/ifconfig en0 | > grep ether | cut -d' ' -f 2 > \"%@\" 2>&1", tempFilePath]; > sprintf(cmd, "/bin/sh -c %s", [commandLine UTF8String]); Quote the command. sprintf (cmd, "

Re: Lion changes

2011-07-21 Thread Gary L. Wade
Rather than using other processes, look into the System Configuration framework. - Gary L. Wade (Sent from my iPhone) On Jul 21, 2011, at 8:28 AM, Leonardo wrote: > Hi, > while on MacOs X 10.6 and earlier this piece of code worked properly, on > Lion I get a different result (bug). > I have to

Lion changes

2011-07-21 Thread Leonardo
Hi, while on MacOs X 10.6 and earlier this piece of code worked properly, on Lion I get a different result (bug). I have to take the MacAddress en0. May you please tell me where I do wrong? NSString *tempFilePath = @"/Users/john/OutCocoa.txt"; NSString *commandLine = [NSString stringWithFor