|
Lines 768-773
Link Here
|
| 768 |
* [this is to be used together with some user program |
768 |
* [this is to be used together with some user program |
| 769 |
* like resize that changes the hardware videomode] |
769 |
* like resize that changes the hardware videomode] |
| 770 |
*/ |
770 |
*/ |
|
|
771 |
#define VC_RESIZE_MAXCOL (32767) |
| 772 |
#define VC_RESIZE_MAXROW (32767) |
| 771 |
int vc_resize(int currcons, unsigned int cols, unsigned int lines) |
773 |
int vc_resize(int currcons, unsigned int cols, unsigned int lines) |
| 772 |
{ |
774 |
{ |
| 773 |
unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0; |
775 |
unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0; |
|
Lines 780-785
Link Here
|
| 780 |
if (!vc_cons_allocated(currcons)) |
782 |
if (!vc_cons_allocated(currcons)) |
| 781 |
return -ENXIO; |
783 |
return -ENXIO; |
| 782 |
|
784 |
|
|
|
785 |
if (cols > VC_RESIZE_MAXCOL || lines > VC_RESIZE_MAXROW) |
| 786 |
return -EINVAL; |
| 787 |
|
| 783 |
new_cols = (cols ? cols : video_num_columns); |
788 |
new_cols = (cols ? cols : video_num_columns); |
| 784 |
new_rows = (lines ? lines : video_num_lines); |
789 |
new_rows = (lines ? lines : video_num_lines); |
| 785 |
new_row_size = new_cols << 1; |
790 |
new_row_size = new_cols << 1; |