diff -urN -X dontdiff linux/fs/proc/proc_misc.c linux-2.3.25-pre1-execdomains/fs/proc/proc_misc.c
--- linux/fs/proc/proc_misc.c Fri Oct 29 11:26:27 1999
+++ linux-2.3.25-pre1-execdomains/fs/proc/proc_misc.c Fri Oct 29 10:33:51 1999
@@ -57,7 +57,8 @@
extern int get_device_list(char *);
extern int get_partition_list(char *);
extern int get_filesystem_list(char *);
-extern int get_filesystem_info( char * );
+extern int get_filesystem_info(char *);
+extern int get_exec_domain_list(char *);
extern int get_irq_list(char *);
extern int get_dma_list(char *);
extern int get_rtc_status (char *);
@@ -496,6 +497,18 @@
return len;
}
+static int execdomains_read_proc(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ int len = get_exec_domain_list(page);
+ if (len <= off+count) *eof = 1;
+ *start = page + off;
+ len -= off;
+ if (len>count) len = count;
+ if (len<0) len = 0;
+ return len;
+}
+
static int swaps_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
@@ -591,6 +604,7 @@
{"swaps", swaps_read_proc},
{"slabinfo", slabinfo_read_proc},
{"iomem", memory_read_proc},
+ {"execdomains", execdomains_read_proc},
{NULL,NULL}
};
for(p=simple_ones;p->name;p++)
diff -urN -X dontdiff linux/kernel/exec_domain.c linux-2.3.25-pre1-execdomains/kernel/exec_domain.c
--- linux/kernel/exec_domain.c Sat Sep 4 21:06:08 1999
+++ linux-2.3.25-pre1-execdomains/kernel/exec_domain.c Fri Oct 29 10:37:43 1999
@@ -125,3 +125,15 @@
unlock_kernel();
return ret;
}
+
+int get_exec_domain_list(char * page)
+{
+ int len = 0;
+ struct exec_domain * e;
+
+ for (e=exec_domains; e && len < PAGE_SIZE - 80; e=e->next)
+ len += sprintf(page+len, "%d-%d\t%-16s\t[%s]\n",
+ e->pers_low, e->pers_high, e->name,
+ e->module ? e->module->name : "kernel");
+ return len;
+}