Path: blob/master/arch/um/include/shared/chan_user.h
10819 views
/*1* Copyright (C) 2000, 2001 Jeff Dike ([email protected])2* Licensed under the GPL3*/45#ifndef __CHAN_USER_H__6#define __CHAN_USER_H__78#include "init.h"910struct chan_opts {11void (*const announce)(char *dev_name, int dev);12char *xterm_title;13const int raw;14};1516enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE };1718struct chan_ops {19char *type;20void *(*init)(char *, int, const struct chan_opts *);21int (*open)(int, int, int, void *, char **);22void (*close)(int, void *);23int (*read)(int, char *, void *);24int (*write)(int, const char *, int, void *);25int (*console_write)(int, const char *, int);26int (*window_size)(int, void *, unsigned short *, unsigned short *);27void (*free)(void *);28int winch;29};3031extern const struct chan_ops fd_ops, null_ops, port_ops, pts_ops, pty_ops,32tty_ops, xterm_ops;3334extern void generic_close(int fd, void *unused);35extern int generic_read(int fd, char *c_out, void *unused);36extern int generic_write(int fd, const char *buf, int n, void *unused);37extern int generic_console_write(int fd, const char *buf, int n);38extern int generic_window_size(int fd, void *unused, unsigned short *rows_out,39unsigned short *cols_out);40extern void generic_free(void *data);4142struct tty_struct;43extern void register_winch(int fd, struct tty_struct *tty);44extern void register_winch_irq(int fd, int tty_fd, int pid,45struct tty_struct *tty, unsigned long stack);4647#define __channel_help(fn, prefix) \48__uml_help(fn, prefix "[0-9]*=<channel description>\n" \49" Attach a console or serial line to a host channel. See\n" \50" http://user-mode-linux.sourceforge.net/old/input.html for a complete\n" \51" description of this switch.\n\n" \52);5354#endif555657