mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +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 );
|
IORegistryEntryGetPath( service, kIOServicePlane, ioPathName );
|
||||||
portInfo->portName = ioPathName;
|
portInfo->portName = ioPathName;
|
||||||
|
|
||||||
|
|
||||||
if( bsdPathAsCFString )
|
if( bsdPathAsCFString )
|
||||||
{
|
{
|
||||||
char path[MAXPATHLEN];
|
char path[MAXPATHLEN];
|
||||||
if( CFStringGetCString((CFStringRef)bsdPathAsCFString, path,
|
if( CFStringGetCString((CFStringRef)bsdPathAsCFString, path,
|
||||||
PATH_MAX, kCFStringEncodingUTF8) )
|
PATH_MAX, kCFStringEncodingUTF8) ) {
|
||||||
portInfo->physName = path;
|
portInfo->physName = path;
|
||||||
|
portInfo->friendName = path;
|
||||||
|
}
|
||||||
CFRelease(bsdPathAsCFString);
|
CFRelease(bsdPathAsCFString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user