Exemplo n.º 1
0
static void __init get_fs_names(char *page)
{
	char *s = page;

	if (root_fs_names) {
		strcpy(page, root_fs_names);
		while (*s++) {
			if (s[-1] == ',')
				s[-1] = '\0';
		}
	} else {
		int len = get_filesystem_list(page);
		char *p, *next;

		page[len] = '\0';
		for (p = page-1; p; p = next) {
			next = strchr(++p, '\n');
			if (*p++ != '\t')
				continue;
			while ((*s++ = *p++) != '\n')
				;
			s[-1] = '\0';
		}
	}
	*s = '\0';
}
Exemplo n.º 2
0
static void __init get_fs_names(char *page)
{
	char *s = page;

	if (root_fs_names) {
		strcpy(page, root_fs_names);
		while (*s++) {
			if (s[-1] == ',')
				s[-1] = '\0';
		}
	} else {
		int len = get_filesystem_list(page);
		char *p, *next;

		page[len] = '\0';
		for (p = page-1; p; p = next) {
			next = strchr(++p, '\n');
			if (*p++ != '\t')
				continue;
			while ((*s++ = *p++) != '\n')
				;
			s[-1] = '\0';
		}
#if defined(CONFIG_MIPS_BRCM97XXX) && defined(CONFIG_JFFS2_FS)
		/* PR28961: allow jffs2 rootfs autodetect */
		strcpy(s, "jffs2");
		s += 6;
#endif
	}
	*s = '\0';
}
Exemplo n.º 3
0
static int filesystems_read_proc(char *page, char **start, off_t off,
				 int count, int *eof, void *data)
{
	int len = get_filesystem_list(page);
	return proc_calc_metrics(page, start, off, count, eof, len);
}
Exemplo n.º 4
0
static int get_root_array(char * page, int type, char **start, off_t offset, int length)
{
    switch (type) {
    case PROC_LOADAVG:
        return get_loadavg(page);

    case PROC_UPTIME:
        return get_uptime(page);

    case PROC_MEMINFO:
        return get_meminfo(page);

#ifdef CONFIG_PCI
    case PROC_PCI:
        return get_pci_list(page);
#endif

    case PROC_CPUINFO:
        return get_cpuinfo(page);

    case PROC_VERSION:
        return get_version(page);

#ifdef CONFIG_DEBUG_MALLOC
    case PROC_MALLOC:
        return get_malloc(page);
#endif

#ifdef CONFIG_MODULES
    case PROC_MODULES:
        return get_module_list(page);

    case PROC_KSYMS:
        return get_ksyms_list(page, start, offset, length);
#endif

    case PROC_STAT:
        return get_kstat(page);

    case PROC_DEVICES:
        return get_device_list(page);

    case PROC_INTERRUPTS:
        return get_irq_list(page);

    case PROC_FILESYSTEMS:
        return get_filesystem_list(page);

    case PROC_DMA:
        return get_dma_list(page);

    case PROC_IOPORTS:
        return get_ioport_list(page);
#ifdef CONFIG_BLK_DEV_MD
    case PROC_MD:
        return get_md_status(page);
#endif
#ifdef __SMP_PROF__
    case PROC_SMP_PROF:
        return get_smp_prof_list(page);
#endif
    case PROC_CMDLINE:
        return get_cmdline(page);

    case PROC_MTAB:
        return get_filesystem_info( page );
#ifdef CONFIG_RTC
    case PROC_RTC:
        return get_rtc_status(page);
#endif
    case PROC_LOCKS:
        return get_locks_status(page);
    }
    return -EBADF;
}