$OpenBSD: patch-libk3b_tools_k3bfilesysteminfo_cpp,v 1.1.1.1 2008/05/11 22:18:35 jakemsr Exp $ --- libk3b/tools/k3bfilesysteminfo.cpp.orig Thu Jan 17 16:08:18 2008 +++ libk3b/tools/k3bfilesysteminfo.cpp Thu Jan 17 16:20:20 2008 @@ -25,7 +25,7 @@ #include -#ifdef Q_OS_FREEBSD +#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) #include #include #endif @@ -64,12 +64,19 @@ class K3bFileSystemInfo::Private (public) void stat() { struct statfs fs; if( !::statfs( QFile::encodeName( QFileInfo(path).dirPath( true ) ), &fs ) ) { +#ifdef Q_OS_OPENBSD + if(strncmp(fs.f_fstypename, MOUNT_MSDOS, MFSNAMELEN) == 0) + type = FS_FAT; + else + type = FS_UNKNOWN; +#else switch( fs.f_type ) { case 0x4d44: // MS-DOS type = FS_FAT; default: type = FS_UNKNOWN; } +#endif statDone = true; }