Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114867
b: refs/heads/master
c: c38182a
h: refs/heads/master
i:
  114865: e57cc4c
  114863: 62bd152
v: v3
  • Loading branch information
Marcin Slusarz authored and Linus Torvalds committed Oct 16, 2008
1 parent 8732e5a commit 8aaf980
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 1a3b09dc9aeaaab25ff736c2443df423a8fb655e
refs/heads/master: c38182a713df5268d8a4a33819a77f93b950f84c
27 changes: 15 additions & 12 deletions trunk/drivers/video/console/vgacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,23 +292,26 @@ static int vgacon_scrolldelta(struct vc_data *c, int lines)
d = (void *) c->vc_origin;
s = (void *) c->vc_screenbuf;

while (count--) {
scr_memcpyw(d, vgacon_scrollback + soff, c->vc_size_row);
d += c->vc_size_row;
soff += c->vc_size_row;

if (soff >= vgacon_scrollback_size)
soff = 0;
if (count) {
int copysize;
count *= c->vc_size_row;
/* how much memory to end of buffer left? */
copysize = min(count, vgacon_scrollback_size - soff);
scr_memcpyw(d, vgacon_scrollback + soff, copysize);
d += copysize;
count -= copysize;

if (count) {
scr_memcpyw(d, vgacon_scrollback, count);
d += count;
}
}

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

return 1;
Expand Down

0 comments on commit 8aaf980

Please sign in to comment.