mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Fix for OSX to enumerate serial ports correctly
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2756 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
9f71f4121c
commit
58a0cce89b
@ -112,12 +112,15 @@ bool QextSerialEnumerator::getServiceDetailsOSX( io_object_t service, QextPortIn
|
||||
IORegistryEntryGetPath( service, kIOServicePlane, ioPathName );
|
||||
portInfo->portName = ioPathName;
|
||||
|
||||
|
||||
if( bsdPathAsCFString )
|
||||
{
|
||||
char path[MAXPATHLEN];
|
||||
if( CFStringGetCString((CFStringRef)bsdPathAsCFString, path,
|
||||
PATH_MAX, kCFStringEncodingUTF8) )
|
||||
PATH_MAX, kCFStringEncodingUTF8) ) {
|
||||
portInfo->physName = path;
|
||||
portInfo->friendName = path;
|
||||
}
|
||||
CFRelease(bsdPathAsCFString);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user