Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114868
b: refs/heads/master
c: 5ab4840
h: refs/heads/master
v: v3
  • Loading branch information
Marcin Slusarz authored and Linus Torvalds committed Oct 16, 2008
1 parent 8aaf980 commit 70af567
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 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: c38182a713df5268d8a4a33819a77f93b950f84c
refs/heads/master: 5ab4840968cd094586f65fce978e35c66d25ac78
20 changes: 8 additions & 12 deletions trunk/drivers/video/console/vgacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ static void vgacon_restore_screen(struct vc_data *c)

static int vgacon_scrolldelta(struct vc_data *c, int lines)
{
int start, end, count, soff, diff;
void *d, *s;
int start, end, count, soff;

if (!lines) {
c->vc_visible_origin = c->vc_origin;
Expand Down Expand Up @@ -287,13 +286,13 @@ static int vgacon_scrolldelta(struct vc_data *c, int lines)
if (count > c->vc_rows)
count = c->vc_rows;

diff = c->vc_rows - count;

d = (void *) c->vc_origin;
s = (void *) c->vc_screenbuf;

if (count) {
int copysize;

int diff = c->vc_rows - count;
void *d = (void *) c->vc_origin;
void *s = (void *) c->vc_screenbuf;

count *= c->vc_size_row;
/* how much memory to end of buffer left? */
copysize = min(count, vgacon_scrollback_size - soff);
Expand All @@ -305,14 +304,11 @@ static int vgacon_scrolldelta(struct vc_data *c, int lines)
scr_memcpyw(d, vgacon_scrollback, count);
d += count;
}
}

if (diff == c->vc_rows) {
vgacon_cursor(c, CM_MOVE);
} else {
if (diff)
scr_memcpyw(d, s, diff * c->vc_size_row);
}
} else
vgacon_cursor(c, CM_MOVE);

return 1;
}
Expand Down

0 comments on commit 70af567

Please sign in to comment.