Merge branch 'acpi-lpss'
[deliverable/linux.git] / arch / um / drivers / chan_user.h
CommitLineData
b4ac91a0 1/*
1da177e4
LT
2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __CHAN_USER_H__
7#define __CHAN_USER_H__
8
37185b33 9#include <init.h>
1da177e4
LT
10
11struct chan_opts {
a52f362f 12 void (*const announce)(char *dev_name, int dev);
1da177e4 13 char *xterm_title;
a52f362f 14 const int raw;
1da177e4
LT
15};
16
1da177e4
LT
17struct chan_ops {
18 char *type;
5e7672ec 19 void *(*init)(char *, int, const struct chan_opts *);
1da177e4
LT
20 int (*open)(int, int, int, void *, char **);
21 void (*close)(int, void *);
22 int (*read)(int, char *, void *);
23 int (*write)(int, const char *, int, void *);
55c033c1 24 int (*console_write)(int, const char *, int);
1da177e4
LT
25 int (*window_size)(int, void *, unsigned short *, unsigned short *);
26 void (*free)(void *);
27 int winch;
28};
29
5e7672ec
JD
30extern const struct chan_ops fd_ops, null_ops, port_ops, pts_ops, pty_ops,
31 tty_ops, xterm_ops;
1da177e4
LT
32
33extern void generic_close(int fd, void *unused);
34extern int generic_read(int fd, char *c_out, void *unused);
35extern int generic_write(int fd, const char *buf, int n, void *unused);
55c033c1 36extern int generic_console_write(int fd, const char *buf, int n);
1da177e4
LT
37extern int generic_window_size(int fd, void *unused, unsigned short *rows_out,
38 unsigned short *cols_out);
39extern void generic_free(void *data);
40
2116bda6
RW
41struct tty_port;
42extern void register_winch(int fd, struct tty_port *port);
42a359e3 43extern void register_winch_irq(int fd, int tty_fd, int pid,
2116bda6 44 struct tty_port *port, unsigned long stack);
1da177e4
LT
45
46#define __channel_help(fn, prefix) \
47__uml_help(fn, prefix "[0-9]*=<channel description>\n" \
48" Attach a console or serial line to a host channel. See\n" \
0ba9d3f9 49" http://user-mode-linux.sourceforge.net/old/input.html for a complete\n" \
1da177e4
LT
50" description of this switch.\n\n" \
51);
52
53#endif
This page took 0.842886 seconds and 5 git commands to generate.