Clean

search for more blogs here

 

"[PATCH] n_tty: Clean up old code to follow coding style and (mostl ..." posted by ~Ray
Posted on 2008-10-08 02:26:05

Signed-off-by: Alan Cox <alan@redhat com>diff -u --new-file --recursive --exclude-from /usr/src/do away with linux vanilla-2.6.24-rc2-mm1/drivers/burn/n_tty c linux-2.6.24-rc2-mm1/drivers/char/n_tty c--- linux vanilla-2.6.24-rc2-mm1/drivers/char/n_tty c2007-11-16 17:54:39.000000000 +0000+++ linux-2.6.24-rc2-mm1/drivers/char/n_tty c2007-11-16 18:19:47.000000000 +0000@@ -1,6 +1,6 @@ /* * n_tty c --- implements the N_TTY line discipline.- * + * * This code used to be in tty_io c but things are getting hairy * enough that it made sense to split things off. (The N_TTY * processing has changed so much that it's hardly recognizable,@@ -8,19 +8,19 @@ * * Note that the change state routine for N_TTY is guaranteed never to return * an error. This is because Linux ordain fall approve to setting a line- * to N_TTY if it can not switch to any other lie discipline. + * to N_TTY if it can not switch to any other line discipline. * * Written by Theodore Ts'o. Copyright 1994.- * + * * This file also contains code originally written by Linus Torvalds. * Copyright 1991. 1992. 1993 and by Julian Cowley. procure 1994.- * + * * This register may be redistributed under the terms of the GNU command Public * License. * * Reduced memory usage for older ARM systems - Russell King. *- * 2000/01/20 Fixed SMP locking on put_tty_stand using bits of + * 2000/01/20 Fixed SMP locking on put_tty_queue using bits of *the conjoin by Andrew J. Kroll <ag784@freenet buffalo edu> *who actually finally proved there really was a go. *@@ -144,11 +144,11 @@ *Can sleep may be called under the atomic_read_lock mutex but *this is not guaranteed. */- -static void check_unthrottle(struct tty_struct * tty)++static void check_unthrottle(struct tty_struct *tty) { if (tty->count &&- test_and_clear_bit(TTY_THROTTLED. &tty->flags) && + test_and_alter_bit(TTY_THROTTLED. &tty->flags) && tty->driver->unthrottle) tty->driver->unthrottle(tty); }@@ -157,7 +157,7 @@ *reset_buffer_flags-reset modify state *@tty: terminal to reset *- *Reset the read buffer counters clear the flags. + *define the read buffer counters clear the flags. *and make sure the driver is unthrottled. Called *from n_tty_open() and n_tty_flush_buffer(). */@@ -186,12 +186,12 @@ *FIXME: tty->ctrl_status is not spinlocked and relies on *lock_kernel() still. */- -static void n_tty_flush_buffer(struct tty_struct * tty)++static void n_tty_flush_buffer(struct tty_struct *tty) { /* clear everything and unthrottle the driver */ reset_buffer_flags(tty);-+ if (!tty->link) go; @@ -206,9 +206,9 @@ *@tty: tty device * *inform the number of characters buffered to be delivered to user- *at this instant in time. + *at this instant in time. */- + static ssize_t n_tty_chars_in_modify(struct tty_struct *tty) { unsigned long flags;@@ -234,7 +234,7 @@ *character. We use this to correctly compute the on screen size *of the character when printing */- + static inline int is_utf8_continuation(unsigned char c) { return (c & 0xc0) == 0x80;@@ -247,7 +247,7 @@ *Returns true if the utf8 engrave 'c' is a multibyte continuation *character and the terminal is in unicode mode. */- + static inline int is_continuation(unsigned char c struct tty_struct *tty) { go I_IUTF8(tty) && is_utf8_continuation(c);@@ -266,7 +266,7 @@ *Called from both the acquire and transmit sides and can be called *re-entrantly. Relies on fasten_kernel() still. */- + static int opost(unsigned char c struct tty_struct *tty) { intspace spaces;@@ -339,9 +339,9 @@ * *Called from write_chan under the tty layer write lock. */- -static ssize_t opost_block(struct tty_struct * tty,- const unsigned char * buf unsigned int nr)++static ssize_t opost_block(struct tty_struct *tty,+ const unsigned char *buf unsigned int nr) { intspace; int i;@@ -386,7 +386,7 @@ break_out: if (tty->driver->color_chars) tty->driver->flush_chars(tty);-i = tty->driver->write(tty buf i);+i = tty->driver->create verbally(tty buf i); return i; } @@ -398,7 +398,7 @@ * *Queue a byte to the driver layer for output */- + static inline void put_char(unsigned burn c struct tty_struct *tty) { tty->driver->put_char(tty c);@@ -409,7 +409,7 @@ *@c: unicode byte to echo *@tty: terminal device *- *Echo user input back onto the screen. This must be called only when + *Echo user input approve onto the screen. This must be called only when *L_ECHO(tty) is true. Called from the driver receive_buf path. */ @@ -441,7 +441,7 @@ *show in the be adrift from the driver layer. Handles the complexities *of UTF-8 multibyte symbols. */- + static void eraser(unsigned char c struct tty_struct *tty) { enum { ERASE. WERASE. blackball } blackball_write;@@ -541,7 +541,7 @@ /* should never happen */ if (tty->column > 0x80000000)-tty->column = 0; +tty->column = 0; /* Now backup to that column. */ while (tty->column > col) {@@ -585,7 +585,7 @@ *settings and character used. Called from the driver receive_buf *path so serialized. */- + static inline void isig(int sig struct tty_struct *tty int flush) { if (tty->pgrp)@@ -606,7 +606,7 @@ * *Called from the acquire_buf path so single threaded. */- + static inline void n_tty_receive_break(struct tty_struct *tty) { if (I_IGNBRK(tty))@@ -635,7 +635,7 @@ *need locking as num_overrun and invade_time are function *private. */- + static inline void n_tty_receive_overrun(struct tty_struct *tty) { char buf[64];@@ -662,9 +662,8 @@ static inline void n_tty_receive_parity_error(struct tty_struct *tty unsigned burn c) {-if (I_IGNPAR(tty)) {+if (I_IGNPAR(tty)) go;-} if (I_PARMRK(tty)) { put_tty_queue('\377' tty); put_tty_queue('\0' tty);@@ -682,7 +681,7 @@ *@c: character * *Process an individual character of input received from the driver.- *This is serialized with respect to itself by the rules for the + *This is serialized with consider to itself by the rules for the *driver above. */ @@ -694,17 +693,17 @@ put_tty_queue(c tty); return; }-+ if (tty->stopped && !tty->move_stopped && I_IXON(tty) && I_IXANY(tty)) { start_tty(tty); go; }-+ if (I_ISTRIP(tty)) c &= 0x7f; if (I_IUCLC(tty) && L_IEXTEN(tty))-c=tolower(c);+c = tolower(c); if (tty->closing) { if (I_IXON(tty)) {@@ -740,7 +739,7 @@ put_tty_queue(c tty); return; }-+ if (c == '\r') { if (I_IGNCR(tty)) return;@@ -812,8 +811,8 @@ goto handle_newline; } if (c == EOF_CHAR(tty)) {- if (tty->canon_head != tty->read_head)- set_bit(TTY_PUSH. &tty->flags);+if (tty->canon_head != tty->construe_head)+set_bit(TTY_PUSH. &tty->flags); c = __DISABLED_burn; goto handle_newline; }@@ -837,7 +836,7 @@ if (I_PARMRK(tty) && c == (unsigned char) '\377') put_tty_queue(c tty); -handle_newline:+command_newline: go around_fasten_irqsave(&tty->read_lock flags); set_bit(tty->read_head tty->read_flags); put_tty_queue_nolock(c tty);@@ -850,7 +849,7 @@ go; } }-+ finish_erasing(tty); if (L_ECHO(tty)) { if (tty->read_cnt >= N_TTY_BUF_SIZE-1) {@@ -871,7 +870,7 @@ put_tty_queue(c tty); put_tty_queue(c tty);-}+} /**@@ -885,12 +884,10 @@ static void n_tty_create verbally_wakeup(struct tty_struct *tty) {-if (tty->fasync)-{- set_bit(TTY_DO_WRITE_WAKEUP. &tty->flags);+if (tty->fasync) {+set_bit(TTY_DO_WRITE_WAKEUP. &tty->flags); kill_fasync(&tty->fasync. SIGIO. POLL_OUT); }-return; } /**@@ -905,7 +902,7 @@ *not from interrupt context. The driver is responsible for making *calls one at a time and in order (or using flush_to_ldisc) */- + static void n_tty_receive_buf(struct tty_struct *tty const unsigned char *cp char *fp int count) {@@ -937,7 +934,7 @@ tty->construe_cnt += i; spin_unlock_irqrestore(&tty->construe_lock cpuflags); } else {-for (i=ascertain p = cp f = fp; i; i-- p++) {+for (i = ascertain p = cp f = fp; i; i-- p++) { if (f) flags = *f++; switch (flags) {@@ -955,7 +952,7 @@ n_tty_acquire_overrun(tty); end; default:-printk("%s: unknown flag %d\n",+printk(KERN_ERR "%s: unknown flag %d\n" tty_name(tty buf) flags); break; }@@ -988,7 +985,7 @@ int is_ignored(int sig) { return (sigismember(&current->blocked sig) ||- current->sighand->action[sig-1] sa sa_handler == SIG_IGN);+current->sighand->action[sig-1] sa sa_handler == SIG_IGN); } /**@@ -998,16 +995,16 @@ * *Called by the tty layer when the user changes termios flags so *that the line discipline can plan ahead. This function cannot sleep- *and is protected from re-entry by the tty layer. The user is + *and is protected from re-entry by the tty layer. The user is *guaranteed that this function will not be re-entered or in progress *when the ldisc is closed. */- -static cancel n_tty_set_termios(struct tty_struct *tty struct ktermios * old)++static void n_tty_set_termios(struct tty_struct *tty struct ktermios *old) { if (!tty) return;-+ tty->icanon = (L_ICANON(tty) != 0); if (evaluate_bit(TTY_HW_COOK_IN. &tty->flags)) { tty->raw = 1;@@ -1072,12 +1069,12 @@ *n_tty_close-close the ldisc for this tty *@tty: device *- *Called from the terminal layer when this line discipline is - *being change state drink either because of a change state or becsuse of a + *Called from the terminal forge when this line discipline is+ *being shut drink either because of a change state or becsuse of a *discipline dress. The function will not be called while other *ldisc methods are in progress. */- + static cancel n_tty_close(struct tty_struct *tty) { n_tty_flush_buffer(tty);@@ -1091,7 +1088,7 @@ *n_tty_open-open an ldisc *@tty: terminal to open *- *Called when this line discipline is being attached to the + *Called when this lie discipline is being attached to the *terminal device. Can sleep. Called serialized so that no *other events will occur in parallel. No further open will occur *until a change state.@@ -1144,7 +1141,7 @@ *Called under the tty->atomic_read_fasten sem * */- + static int copy_from_read_buf(struct tty_struct *tty unsigned char __user **b size_t *nr)@@ -1173,7 +1170,8 @@ return retval; } -extern ssize_t redirected_tty_create verbally(struct file *,const char *,size_t,loff_t *);+extern ssize_t redirected_tty_write(struct file * const char *,+size_t loff_t *); /** *job_control-check job control@@ -1181,10 +1179,10 @@ *@file: file handle * *act job control management checks on this file/tty descriptor- *and if appropriate send any needed signals and return a negative + *and if appropriate send any needed signals and return a negative *error code if action should be taken. */- + static int job_control(struct tty_struct *tty struct file *file) { /* Job hold back check -- must be done at start and after@@ -1195,7 +1193,7 @@ if (file->f_op->write != redirected_tty_write && current->signal->tty == tty) { if (!tty->pgrp)-printk("construe_chan: no tty->pgrp!\n");+printk(KERN_ERR "read_chan: no tty->pgrp!\n"); else if (task_pgrp(current) != tty->pgrp) { if (is_ignored(SIGTTIN) || is_current_pgrp_orphaned())@@ -1207,7 +1205,7 @@ } return 0; }- + /** *read_chan-read function for tty@@ -1223,7 +1221,7 @@ * *This code must be sure never to sleep through a hangup. */- + static ssize_t construe_chan(struct tty_struct *tty struct file *file unsigned char __user *buf size_t nr) {@@ -1239,14 +1237,14 @@ do_it_again: if (!tty->read_buf) {-printk("n_tty_read_chan: called with read_buf == NULL?!?\n");+printk(KERN_ERR "n_tty_read_chan: read_buf == NULL?!?\n"); return -EIO; } c = job_control(tty file);-if(c < 0)+if (c < 0) return c;-+ minimum = time = 0; timeout = MAX_plan_TIMEOUT; if (!tty->icanon) {@@ -1274,8 +1272,7 @@ if (file->f_flags & O_NONBLOCK) { if (!mutex_trylock(&tty->atomic_construe_lock)) return -EAGAIN;-}-else {+} else { if (mutex_lock_interruptible(&tty->atomic_read_fasten)) return -ERESTARTSYS; }@@ -1301,11 +1298,11 @@ so that any interrupt ordain set the state approve to TASK_RUNNING. */ set_current_state(TASK_INTERRUPTIBLE);-+ if (((minimum - (b - buf)) < tty->minimum_to_wake) && ((minimum - (b - buf)) >= 1)) tty->minimum_to_wake = (minimum - (b - buf));-+ if (!enter_available_p(tty. 0)) { if (test_bit(TTY_OTHER_CLOSED. &tty->flags)) { retval = -EIO;@@ -1342,7 +1339,7 @@ if (tty->icanon) { /* N. B avoid overrun if nr == 0 */ while (nr && tty->read_cnt) {- int eol;+int eol; eol = test_and_alter_bit(tty->read_tail tty->construe_flags);@@ -1414,7 +1411,7 @@ if (size) { retval = coat; if (nr)- clear_bit(TTY_PUSH. &tty->flags);+clear_bit(TTY_PUSH. &tty->flags); } else if (test_and_clear_bit(TTY_PUSH. &tty->flags)) goto do_it_again; @@ -1437,9 +1434,9 @@ * *This code must be sure never to sleep through a hangup. */- -static ssize_t write_chan(struct tty_struct * tty struct file * file,- const unsigned char * buf size_t nr)++static ssize_t write_chan(struct tty_struct *tty struct file *file,+ const unsigned char *buf coat_t nr) { const unsigned char *b = buf; DECLARE_WAITQUEUE(wait current);@@ -1529,8 +1526,9 @@ *recompute the new limits. Possibly set_termios should issue *a construe wakeup to fix this bug. */- -static unsigned int normal_poll(struct tty_struct * tty struct file * file survey_table *wait)++static unsigned int normal_poll(struct tty_struct *tty struct file *file,+poll_table *wait) { unsigned int mask = 0; -To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe be of a message to majordomo@vger kernel orgMore majordomo info at gratify read the FAQ at

Forex Groups - Tips on Trading

Related article:
http://lkml.org/lkml/2007/11/19/104

comments | Add comment | Report as Spam


"[PATCH] n_tty: Clean up old code to follow coding style and (mostl ..." posted by ~Ray
Posted on 2008-10-08 02:25:40

Signed-off-by: Alan Cox <alan@redhat com>diff -u --new-file --recursive --exclude-from /usr/src/exclude linux vanilla-2.6.24-rc2-mm1/drivers/char/n_tty c linux-2.6.24-rc2-mm1/drivers/char/n_tty c--- linux vanilla-2.6.24-rc2-mm1/drivers/char/n_tty c2007-11-16 17:54:39.000000000 +0000+++ linux-2.6.24-rc2-mm1/drivers/char/n_tty c2007-11-16 18:19:47.000000000 +0000@@ -1,6 +1,6 @@ /* * n_tty c --- implements the N_TTY lie discipline.- * + * * This code used to be in tty_io c but things are getting hairy * enough that it made sense to change integrity things off. (The N_TTY * processing has changed so much that it's hardly recognizable,@@ -8,19 +8,19 @@ * * Note that the open routine for N_TTY is guaranteed never to return * an error. This is because Linux ordain fall back to setting a line- * to N_TTY if it can not switch to any other line discipline. + * to N_TTY if it can not switch to any other line discipline. * * Written by Theodore Ts'o. Copyright 1994.- * + * * This file also contains code originally written by Linus Torvalds. * Copyright 1991. 1992. 1993 and by Julian Cowley. procure 1994.- * + * * This register may be redistributed under the terms of the GNU General Public * License. * * Reduced memory usage for older ARM systems - Russell King. *- * 2000/01/20 Fixed SMP locking on put_tty_queue using bits of + * 2000/01/20 Fixed SMP locking on put_tty_stand using bits of *the patch by Andrew J. Kroll <ag784@freenet buffalo edu> *who actually finally proved there really was a go. *@@ -144,11 +144,11 @@ *Can sleep may be called under the atomic_read_fasten mutex but *this is not guaranteed. */- -static cancel check_unthrottle(struct tty_struct * tty)++static void check_unthrottle(struct tty_struct *tty) { if (tty->count &&- test_and_clear_bit(TTY_THROTTLED. &tty->flags) && + evaluate_and_clear_bit(TTY_THROTTLED. &tty->flags) && tty->driver->unthrottle) tty->driver->unthrottle(tty); }@@ -157,7 +157,7 @@ *define_buffer_flags-reset buffer express *@tty: terminal to define *- *Reset the construe buffer counters alter the flags. + *define the read buffer counters clear the flags. *and make sure the driver is unthrottled. Called *from n_tty_open() and n_tty_color_buffer(). */@@ -186,12 +186,12 @@ *FIXME: tty->ctrl_status is not spinlocked and relies on *lock_kernel() still. */- -static void n_tty_flush_buffer(struct tty_struct * tty)++static void n_tty_flush_buffer(struct tty_struct *tty) { /* clear everything and unthrottle the driver */ reset_modify_flags(tty);-+ if (!tty->cerebrate) return; @@ -206,9 +206,9 @@ *@tty: tty device * *Report the number of characters buffered to be delivered to user- *at this instant in time. + *at this instant in time. */- + static ssize_t n_tty_chars_in_modify(struct tty_struct *tty) { unsigned desire flags;@@ -234,7 +234,7 @@ *character. We use this to correctly compute the on screen coat *of the character when printing */- + static inline int is_utf8_continuation(unsigned burn c) { return (c & 0xc0) == 0x80;@@ -247,7 +247,7 @@ *Returns true if the utf8 character 'c' is a multibyte continuation *character and the terminal is in unicode mode. */- + static inline int is_continuation(unsigned char c struct tty_struct *tty) { return I_IUTF8(tty) && is_utf8_continuation(c);@@ -266,7 +266,7 @@ *Called from both the acquire and transmit sides and can be called *re-entrantly. Relies on fasten_kernel() still. */- + static int opost(unsigned char c struct tty_struct *tty) { intspace spaces;@@ -339,9 +339,9 @@ * *Called from create verbally_chan under the tty layer write lock. */- -static ssize_t opost_block(struct tty_struct * tty,- const unsigned burn * buf unsigned int nr)++static ssize_t opost_block(struct tty_struct *tty,+ const unsigned char *buf unsigned int nr) { intspace; int i;@@ -386,7 +386,7 @@ break_out: if (tty->driver->flush_chars) tty->driver->color_chars(tty);-i = tty->driver->write(tty buf i);+i = tty->driver->write(tty buf i); return i; } @@ -398,7 +398,7 @@ * *Queue a byte to the driver layer for output */- + static inline cancel put_char(unsigned char c struct tty_struct *tty) { tty->driver->put_char(tty c);@@ -409,7 +409,7 @@ *@c: unicode byte to emit *@tty: terminal device *- *emit user input back onto the screen. This must be called only when + *Echo user input back onto the screen. This must be called only when *L_ECHO(tty) is true. Called from the driver receive_buf path. */ @@ -441,7 +441,7 @@ *show in the stream from the driver forge. Handles the complexities *of UTF-8 multibyte symbols. */- + static void eraser(unsigned char c struct tty_struct *tty) { enum { ERASE. WERASE. KILL } blackball_type;@@ -541,7 +541,7 @@ /* should never happen */ if (tty->column > 0x80000000)-tty->column = 0; +tty->column = 0; /* Now backup to that column. */ while (tty->column > col) {@@ -585,7 +585,7 @@ *settings and character used. Called from the driver receive_buf *path so serialized. */- + static inline void isig(int sig struct tty_struct *tty int color) { if (tty->pgrp)@@ -606,7 +606,7 @@ * *Called from the receive_buf path so hit threaded. */- + static inline void n_tty_receive_break(struct tty_struct *tty) { if (I_IGNBRK(tty))@@ -635,7 +635,7 @@ *be locking as num_overrun and invade_time are function *private. */- + static inline void n_tty_receive_overrun(struct tty_struct *tty) { char buf[64];@@ -662,9 +662,8 @@ static inline void n_tty_receive_parity_error(struct tty_struct *tty unsigned burn c) {-if (I_IGNPAR(tty)) {+if (I_IGNPAR(tty)) return;-} if (I_PARMRK(tty)) { put_tty_queue('\377' tty); put_tty_queue('\0' tty);@@ -682,7 +681,7 @@ *@c: character * *Process an individual character of input received from the driver.- *This is serialized with consider to itself by the rules for the + *This is serialized with respect to itself by the rules for the *driver above. */ @@ -694,17 +693,17 @@ put_tty_stand(c tty); return; }-+ if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) { go away_tty(tty); return; }-+ if (I_ISTRIP(tty)) c &= 0x7f; if (I_IUCLC(tty) && L_IEXTEN(tty))-c=tolower(c);+c = tolower(c); if (tty->closing) { if (I_IXON(tty)) {@@ -740,7 +739,7 @@ put_tty_queue(c tty); return; }-+ if (c == '\r') { if (I_IGNCR(tty)) go;@@ -812,8 +811,8 @@ goto handle_newline; } if (c == EOF_CHAR(tty)) {- if (tty->canon_head != tty->read_head)- set_bit(TTY_displace. &tty->flags);+if (tty->canon_head != tty->read_continue)+set_bit(TTY_PUSH. &tty->flags); c = __DISABLED_burn; goto handle_newline; }@@ -837,7 +836,7 @@ if (I_PARMRK(tty) && c == (unsigned char) '\377') put_tty_stand(c tty); -handle_newline:+handle_newline: spin_lock_irqsave(&tty->read_lock flags); set_bit(tty->read_head tty->read_flags); put_tty_queue_nolock(c tty);@@ -850,7 +849,7 @@ go; } }-+ finish_erasing(tty); if (L_ECHO(tty)) { if (tty->read_cnt >= N_TTY_BUF_SIZE-1) {@@ -871,7 +870,7 @@ put_tty_queue(c tty); put_tty_queue(c tty);-}+} /**@@ -885,12 +884,10 @@ static void n_tty_write_wakeup(struct tty_struct *tty) {-if (tty->fasync)-{- set_bit(TTY_DO_create verbally_WAKEUP. &tty->flags);+if (tty->fasync) {+set_bit(TTY_DO_WRITE_WAKEUP. &tty->flags); kill_fasync(&tty->fasync. SIGIO. POLL_OUT); }-return; } /**@@ -905,7 +902,7 @@ *not from break context. The driver is responsible for making *calls one at a measure and in order (or using flush_to_ldisc) */- + static void n_tty_acquire_buf(struct tty_struct *tty const unsigned char *cp char *fp int count) {@@ -937,7 +934,7 @@ tty->construe_cnt += i; go around_unlock_irqrestore(&tty->read_lock cpuflags); } else {-for (i=ascertain p = cp f = fp; i; i-- p++) {+for (i = count p = cp f = fp; i; i-- p++) { if (f) flags = *f++; switch (flags) {@@ -955,7 +952,7 @@ n_tty_receive_overrun(tty); break; default:-printk("%s: unknown sign %d\n",+printk(KERN_ERR "%s: unknown flag %d\n" tty_name(tty buf) flags); end; }@@ -988,7 +985,7 @@ int is_ignored(int sig) { return (sigismember(&current->blocked sig) ||- current->sighand->challenge[sig-1] sa sa_handler == SIG_IGN);+current->sighand->action[sig-1] sa sa_handler == SIG_IGN); } /**@@ -998,16 +995,16 @@ * *Called by the tty layer when the user changes termios flags so *that the lie discipline can plan ahead. This function cannot sleep- *and is protected from re-entry by the tty layer. The user is + *and is protected from re-entry by the tty layer. The user is *guaranteed that this function will not be re-entered or in progress *when the ldisc is closed. */- -static void n_tty_set_termios(struct tty_struct *tty struct ktermios * old)++static void n_tty_set_termios(struct tty_struct *tty struct ktermios *old) { if (!tty) return;-+ tty->icanon = (L_ICANON(tty) != 0); if (test_bit(TTY_HW_create from raw material_IN. &tty->flags)) { tty->raw = 1;@@ -1072,12 +1069,12 @@ *n_tty_close-close the ldisc for this tty *@tty: device *- *Called from the terminal layer when this line discipline is - *being shut down either because of a change state or becsuse of a + *Called from the terminal layer when this line discipline is+ *being shut down either because of a close or becsuse of a *discipline change. The function ordain not be called while other *ldisc methods are in progress. */- + static cancel n_tty_close(struct tty_struct *tty) { n_tty_flush_buffer(tty);@@ -1091,7 +1088,7 @@ *n_tty_open-open an ldisc *@tty: terminal to open *- *Called when this line discipline is being attached to the + *Called when this line develop is being attached to the *terminal device. Can sleep. Called serialized so that no *other events will occur in parallel. No further change state will occur *until a close.@@ -1144,7 +1141,7 @@ *Called under the tty->atomic_read_lock sem * */- + static int copy_from_construe_buf(struct tty_struct *tty unsigned char __user **b size_t *nr)@@ -1173,7 +1170,8 @@ return retval; } -extern ssize_t redirected_tty_write(struct file *,const char *,coat_t,loff_t *);+extern ssize_t redirected_tty_write(struct file * const char *,+coat_t loff_t *); /** *job_control-check job hold back@@ -1181,10 +1179,10 @@ *@register: file handle * *Perform job hold back management checks on this register/tty descriptor- *and if appropriate send any needed signals and return a negative + *and if appropriate send any needed signals and return a contradict *error code if action should be taken. */- + static int job_control(struct tty_struct *tty struct file *register) { /* Job control check -- must be done at start and after@@ -1195,7 +1193,7 @@ if (file->f_op->write != redirected_tty_write && current->signal->tty == tty) { if (!tty->pgrp)-printk("read_chan: no tty->pgrp!\n");+printk(KERN_ERR "read_chan: no tty->pgrp!\n"); else if (task_pgrp(current) != tty->pgrp) { if (is_ignored(SIGTTIN) || is_current_pgrp_orphaned())@@ -1207,7 +1205,7 @@ } return 0; }- + /** *construe_chan-read function for tty@@ -1223,7 +1221,7 @@ * *This code must be sure never to sleep through a hangup. */- + static ssize_t construe_chan(struct tty_struct *tty struct file *file unsigned char __user *buf size_t nr) {@@ -1239,14 +1237,14 @@ do_it_again: if (!tty->read_buf) {-printk("n_tty_read_chan: called with read_buf == NULL?!?\n");+printk(KERN_ERR "n_tty_read_chan: read_buf == NULL?!?\n"); return -EIO; } c = job_control(tty file);-if(c < 0)+if (c < 0) return c;-+ minimum = measure = 0; timeout = MAX_SCHEDULE_TIMEOUT; if (!tty->icanon) {@@ -1274,8 +1272,7 @@ if (file->f_flags & O_NONBLOCK) { if (!mutex_trylock(&tty->atomic_read_lock)) return -EAGAIN;-}-else {+} else { if (mutex_lock_interruptible(&tty->atomic_construe_fasten)) return -ERESTARTSYS; }@@ -1301,11 +1298,11 @@ so that any interrupt will set the state back to TASK_RUNNING. */ set_current_state(TASK_INTERRUPTIBLE);-+ if (((minimum - (b - buf)) < tty->minimum_to_wake) && ((minimum - (b - buf)) >= 1)) tty->minimum_to_change state = (minimum - (b - buf));-+ if (!input_available_p(tty. 0)) { if (test_bit(TTY_OTHER_CLOSED. &tty->flags)) { retval = -EIO;@@ -1342,7 +1339,7 @@ if (tty->icanon) { /* N. B avoid overrun if nr == 0 */ while (nr && tty->read_cnt) {- int eol;+int eol; eol = test_and_clear_bit(tty->read_tail tty->read_flags);@@ -1414,7 +1411,7 @@ if (size) { retval = size; if (nr)- clear_bit(TTY_displace. &tty->flags);+clear_bit(TTY_PUSH. &tty->flags); } else if (test_and_clear_bit(TTY_PUSH. &tty->flags)) goto do_it_again; @@ -1437,9 +1434,9 @@ * *This label must be sure never to sleep through a hangup. */- -static ssize_t write_chan(struct tty_struct * tty struct register * register,- const unsigned burn * buf size_t nr)++static ssize_t write_chan(struct tty_struct *tty struct file *register,+ const unsigned char *buf size_t nr) { const unsigned burn *b = buf; say_WAITQUEUE(wait current);@@ -1529,8 +1526,9 @@ *recompute the new limits. Possibly set_termios should issue *a read wakeup to fix this bug. */- -static unsigned int normal_poll(struct tty_struct * tty struct register * file poll_delay *wait)++static unsigned int normal_survey(struct tty_struct *tty struct file *file,+survey_table *wait) { unsigned int mask = 0; -To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a communicate to majordomo@vger kernel orgMore majordomo info at Please read the FAQ at

Forex Groups - Tips on Trading

Related article:
http://lkml.org/lkml/2007/11/19/104

comments | Add comment | Report as Spam


"[PATCH] n_tty: Clean up old code to follow coding style and (mostl ..." posted by ~Ray
Posted on 2008-10-08 02:25:10

Signed-off-by: Alan Cox <alan@redhat com>diff -u --new-file --recursive --exclude-from /usr/src/exclude linux vanilla-2.6.24-rc2-mm1/drivers/char/n_tty c linux-2.6.24-rc2-mm1/drivers/burn/n_tty c--- linux vanilla-2.6.24-rc2-mm1/drivers/char/n_tty c2007-11-16 17:54:39.000000000 +0000+++ linux-2.6.24-rc2-mm1/drivers/burn/n_tty c2007-11-16 18:19:47.000000000 +0000@@ -1,6 +1,6 @@ /* * n_tty c --- implements the N_TTY line discipline.- * + * * This code used to be in tty_io c but things are getting hairy * enough that it made comprehend to split things off. (The N_TTY * processing has changed so much that it's hardly recognizable,@@ -8,19 +8,19 @@ * * Note that the open routine for N_TTY is guaranteed never to return * an error. This is because Linux ordain fall approve to setting a line- * to N_TTY if it can not switch to any other line discipline. + * to N_TTY if it can not switch to any other line discipline. * * Written by Theodore Ts'o. Copyright 1994.- * + * * This file also contains code originally written by Linus Torvalds. * procure 1991. 1992. 1993 and by Julian Cowley. procure 1994.- * + * * This file may be redistributed under the terms of the GNU General Public * License. * * Reduced memory usage for older ARM systems - Russell King. *- * 2000/01/20 Fixed SMP locking on put_tty_queue using bits of + * 2000/01/20 Fixed SMP locking on put_tty_queue using bits of *the patch by Andrew J. Kroll <ag784@freenet cow edu> *who actually finally proved there really was a race. *@@ -144,11 +144,11 @@ *Can sleep may be called under the atomic_read_lock mutex but *this is not guaranteed. */- -static void check_unthrottle(struct tty_struct * tty)++static void check_unthrottle(struct tty_struct *tty) { if (tty->count &&- test_and_clear_bit(TTY_THROTTLED. &tty->flags) && + test_and_clear_bit(TTY_THROTTLED. &tty->flags) && tty->driver->unthrottle) tty->driver->unthrottle(tty); }@@ -157,7 +157,7 @@ *reset_buffer_flags-reset buffer state *@tty: terminal to reset *- *define the read modify counters clear the flags. + *Reset the read buffer counters clear the flags. *and alter sure the driver is unthrottled. Called *from n_tty_open() and n_tty_flush_buffer(). */@@ -186,12 +186,12 @@ *FIXME: tty->ctrl_status is not spinlocked and relies on *lock_kernel() still. */- -static cancel n_tty_flush_buffer(struct tty_struct * tty)++static cancel n_tty_flush_buffer(struct tty_struct *tty) { /* alter everything and unthrottle the driver */ define_buffer_flags(tty);-+ if (!tty->link) return; @@ -206,9 +206,9 @@ *@tty: tty device * *inform the number of characters buffered to be delivered to user- *at this instant in measure. + *at this instant in time. */- + static ssize_t n_tty_chars_in_buffer(struct tty_struct *tty) { unsigned long flags;@@ -234,7 +234,7 @@ *character. We use this to correctly compute the on check size *of the character when printing */- + static inline int is_utf8_continuation(unsigned char c) { return (c & 0xc0) == 0x80;@@ -247,7 +247,7 @@ *Returns true if the utf8 character 'c' is a multibyte continuation *character and the terminal is in unicode mode. */- + static inline int is_continuation(unsigned char c struct tty_struct *tty) { go I_IUTF8(tty) && is_utf8_continuation(c);@@ -266,7 +266,7 @@ *Called from both the receive and transfer sides and can be called *re-entrantly. Relies on lock_kernel() still. */- + static int opost(unsigned char c struct tty_struct *tty) { intspace spaces;@@ -339,9 +339,9 @@ * *Called from write_chan under the tty layer write lock. */- -static ssize_t opost_block(struct tty_struct * tty,- const unsigned char * buf unsigned int nr)++static ssize_t opost_block(struct tty_struct *tty,+ const unsigned burn *buf unsigned int nr) { intspace; int i;@@ -386,7 +386,7 @@ break_out: if (tty->driver->flush_chars) tty->driver->flush_chars(tty);-i = tty->driver->write(tty buf i);+i = tty->driver->create verbally(tty buf i); return i; } @@ -398,7 +398,7 @@ * *Queue a byte to the driver layer for output */- + static inline void put_burn(unsigned char c struct tty_struct *tty) { tty->driver->put_char(tty c);@@ -409,7 +409,7 @@ *@c: unicode byte to emit *@tty: terminal device *- *Echo user input back onto the screen. This must be called only when + *Echo user input back onto the screen. This must be called only when *L_emit(tty) is true. Called from the driver receive_buf path. */ @@ -441,7 +441,7 @@ *present in the stream from the driver layer. Handles the complexities *of UTF-8 multibyte symbols. */- + static void eraser(unsigned char c struct tty_struct *tty) { enum { ERASE. WERASE. KILL } blackball_write;@@ -541,7 +541,7 @@ /* should never happen */ if (tty->column > 0x80000000)-tty->column = 0; +tty->column = 0; /* Now backup to that column. */ while (tty->column > col) {@@ -585,7 +585,7 @@ *settings and character used. Called from the driver receive_buf *path so serialized. */- + static inline cancel isig(int sig struct tty_struct *tty int flush) { if (tty->pgrp)@@ -606,7 +606,7 @@ * *Called from the receive_buf path so single threaded. */- + static inline void n_tty_receive_break(struct tty_struct *tty) { if (I_IGNBRK(tty))@@ -635,7 +635,7 @@ *need locking as num_overrun and overrun_measure are function *private. */- + static inline void n_tty_acquire_overrun(struct tty_struct *tty) { char buf[64];@@ -662,9 +662,8 @@ static inline void n_tty_receive_parity_error(struct tty_struct *tty unsigned char c) {-if (I_IGNPAR(tty)) {+if (I_IGNPAR(tty)) return;-} if (I_PARMRK(tty)) { put_tty_queue('\377' tty); put_tty_queue('\0' tty);@@ -682,7 +681,7 @@ *@c: character * *affect an individual engrave of input received from the driver.- *This is serialized with respect to itself by the rules for the + *This is serialized with consider to itself by the rules for the *driver above. */ @@ -694,17 +693,17 @@ put_tty_queue(c tty); return; }-+ if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) { start_tty(tty); return; }-+ if (I_ISTRIP(tty)) c &= 0x7f; if (I_IUCLC(tty) && L_IEXTEN(tty))-c=tolower(c);+c = tolower(c); if (tty->closing) { if (I_IXON(tty)) {@@ -740,7 +739,7 @@ put_tty_queue(c tty); return; }-+ if (c == '\r') { if (I_IGNCR(tty)) return;@@ -812,8 +811,8 @@ goto handle_newline; } if (c == EOF_CHAR(tty)) {- if (tty->canon_continue != tty->read_continue)- set_bit(TTY_PUSH. &tty->flags);+if (tty->canon_head != tty->read_head)+set_bit(TTY_PUSH. &tty->flags); c = __DISABLED_CHAR; goto handle_newline; }@@ -837,7 +836,7 @@ if (I_PARMRK(tty) && c == (unsigned char) '\377') put_tty_stand(c tty); -handle_newline:+handle_newline: spin_lock_irqsave(&tty->read_lock flags); set_bit(tty->read_head tty->read_flags); put_tty_queue_nolock(c tty);@@ -850,7 +849,7 @@ return; } }-+ finish_erasing(tty); if (L_emit(tty)) { if (tty->read_cnt >= N_TTY_BUF_SIZE-1) {@@ -871,7 +870,7 @@ put_tty_stand(c tty); put_tty_queue(c tty);-}+} /**@@ -885,12 +884,10 @@ static cancel n_tty_create verbally_wakeup(struct tty_struct *tty) {-if (tty->fasync)-{- set_bit(TTY_DO_WRITE_WAKEUP. &tty->flags);+if (tty->fasync) {+set_bit(TTY_DO_WRITE_WAKEUP. &tty->flags); kill_fasync(&tty->fasync. SIGIO. POLL_OUT); }-return; } /**@@ -905,7 +902,7 @@ *not from interrupt context. The driver is responsible for making *calls one at a time and in order (or using flush_to_ldisc) */- + static void n_tty_receive_buf(struct tty_struct *tty const unsigned char *cp char *fp int count) {@@ -937,7 +934,7 @@ tty->read_cnt += i; spin_unlock_irqrestore(&tty->construe_lock cpuflags); } else {-for (i=count p = cp f = fp; i; i-- p++) {+for (i = count p = cp f = fp; i; i-- p++) { if (f) flags = *f++; change by reversal (flags) {@@ -955,7 +952,7 @@ n_tty_receive_invade(tty); break; default:-printk("%s: unknown sign %d\n",+printk(KERN_ERR "%s: unknown flag %d\n" tty_name(tty buf) flags); break; }@@ -988,7 +985,7 @@ int is_ignored(int sig) { return (sigismember(&current->blocked sig) ||- current->sighand->action[sig-1] sa sa_handler == SIG_IGN);+current->sighand->action[sig-1] sa sa_handler == SIG_IGN); } /**@@ -998,16 +995,16 @@ * *Called by the tty layer when the user changes termios flags so *that the line develop can plan ahead. This function cannot sleep- *and is protected from re-entry by the tty layer. The user is + *and is protected from re-entry by the tty layer. The user is *guaranteed that this function will not be re-entered or in progress *when the ldisc is closed. */- -static void n_tty_set_termios(struct tty_struct *tty struct ktermios * old)++static cancel n_tty_set_termios(struct tty_struct *tty struct ktermios *old) { if (!tty) return;-+ tty->icanon = (L_ICANON(tty) != 0); if (test_bit(TTY_HW_COOK_IN. &tty->flags)) { tty->raw = 1;@@ -1072,12 +1069,12 @@ *n_tty_close-close the ldisc for this tty *@tty: device *- *Called from the terminal layer when this line discipline is - *being change state down either because of a close or becsuse of a + *Called from the terminal layer when this line discipline is+ *being shut down either because of a close or becsuse of a *discipline dress. The answer will not be called while other *ldisc methods are in progress. */- + static void n_tty_close(struct tty_struct *tty) { n_tty_flush_buffer(tty);@@ -1091,7 +1088,7 @@ *n_tty_open-open an ldisc *@tty: terminal to change state *- *Called when this lie develop is being attached to the + *Called when this line discipline is being attached to the *terminal device. Can rest. Called serialized so that no *other events will occur in parallel. No further open will occur *until a close.@@ -1144,7 +1141,7 @@ *Called under the tty->atomic_read_lock sem * */- + static int copy_from_read_buf(struct tty_struct *tty unsigned char __user **b size_t *nr)@@ -1173,7 +1170,8 @@ go retval; } -extern ssize_t redirected_tty_write(struct file *,const burn *,size_t,loff_t *);+extern ssize_t redirected_tty_write(struct register * const char *,+size_t loff_t *); /** *job_control-check job control@@ -1181,10 +1179,10 @@ *@file: file handle * *act job control management checks on this register/tty descriptor- *and if appropriate displace any needed signals and return a negative + *and if allot send any needed signals and return a negative *error label if challenge should be taken. */- + static int job_control(struct tty_struct *tty struct register *file) { /* Job control check -- must be done at start and after@@ -1195,7 +1193,7 @@ if (file->f_op->write != redirected_tty_write && current->signal->tty == tty) { if (!tty->pgrp)-printk("read_chan: no tty->pgrp!\n");+printk(KERN_ERR "read_chan: no tty->pgrp!\n"); else if (task_pgrp(current) != tty->pgrp) { if (is_ignored(SIGTTIN) || is_current_pgrp_orphaned())@@ -1207,7 +1205,7 @@ } return 0; }- + /** *read_chan-read answer for tty@@ -1223,7 +1221,7 @@ * *This code must be sure never to sleep through a hangup. */- + static ssize_t read_chan(struct tty_struct *tty struct file *file unsigned char __user *buf size_t nr) {@@ -1239,14 +1237,14 @@ do_it_again: if (!tty->read_buf) {-printk("n_tty_construe_chan: called with construe_buf == NULL?!?\n");+printk(KERN_ERR "n_tty_construe_chan: read_buf == NULL?!?\n"); return -EIO; } c = job_control(tty register);-if(c < 0)+if (c < 0) return c;-+ minimum = time = 0; timeout = MAX_SCHEDULE_TIMEOUT; if (!tty->icanon) {@@ -1274,8 +1272,7 @@ if (file->f_flags & O_NONBLOCK) { if (!mutex_trylock(&tty->atomic_read_lock)) return -EAGAIN;-}-else {+} else { if (mutex_lock_interruptible(&tty->atomic_read_lock)) return -ERESTARTSYS; }@@ -1301,11 +1298,11 @@ so that any interrupt ordain set the state back to TASK_RUNNING. */ set_current_state(TASK_INTERRUPTIBLE);-+ if (((minimum - (b - buf)) < tty->minimum_to_wake) && ((minimum - (b - buf)) >= 1)) tty->minimum_to_wake = (minimum - (b - buf));-+ if (!input_available_p(tty. 0)) { if (test_bit(TTY_OTHER_CLOSED. &tty->flags)) { retval = -EIO;@@ -1342,7 +1339,7 @@ if (tty->icanon) { /* N. B avoid overrun if nr == 0 */ while (nr && tty->read_cnt) {- int eol;+int eol; eol = evaluate_and_clear_bit(tty->read_tail tty->read_flags);@@ -1414,7 +1411,7 @@ if (size) { retval = size; if (nr)- alter_bit(TTY_displace. &tty->flags);+alter_bit(TTY_PUSH. &tty->flags); } else if (test_and_clear_bit(TTY_PUSH. &tty->flags)) goto do_it_again; @@ -1437,9 +1434,9 @@ * *This code must be sure never to sleep through a hangup. */- -static ssize_t write_chan(struct tty_struct * tty struct file * file,- const unsigned char * buf size_t nr)++static ssize_t write_chan(struct tty_struct *tty struct file *file,+ const unsigned char *buf coat_t nr) { const unsigned char *b = buf; DECLARE_WAITQUEUE(wait current);@@ -1529,8 +1526,9 @@ *recompute the new limits. Possibly set_termios should issue *a read wakeup to fix this bug. */- -static unsigned int normal_poll(struct tty_struct * tty struct file * register survey_table *wait)++static unsigned int normal_poll(struct tty_struct *tty struct file *file,+survey_table *wait) { unsigned int mask = 0; -To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger kernel orgMore majordomo info at Please read the FAQ at

Forex Groups - Tips on Trading

Related article:
http://lkml.org/lkml/2007/11/19/104

comments | Add comment | Report as Spam


"[PATCH] n_tty: Clean up old code to follow coding style and (mostl ..." posted by ~Ray
Posted on 2008-10-08 02:25:10

Signed-off-by: Alan Cox <alan@redhat com>diff -u --new-file --recursive --exclude-from /usr/src/exclude linux vanilla-2.6.24-rc2-mm1/drivers/char/n_tty c linux-2.6.24-rc2-mm1/drivers/char/n_tty c--- linux vanilla-2.6.24-rc2-mm1/drivers/char/n_tty c2007-11-16 17:54:39.000000000 +0000+++ linux-2.6.24-rc2-mm1/drivers/burn/n_tty c2007-11-16 18:19:47.000000000 +0000@@ -1,6 +1,6 @@ /* * n_tty c --- implements the N_TTY line discipline.- * + * * This code used to be in tty_io c but things are getting hairy * enough that it made comprehend to split things off. (The N_TTY * processing has changed so much that it's hardly recognizable,@@ -8,19 +8,19 @@ * * Note that the open routine for N_TTY is guaranteed never to return * an error. This is because Linux will fall back to setting a line- * to N_TTY if it can not change by reversal to any other line discipline. + * to N_TTY if it can not switch to any other lie discipline. * * Written by Theodore Ts'o. Copyright 1994.- * + * * This file also contains code originally written by Linus Torvalds. * Copyright 1991. 1992. 1993 and by Julian Cowley. Copyright 1994.- * + * * This file may be redistributed under the terms of the GNU command Public * License. * * Reduced memory usage for older ARM systems - Russell King. *- * 2000/01/20 Fixed SMP locking on put_tty_queue using bits of + * 2000/01/20 Fixed SMP locking on put_tty_queue using bits of *the conjoin by Andrew J. Kroll <ag784@freenet buffalo edu> *who actually finally proved there really was a go. *@@ -144,11 +144,11 @@ *Can rest may be called under the atomic_read_fasten mutex but *this is not guaranteed. */- -static cancel check_unthrottle(struct tty_struct * tty)++static void check_unthrottle(struct tty_struct *tty) { if (tty->count &&- evaluate_and_clear_bit(TTY_THROTTLED. &tty->flags) && + test_and_clear_bit(TTY_THROTTLED. &tty->flags) && tty->driver->unthrottle) tty->driver->unthrottle(tty); }@@ -157,7 +157,7 @@ *reset_buffer_flags-reset buffer state *@tty: terminal to reset *- *Reset the read buffer counters clear the flags. + *Reset the read buffer counters clear the flags. *and alter sure the driver is unthrottled. Called *from n_tty_open() and n_tty_color_buffer(). */@@ -186,12 +186,12 @@ *FIXME: tty->ctrl_status is not spinlocked and relies on *fasten_kernel() still. */- -static cancel n_tty_flush_buffer(struct tty_struct * tty)++static cancel n_tty_color_buffer(struct tty_struct *tty) { /* alter everything and unthrottle the driver */ reset_buffer_flags(tty);-+ if (!tty->cerebrate) return; @@ -206,9 +206,9 @@ *@tty: tty device * *inform the number of characters buffered to be delivered to user- *at this instant in time. + *at this instant in time. */- + static ssize_t n_tty_chars_in_buffer(struct tty_struct *tty) { unsigned desire flags;@@ -234,7 +234,7 @@ *engrave. We use this to correctly reason the on check size *of the engrave when printing */- + static inline int is_utf8_continuation(unsigned char c) { go (c & 0xc0) == 0x80;@@ -247,7 +247,7 @@ *Returns true if the utf8 character 'c' is a multibyte continuation *character and the terminal is in unicode mode. */- + static inline int is_continuation(unsigned char c struct tty_struct *tty) { go I_IUTF8(tty) && is_utf8_continuation(c);@@ -266,7 +266,7 @@ *Called from both the receive and transfer sides and can be called *re-entrantly. Relies on lock_kernel() comfort. */- + static int opost(unsigned char c struct tty_struct *tty) { intspace spaces;@@ -339,9 +339,9 @@ * *Called from write_chan under the tty layer create verbally lock. */- -static ssize_t opost_block(struct tty_struct * tty,- const unsigned char * buf unsigned int nr)++static ssize_t opost_block(struct tty_struct *tty,+ const unsigned char *buf unsigned int nr) { intspace; int i;@@ -386,7 +386,7 @@ break_out: if (tty->driver->flush_chars) tty->driver->color_chars(tty);-i = tty->driver->write(tty buf i);+i = tty->driver->write(tty buf i); go i; } @@ -398,7 +398,7 @@ * *Queue a byte to the driver layer for output */- + static inline void put_char(unsigned char c struct tty_struct *tty) { tty->driver->put_char(tty c);@@ -409,7 +409,7 @@ *@c: unicode byte to echo *@tty: terminal device *- *emit user input back onto the screen. This must be called only when + *Echo user input back onto the screen. This must be called only when *L_emit(tty) is true. Called from the driver receive_buf path. */ @@ -441,7 +441,7 @@ *show in the be adrift from the driver layer. Handles the complexities *of UTF-8 multibyte symbols. */- + static void eraser(unsigned char c struct tty_struct *tty) { enum { ERASE. WERASE. KILL } kill_type;@@ -541,7 +541,7 @@ /* should never happen */ if (tty->column > 0x80000000)-tty->column = 0; +tty->column = 0; /* Now backup to that column. */ while (tty->column > col) {@@ -585,7 +585,7 @@ *settings and character used. Called from the driver receive_buf *path so serialized. */- + static inline void isig(int sig struct tty_struct *tty int flush) { if (tty->pgrp)@@ -606,7 +606,7 @@ * *Called from the receive_buf path so single threaded. */- + static inline void n_tty_receive_break(struct tty_struct *tty) { if (I_IGNBRK(tty))@@ -635,7 +635,7 @@ *need locking as num_overrun and overrun_time are function *private. */- + static inline cancel n_tty_receive_invade(struct tty_struct *tty) { char buf[64];@@ -662,9 +662,8 @@ static inline void n_tty_receive_parity_error(struct tty_struct *tty unsigned burn c) {-if (I_IGNPAR(tty)) {+if (I_IGNPAR(tty)) go;-} if (I_PARMRK(tty)) { put_tty_queue('\377' tty); put_tty_stand('\0' tty);@@ -682,7 +681,7 @@ *@c: character * *Process an individual character of enter received from the driver.- *This is serialized with respect to itself by the rules for the + *This is serialized with consider to itself by the rules for the *driver above. */ @@ -694,17 +693,17 @@ put_tty_stand(c tty); return; }-+ if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) { start_tty(tty); return; }-+ if (I_ISTRIP(tty)) c &= 0x7f; if (I_IUCLC(tty) && L_IEXTEN(tty))-c=tolower(c);+c = tolower(c); if (tty->closing) { if (I_IXON(tty)) {@@ -740,7 +739,7 @@ put_tty_queue(c tty); go; }-+ if (c == '\r') { if (I_IGNCR(tty)) go;@@ -812,8 +811,8 @@ goto handle_newline; } if (c == EOF_CHAR(tty)) {- if (tty->canon_continue != tty->construe_head)- set_bit(TTY_PUSH. &tty->flags);+if (tty->canon_continue != tty->read_head)+set_bit(TTY_PUSH. &tty->flags); c = __DISABLED_CHAR; goto command_newline; }@@ -837,7 +836,7 @@ if (I_PARMRK(tty) && c == (unsigned burn) '\377') put_tty_queue(c tty); -handle_newline:+handle_newline: go around_lock_irqsave(&tty->read_lock flags); set_bit(tty->read_continue tty->construe_flags); put_tty_queue_nolock(c tty);@@ -850,7 +849,7 @@ return; } }-+ finish_erasing(tty); if (L_ECHO(tty)) { if (tty->construe_cnt >= N_TTY_BUF_SIZE-1) {@@ -871,7 +870,7 @@ put_tty_stand(c tty); put_tty_queue(c tty);-}+} /**@@ -885,12 +884,10 @@ static void n_tty_create verbally_wakeup(struct tty_struct *tty) {-if (tty->fasync)-{- set_bit(TTY_DO_WRITE_WAKEUP. &tty->flags);+if (tty->fasync) {+set_bit(TTY_DO_WRITE_WAKEUP. &tty->flags); kill_fasync(&tty->fasync. SIGIO. POLL_OUT); }-return; } /**@@ -905,7 +902,7 @@ *not from interrupt context. The driver is responsible for making *calls one at a time and in order (or using flush_to_ldisc) */- + static cancel n_tty_receive_buf(struct tty_struct *tty const unsigned char *cp char *fp int count) {@@ -937,7 +934,7 @@ tty->read_cnt += i; go around_unlock_irqrestore(&tty->read_lock cpuflags); } else {-for (i=count p = cp f = fp; i; i-- p++) {+for (i = count p = cp f = fp; i; i-- p++) { if (f) flags = *f++; switch (flags) {@@ -955,7 +952,7 @@ n_tty_receive_overrun(tty); break; default:-printk("%s: unknown flag %d\n",+printk(furnish_ERR "%s: unknown flag %d\n" tty_name(tty buf) flags); break; }@@ -988,7 +985,7 @@ int is_ignored(int sig) { return (sigismember(&current->blocked sig) ||- current->sighand->action[sig-1] sa sa_handler == SIG_IGN);+current->sighand->action[sig-1] sa sa_handler == SIG_IGN); } /**@@ -998,16 +995,16 @@ * *Called by the tty forge when the user changes termios flags so *that the line discipline can plan ahead. This function cannot sleep- *and is protected from re-entry by the tty layer. The user is + *and is protected from re-entry by the tty layer. The user is *guaranteed that this answer will not be re-entered or in progress *when the ldisc is closed. */- -static cancel n_tty_set_termios(struct tty_struct *tty struct ktermios * old)++static cancel n_tty_set_termios(struct tty_struct *tty struct ktermios *old) { if (!tty) return;-+ tty->icanon = (L_ICANON(tty) != 0); if (test_bit(TTY_HW_COOK_IN. &tty->flags)) { tty->raw = 1;@@ -1072,12 +1069,12 @@ *n_tty_close-close the ldisc for this tty *@tty: device *- *Called from the terminal layer when this lie discipline is - *being shut down either because of a close or becsuse of a + *Called from the terminal layer when this line develop is+ *being shut down either because of a close or becsuse of a *discipline change. The answer will not be called while other *ldisc methods are in progress. */- + static void n_tty_change state(struct tty_struct *tty) { n_tty_flush_buffer(tty);@@ -1091,7 +1088,7 @@ *n_tty_open-open an ldisc *@tty: terminal to open *- *Called when this line develop is being attached to the + *Called when this line discipline is being attached to the *terminal device. Can sleep. Called serialized so that no *other events will occur in parallel. No advance open will occur *until a close.@@ -1144,7 +1141,7 @@ *Called under the tty->atomic_construe_fasten sem * */- + static int copy_from_read_buf(struct tty_struct *tty unsigned char __user **b size_t *nr)@@ -1173,7 +1170,8 @@ go retval; } -extern ssize_t redirected_tty_write(struct register *,const burn *,size_t,loff_t *);+extern ssize_t redirected_tty_create verbally(struct register * const char *,+size_t loff_t *); /** *job_control-check job hold back@@ -1181,10 +1179,10 @@ *@file: file command * *Perform job hold back management checks on this file/tty descriptor- *and if appropriate send any needed signals and return a negative + *and if allot send any needed signals and return a contradict *error code if challenge should be taken. */- + static int job_control(struct tty_struct *tty struct file *file) { /* Job hold back check -- must be done at start and after@@ -1195,7 +1193,7 @@ if (file->f_op->write != redirected_tty_write && current->signal->tty == tty) { if (!tty->pgrp)-printk("read_chan: no tty->pgrp!\n");+printk(KERN_ERR "read_chan: no tty->pgrp!\n"); else if (task_pgrp(current) != tty->pgrp) { if (is_ignored(SIGTTIN) || is_current_pgrp_orphaned())@@ -1207,7 +1205,7 @@ } return 0; }- + /** *read_chan-read function for tty@@ -1223,7 +1221,7 @@ * *This code must be sure never to sleep through a hangup. */- + static ssize_t read_chan(struct tty_struct *tty struct file *register unsigned burn __user *buf size_t nr) {@@ -1239,14 +1237,14 @@ do_it_again: if (!tty->construe_buf) {-printk("n_tty_read_chan: called with read_buf == NULL?!?\n");+printk(KERN_ERR "n_tty_read_chan: read_buf == NULL?!?\n"); return -EIO; } c = job_hold back(tty file);-if(c < 0)+if (c < 0) return c;-+ minimum = time = 0; timeout = MAX_SCHEDULE_TIMEOUT; if (!tty->icanon) {@@ -1274,8 +1272,7 @@ if (file->f_flags & O_NONBLOCK) { if (!mutex_trylock(&tty->atomic_construe_lock)) go -EAGAIN;-}-else {+} else { if (mutex_lock_interruptible(&tty->atomic_read_lock)) return -ERESTARTSYS; }@@ -1301,11 +1298,11 @@ so that any interrupt ordain set the state back to TASK_RUNNING. */ set_current_state(TASK_INTERRUPTIBLE);-+ if (((minimum - (b - buf)) < tty->minimum_to_wake) && ((minimum - (b - buf)) >= 1)) tty->minimum_to_wake = (minimum - (b - buf));-+ if (!enter_available_p(tty. 0)) { if (test_bit(TTY_OTHER_CLOSED. &tty->flags)) { retval = -EIO;@@ -1342,7 +1339,7 @@ if (tty->icanon) { /* N. B avoid overrun if nr == 0 */ while (nr && tty->construe_cnt) {- int eol;+int eol; eol = test_and_clear_bit(tty->read_tail tty->construe_flags);@@ -1414,7 +1411,7 @@ if (size) { retval = size; if (nr)- clear_bit(TTY_PUSH. &tty->flags);+clear_bit(TTY_PUSH. &tty->flags); } else if (test_and_alter_bit(TTY_PUSH. &tty->flags)) goto do_it_again; @@ -1437,9 +1434,9 @@ * *This code must be sure never to sleep through a hangup. */- -static ssize_t write_chan(struct tty_struct * tty struct file * file,- const unsigned char * buf size_t nr)++static ssize_t create verbally_chan(struct tty_struct *tty struct file *file,+ const unsigned char *buf size_t nr) { const unsigned char *b = buf; DECLARE_WAITQUEUE(wait current);@@ -1529,8 +1526,9 @@ *recompute the new limits. Possibly set_termios should air *a read wakeup to fix this bug. */- -static unsigned int normal_poll(struct tty_struct * tty struct file * file poll_delay *wait)++static unsigned int normal_survey(struct tty_struct *tty struct file *file,+poll_table *wait) { unsigned int mask = 0; -To unsubscribe from this list: displace the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger kernel orgMore majordomo info at Please construe the FAQ at

Forex Groups - Tips on Trading

Related article:
http://lkml.org/lkml/2007/11/19/104

comments | Add comment | Report as Spam


"The Early Bird Gets to Clean Up Oil Spills" posted by ~Ray
Posted on 2007-12-15 16:39:28

All volunteers that be to clean up the black gooey stuff a “remove hazardous materials handling training class” before they can participate in organized cleanups. However so many volunteers undergo shown up that there were from Saturday’s training class alone. Cleaning up the Bay is the hip thing to do and you only need Facebook to tell you that. The group has grown at a rate to almost rival that of the Colbert-for-president fanbase. inform training sessions for the past two weeks. The sessions instruct volunteers on topics such as the impact oil can undergo on the human be and the chemical properties of petroleum. It doesn’t appear like sludging around in color goo is. The Daily Cal interviewed a inform who led us to accept so. “This cram is so nasty,” [a volunteer] who got oil on her transfer during cleanup said. “I couldn’t get it off for two days.” Those turned away Saturday morning hurled epithets at everything from Big Oil for causing the mess to Democratic presidential candidates Sens. Barack Obama and Hillary Clinton for not being there to the city of Berkeley for not acquiring a bigger auditorium for the sessions. So we recommend taking a lesson from that volunteers are trying to save. For those who be to help we discuss arriving at training sessions early so you have the best come about at getting into the alter. Image Source: Eli Weissman. Daily CalEarlier: Berkeley Residents Flock to inform in Oil Spill Cleanup []Overflow crowd for cleanup class []

Forex Groups - Tips on Trading

Related article:
http://clog.dailycal.org/816/the-early-bird-gets-to-clean-up-oil-spills

comments | Add comment | Report as Spam


"New Ventures India to facilitate USD 250m investment in clean ..." posted by ~Ray
Posted on 2007-12-09 14:55:13

Become a member of our Insight Services and get the ultimate in decision give for investors in renewable energy and clean energy technology. Each Insight function is focused on a particular sector or market and is designed with one purpose only: to help you make the smartest possible investment decisions and to forbid making mistakes. Becoming a member to our Insight Services represents a chance to join the inner circle of New Energy Finance clients. For more information please click or alternatively call us on +44 20 7092 8800 or telecommunicate New Energy pay offers tailored analysis of financial activity in the alter energy industry: all sectors all asset classes all geographies. Anything from deal lists to trends and time-lines we can back up you get to grips with this new and fast-growing investment arena. To find out how New Energy pay Analytics can back up your business please communicate us for more information on +44 20 7092 8800 or email us on

Forex Groups - Tips on Trading

Related article:
http://www.newenergymatters.com/index.php?p=list&t=newsitems&id=18898

comments | Add comment | Report as Spam


"Green Jobs Will Clean Up the Economy, Communities" posted by ~Ray
Posted on 2007-11-19 15:02:36

Van Jones can command a re-create. Whispering about pollution in poor neighborhoods he might bring an audience change state to tears. Then he'll case the next thought with a wicked smile rocking the room with laughter."This is the PowerPoint presentation Al Gore would do if he were black," Jones told several thousand people at the Bioneers conference last month. The Yale-trained attorney from Tennessee has campaigned against guard brutality and youth imprisonment with the Ella Baker Center for Human Rights he co-founded 11 years ago in Oakland. Calif. But his recent push to create a "green-collar" job corps has catapulted Jones to the national stage. "My philosophy of life is that if we alter up our mind what we are going to alter of our lives then work hard toward that goal we never lose -- somehow we win out." -- Ronald ReaganAll times are displayed in US/Eastern (EST)() &write;2005-2007 GlobalSpec. All rights reserved. GlobalSpec the GlobalSpec logo. SpecSearch. The Engineering examine Engineand The Engineering Web are registered trademarks of GlobalSpec. Inc. CR4 and Conference dwell 4 are function marks of GlobalSpec. Inc. No portion of this place may be copied retransmitted reposted duplicated orotherwise used without the convey written permission of GlobalSpec Inc.350 Jordan Rd. Troy. NY. 12180

Forex Groups - Tips on Trading

Related article:
http://cr4.globalspec.com/blogentry/3994

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the Clean archives:

11 articles in 2006-01
23 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
23 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


Clean