Only show mountpoints containing a supported filesystem in dropdown.

Change configuration to use filtered mountpoints list. Add HFS+ to the list of
supported filesystems -- while Rockbox doesn't run on HFS+ MacPods will use
that format, and not having them in the list will then make OS X users wonder
why their Ipod isn't showing up. This might need to get revised later.

Change-Id: I5eeeb05be6780cb3952a0081df0ce782eca01589
This commit is contained in:
Dominik Riebeling 2013-06-09 19:47:25 +02:00
parent a2c3e3fd0d
commit 67e1de7b43
2 changed files with 4 additions and 4 deletions

View file

@ -573,7 +573,7 @@ QStringList Utils::mountpoints(enum MountpointsFilter type)
QStringList supported;
QStringList tempList;
#if defined(Q_OS_WIN32)
supported << "FAT32" << "FAT16" << "FAT12";
supported << "FAT32" << "FAT16" << "FAT12" << "HFS";
QFileInfoList list = QDir::drives();
for(int i=0; i<list.size();i++)
{
@ -599,7 +599,7 @@ QStringList Utils::mountpoints(enum MountpointsFilter type)
}
#elif defined(Q_OS_MACX) || defined(Q_OS_OPENBSD)
supported << "vfat" << "msdos";
supported << "vfat" << "msdos" << "hfs";
int num;
struct statfs *mntinf;
@ -617,7 +617,7 @@ QStringList Utils::mountpoints(enum MountpointsFilter type)
mntinf++;
}
#elif defined(Q_OS_LINUX)
supported << "vfat" << "msdos";
supported << "vfat" << "msdos" << "hfsplus";
FILE *mn = setmntent("/etc/mtab", "r");
if(!mn)
return QStringList("");

View file

@ -655,7 +655,7 @@ void Config::refreshMountpoint()
// unwanted item.
ui.mountPoint->blockSignals(true);
ui.mountPoint->clear();
QStringList mps = Utils::mountpoints();
QStringList mps = Utils::mountpoints(Utils::MountpointsSupported);
for(int i = 0; i < mps.size(); ++i) {
// add mountpoint as user data so we can change the displayed string
// later (to include volume label or similar)