mirror of
https://github.com/ish-app/ish.git
synced 2026-05-28 21:10:35 +00:00
Revert "Add /proc/filesystems"
This commit is contained in:
-15
@@ -23,21 +23,6 @@ void fs_register(const struct fs_ops *fs) {
|
||||
assert(!"reached filesystem limit");
|
||||
}
|
||||
|
||||
char * get_filesystems(void) {
|
||||
char *fs_list = calloc(MAX_FILESYSTEMS * 50, sizeof(char)); // Reasonable assumption?
|
||||
unsigned int i;
|
||||
|
||||
for ( i = 0; i < MAX_FILESYSTEMS; i++ ) {
|
||||
if (filesystems[i] != NULL) {
|
||||
fs_list = strcat(fs_list, "nodev ");
|
||||
fs_list = strcat(fs_list, filesystems[i]->name);
|
||||
fs_list = strcat(fs_list, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
return fs_list;
|
||||
}
|
||||
|
||||
struct mount *mount_find(char *path) {
|
||||
assert(path_is_normalized(path));
|
||||
lock(&mounts_lock);
|
||||
|
||||
@@ -22,12 +22,6 @@ static void show_kb(struct proc_data *buf, const char *name, uint64_t value) {
|
||||
proc_printf(buf, "%s%8"PRIu64" kB\n", name, value / 1000);
|
||||
}
|
||||
|
||||
static int proc_show_filesystems(struct proc_entry *UNUSED(entry), struct proc_data *buf) {
|
||||
char *filesystems = get_filesystems();
|
||||
proc_printf(buf, "%s", filesystems);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int proc_show_meminfo(struct proc_entry *UNUSED(entry), struct proc_data *buf) {
|
||||
struct mem_usage usage = get_mem_usage();
|
||||
show_kb(buf, "MemTotal: ", usage.total);
|
||||
@@ -103,7 +97,6 @@ static int proc_show_mounts(struct proc_entry *UNUSED(entry), struct proc_data *
|
||||
|
||||
// in alphabetical order
|
||||
struct proc_dir_entry proc_root_entries[] = {
|
||||
{"filesystems", .show = proc_show_filesystems},
|
||||
{"ish", S_IFDIR, .children = &proc_ish_children},
|
||||
{"meminfo", .show = proc_show_meminfo},
|
||||
{"mounts", .show = proc_show_mounts},
|
||||
|
||||
@@ -174,6 +174,5 @@ extern const struct fs_ops fakefs;
|
||||
extern const struct fs_ops devptsfs;
|
||||
extern const struct fs_ops tmpfs;
|
||||
void fs_register(const struct fs_ops *fs);
|
||||
char* get_filesystems(void); // For /proc/filesystems
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user