Revert "Add /proc/filesystems"

This commit is contained in:
Saagar Jha
2021-12-26 16:48:55 -08:00
committed by GitHub
parent b6ba656d04
commit a0175b09d2
3 changed files with 0 additions and 23 deletions
-15
View File
@@ -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);
-7
View File
@@ -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},
-1
View File
@@ -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