ssl.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | ssl.c (b97b77cca627b2e3e6d0015e2e14b1d1c12de0c8) |
---|---|
1/* 2 * Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com) 3 * Licensed under the GPL 4 */ 5 6#include "linux/config.h" 7#include "linux/fs.h" 8#include "linux/tty.h" --- 93 unchanged lines hidden (view full) --- 102} 103 104int ssl_open(struct tty_struct *tty, struct file *filp) 105{ 106 return line_open(serial_lines, tty, &opts); 107} 108 109#if 0 | 1/* 2 * Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com) 3 * Licensed under the GPL 4 */ 5 6#include "linux/config.h" 7#include "linux/fs.h" 8#include "linux/tty.h" --- 93 unchanged lines hidden (view full) --- 102} 103 104int ssl_open(struct tty_struct *tty, struct file *filp) 105{ 106 return line_open(serial_lines, tty, &opts); 107} 108 109#if 0 |
110static int ssl_chars_in_buffer(struct tty_struct *tty) 111{ 112 return(0); 113} 114 | |
115static void ssl_flush_buffer(struct tty_struct *tty) 116{ 117 return; 118} 119 120static void ssl_throttle(struct tty_struct * tty) 121{ 122 printk(KERN_ERR "Someone should implement ssl_throttle\n"); --- 21 unchanged lines hidden (view full) --- 144 145static struct tty_operations ssl_ops = { 146 .open = ssl_open, 147 .close = line_close, 148 .write = line_write, 149 .put_char = line_put_char, 150 .write_room = line_write_room, 151 .chars_in_buffer = line_chars_in_buffer, | 110static void ssl_flush_buffer(struct tty_struct *tty) 111{ 112 return; 113} 114 115static void ssl_throttle(struct tty_struct * tty) 116{ 117 printk(KERN_ERR "Someone should implement ssl_throttle\n"); --- 21 unchanged lines hidden (view full) --- 139 140static struct tty_operations ssl_ops = { 141 .open = ssl_open, 142 .close = line_close, 143 .write = line_write, 144 .put_char = line_put_char, 145 .write_room = line_write_room, 146 .chars_in_buffer = line_chars_in_buffer, |
147 .flush_buffer = line_flush_buffer, 148 .flush_chars = line_flush_chars, |
|
152 .set_termios = line_set_termios, 153 .ioctl = line_ioctl, 154#if 0 | 149 .set_termios = line_set_termios, 150 .ioctl = line_ioctl, 151#if 0 |
155 .flush_chars = ssl_flush_chars, 156 .flush_buffer = ssl_flush_buffer, | |
157 .throttle = ssl_throttle, 158 .unthrottle = ssl_unthrottle, 159 .stop = ssl_stop, 160 .start = ssl_start, 161 .hangup = ssl_hangup, 162#endif 163}; 164 165/* Changed by ssl_init and referenced by ssl_exit, which are both serialized 166 * by being an initcall and exitcall, respectively. 167 */ 168static int ssl_init_done = 0; 169 170static void ssl_console_write(struct console *c, const char *string, 171 unsigned len) 172{ 173 struct line *line = &serial_lines[c->index]; | 152 .throttle = ssl_throttle, 153 .unthrottle = ssl_unthrottle, 154 .stop = ssl_stop, 155 .start = ssl_start, 156 .hangup = ssl_hangup, 157#endif 158}; 159 160/* Changed by ssl_init and referenced by ssl_exit, which are both serialized 161 * by being an initcall and exitcall, respectively. 162 */ 163static int ssl_init_done = 0; 164 165static void ssl_console_write(struct console *c, const char *string, 166 unsigned len) 167{ 168 struct line *line = &serial_lines[c->index]; |
169 unsigned long flags; |
|
174 | 170 |
175 down(&line->sem); | 171 spin_lock_irqsave(&line->lock, flags); |
176 console_write_chan(&line->chan_list, string, len); | 172 console_write_chan(&line->chan_list, string, len); |
177 up(&line->sem); | 173 spin_unlock_irqrestore(&line->lock, flags); |
178} 179 180static struct tty_driver *ssl_console_device(struct console *c, int *index) 181{ 182 *index = c->index; 183 return ssl_driver; 184} 185 --- 47 unchanged lines hidden (view full) --- 233{ 234 return(line_setup(serial_lines, 235 sizeof(serial_lines)/sizeof(serial_lines[0]), 236 str, 1)); 237} 238 239__setup("ssl", ssl_chan_setup); 240__channel_help(ssl_chan_setup, "ssl"); | 174} 175 176static struct tty_driver *ssl_console_device(struct console *c, int *index) 177{ 178 *index = c->index; 179 return ssl_driver; 180} 181 --- 47 unchanged lines hidden (view full) --- 229{ 230 return(line_setup(serial_lines, 231 sizeof(serial_lines)/sizeof(serial_lines[0]), 232 str, 1)); 233} 234 235__setup("ssl", ssl_chan_setup); 236__channel_help(ssl_chan_setup, "ssl"); |
241 242/* 243 * Overrides for Emacs so that we follow Linus's tabbing style. 244 * Emacs will notice this stuff at the end of the file and automatically 245 * adjust the settings for this buffer only. This must remain at the end 246 * of the file. 247 * --------------------------------------------------------------------------- 248 * Local variables: 249 * c-file-style: "linux" 250 * End: 251 */ | |