Path: blob/master/arch/um/include/shared/mconsole_kern.h
10819 views
/*1* Copyright (C) 2001, 2002 Jeff Dike ([email protected])2* Licensed under the GPL3*/45#ifndef __MCONSOLE_KERN_H__6#define __MCONSOLE_KERN_H__78#include "linux/list.h"9#include "mconsole.h"1011struct mconsole_entry {12struct list_head list;13struct mc_request request;14};1516/* All these methods are called in process context. */17struct mc_device {18struct list_head list;19char *name;20int (*config)(char *, char **);21int (*get_config)(char *, char *, int, char **);22int (*id)(char **, int *, int *);23int (*remove)(int, char **);24};2526#define CONFIG_CHUNK(str, size, current, chunk, end) \27do { \28current += strlen(chunk); \29if(current >= size) \30str = NULL; \31if(str != NULL){ \32strcpy(str, chunk); \33str += strlen(chunk); \34} \35if(end) \36current++; \37} while(0)3839#ifdef CONFIG_MCONSOLE4041extern void mconsole_register_dev(struct mc_device *new);4243#else4445static inline void mconsole_register_dev(struct mc_device *new)46{47}4849#endif5051#endif525354