diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2010-03-29 20:12:44 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2010-03-29 20:12:44 +0000 |
| commit | f46f4ae113aa2d0e1d30d909ef4dceedcdb11b7b (patch) | |
| tree | 3badc0a9d9b513ab041c53d2352a3f8943a099fc /usr.sbin/vidcontrol | |
| parent | 34a78aafcbe7dc3394add3c6d947e958b673b12d (diff) | |
Notes
Diffstat (limited to 'usr.sbin/vidcontrol')
| -rw-r--r-- | usr.sbin/vidcontrol/vidcontrol.c | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 06afe53e019e..48580f16f11a 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -950,10 +950,11 @@ show_adapter_info(void) static void show_mode_info(void) { - struct video_info _info; char buf[80]; - int mode; + struct video_info _info; int c; + int mm; + int mode; printf(" mode# flags type size " "font window linear buffer\n"); @@ -972,9 +973,35 @@ show_mode_info(void) if (_info.vi_flags & V_INFO_GRAPHICS) { c = 'G'; - snprintf(buf, sizeof(buf), "%dx%dx%d %d", - _info.vi_width, _info.vi_height, - _info.vi_depth, _info.vi_planes); + if (_info.vi_mem_model == V_INFO_MM_PLANAR) + snprintf(buf, sizeof(buf), "%dx%dx%d %d", + _info.vi_width, _info.vi_height, + _info.vi_depth, _info.vi_planes); + else { + switch (_info.vi_mem_model) { + case V_INFO_MM_PACKED: + mm = 'P'; + break; + case V_INFO_MM_DIRECT: + mm = 'D'; + break; + case V_INFO_MM_CGA: + mm = 'C'; + break; + case V_INFO_MM_HGC: + mm = 'H'; + break; + case V_INFO_MM_VGAX: + mm = 'V'; + break; + default: + mm = ' '; + break; + } + snprintf(buf, sizeof(buf), "%dx%dx%d %c", + _info.vi_width, _info.vi_height, + _info.vi_depth, mm); + } } else { c = 'T'; |
