Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304096
b: refs/heads/master
c: 5c5d5ca
h: refs/heads/master
v: v3
  • Loading branch information
Kay Sievers authored and Greg Kroah-Hartman committed May 10, 2012
1 parent e111b60 commit fb761d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f3a781d6fd81e397c3928c9af33f1fc63232db6
refs/heads/master: 5c5d5ca51abd728c8de3be43ffd6bb00f977bfcd
19 changes: 10 additions & 9 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,12 +1230,13 @@ asmlinkage int vprintk_emit(int facility, int level,
static size_t buflen;
static int buflevel;
static char textbuf[LOG_LINE_MAX];
static struct task_struct *cont;
char *text = textbuf;
size_t textlen;
unsigned long flags;
int this_cpu;
bool newline = false;
bool cont = false;
bool prefix = false;
int printed_len = 0;

boot_delay_msec();
Expand Down Expand Up @@ -1295,20 +1296,16 @@ asmlinkage int vprintk_emit(int facility, int level,
case '0' ... '7':
if (level == -1)
level = text[1] - '0';
text += 3;
textlen -= 3;
break;
case 'c': /* KERN_CONT */
cont = true;
case 'd': /* KERN_DEFAULT */
prefix = true;
case 'c': /* KERN_CONT */
text += 3;
textlen -= 3;
break;
}
}

if (buflen && (!cont || dict)) {
/* no continuation; flush existing buffer */
if (buflen && (prefix || dict || cont != current)) {
/* flush existing buffer */
log_store(facility, buflevel, NULL, 0, buf, buflen);
printed_len += buflen;
buflen = 0;
Expand Down Expand Up @@ -1342,6 +1339,10 @@ asmlinkage int vprintk_emit(int facility, int level,
dict, dictlen, text, textlen);
printed_len += textlen;
}
cont = NULL;
} else {
/* remember thread which filled the buffer */
cont = current;
}

/*
Expand Down

0 comments on commit fb761d0

Please sign in to comment.