Linux-2.6.12-rc2
[linux-2.6/kvm.git] / arch / um / include / mconsole_kern.h
blob61c274fcee5d539e6062023d013bd1b7aa51ae8a
1 /*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #ifndef __MCONSOLE_KERN_H__
7 #define __MCONSOLE_KERN_H__
9 #include "linux/config.h"
10 #include "linux/list.h"
11 #include "mconsole.h"
13 struct mconsole_entry {
14 struct list_head list;
15 struct mc_request request;
18 struct mc_device {
19 struct list_head list;
20 char *name;
21 int (*config)(char *);
22 int (*get_config)(char *, char *, int, char **);
23 int (*remove)(char *);
26 #define CONFIG_CHUNK(str, size, current, chunk, end) \
27 do { \
28 current += strlen(chunk); \
29 if(current >= size) \
30 str = NULL; \
31 if(str != NULL){ \
32 strcpy(str, chunk); \
33 str += strlen(chunk); \
34 } \
35 if(end) \
36 current++; \
37 } while(0)
39 #ifdef CONFIG_MCONSOLE
41 extern void mconsole_register_dev(struct mc_device *new);
43 #else
45 static inline void mconsole_register_dev(struct mc_device *new)
49 #endif
51 #endif
54 * Overrides for Emacs so that we follow Linus's tabbing style.
55 * Emacs will notice this stuff at the end of the file and automatically
56 * adjust the settings for this buffer only. This must remain at the end
57 * of the file.
58 * ---------------------------------------------------------------------------
59 * Local variables:
60 * c-file-style: "linux"
61 * End: