Index: autodetection.cpp =================================================================== --- autodetection.cpp (revision 18363) +++ autodetection.cpp (working copy) @@ -41,6 +41,12 @@ #include #include #endif + +#if defined(Q_OS_OPENBSD) +#include +#include +#endif + #include "detect.h" #include "utils.h" @@ -195,7 +201,7 @@ tempList << list.at(i).absolutePath(); } -#elif defined(Q_OS_MACX) +#elif defined(Q_OS_MACX) || defined(Q_OS_OPENBSD) int num; struct statfs *mntinf; @@ -215,6 +221,7 @@ tempList << QString(ent->mnt_dir); endmntent(mn); + #else #error Unknown Plattform #endif @@ -255,6 +262,19 @@ } #endif +#if defined(Q_OS_OPENBSD) + int num; + struct statfs *mntinf; + + num = getmntinfo(&mntinf, MNT_WAIT); + while(num--) { + if(QString(mntinf->f_mntfromname).startsWith(device) + && QString(mntinf->f_fstypename).contains("msdos", Qt::CaseInsensitive)) + return QString(mntinf->f_mntonname); + mntinf++; + } +#endif + #if defined(Q_OS_WIN32) QString result; unsigned int driveno = device.replace(QRegExp("^.*([0-9]+)"), "\\1").toInt();