mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 02:11:04 +02:00
Revert "hdd_menu: only offer filesystems with kernel support"
- breaks user-space fs like exfat This reverts commit6e6432ad22
. Origin commit data ------------------ Commit:6d287e46f7
Author: [CST] Focus <focus.cst@gmail.com> Date: 2015-02-10 (Tue, 10 Feb 2015)
This commit is contained in:
@@ -217,36 +217,9 @@ std::string CHDDMenuHandler::getFmtType(std::string name, std::string part)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void CHDDMenuHandler::check_kernel_fs()
|
||||
{
|
||||
char line[128]; /* /proc/filesystems lines are shorter */
|
||||
kernel_fs_list.clear();
|
||||
FILE *f = fopen("/proc/filesystems", "r");
|
||||
if (! f) {
|
||||
fprintf(stderr, "CHDDMenuHandler::%s: opening /proc/filesystems failed: %m\n", __func__);
|
||||
return;
|
||||
}
|
||||
while (fgets(line, sizeof(line), f)) {
|
||||
size_t l = strlen(line);
|
||||
if (l > 0)
|
||||
line[l - 1] = 0; /* remove \n */
|
||||
char *tab = strchr(line, '\t');
|
||||
if (! tab) /* should not happen in any kernel I have seen */
|
||||
continue;
|
||||
tab++;
|
||||
kernel_fs_list.insert(string(tab));
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
void CHDDMenuHandler::check_dev_tools()
|
||||
{
|
||||
for (unsigned i = 0; i < FS_MAX; i++) {
|
||||
if (kernel_fs_list.find(devtools[i].fmt) == kernel_fs_list.end()) {
|
||||
printf("%s: filesystem '%s' not supported by kernel\n",
|
||||
__func__, devtools[i].fmt.c_str());
|
||||
continue;
|
||||
}
|
||||
if (!access(devtools[i].fsck.c_str(), X_OK))
|
||||
devtools[i].fsck_supported = true;
|
||||
if (!access(devtools[i].mkfs.c_str(), X_OK))
|
||||
@@ -719,7 +692,6 @@ int CHDDMenuHandler::doMenu()
|
||||
show_menu = false;
|
||||
in_menu = true;
|
||||
|
||||
check_kernel_fs();
|
||||
check_dev_tools();
|
||||
|
||||
_show_menu:
|
||||
|
Reference in New Issue
Block a user