mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix a compiler warning and add couple of VM map types.
This commit is contained in:
parent
c93d567412
commit
6ac96a7e7e
1 changed files with 21 additions and 3 deletions
|
|
@ -177,7 +177,15 @@ static int drm_vm_info DRM_SYSCTL_HANDLER_ARGS
|
|||
{
|
||||
struct drm_device *dev = arg1;
|
||||
drm_local_map_t *map, *tempmaps;
|
||||
const char *types[] = { "FB", "REG", "SHM", "AGP", "SG" };
|
||||
const char *types[] = {
|
||||
[_DRM_FRAME_BUFFER] = "FB",
|
||||
[_DRM_REGISTERS] = "REG",
|
||||
[_DRM_SHM] = "SHM",
|
||||
[_DRM_AGP] = "AGP",
|
||||
[_DRM_SCATTER_GATHER] = "SG",
|
||||
[_DRM_CONSISTENT] = "CONS",
|
||||
[_DRM_GEM] = "GEM"
|
||||
};
|
||||
const char *type, *yesno;
|
||||
int i, mapcount;
|
||||
char buf[128];
|
||||
|
|
@ -211,10 +219,20 @@ static int drm_vm_info DRM_SYSCTL_HANDLER_ARGS
|
|||
for (i = 0; i < mapcount; i++) {
|
||||
map = &tempmaps[i];
|
||||
|
||||
if (map->type < 0 || map->type > 4)
|
||||
switch(map->type) {
|
||||
default:
|
||||
type = "??";
|
||||
else
|
||||
break;
|
||||
case _DRM_FRAME_BUFFER:
|
||||
case _DRM_REGISTERS:
|
||||
case _DRM_SHM:
|
||||
case _DRM_AGP:
|
||||
case _DRM_SCATTER_GATHER:
|
||||
case _DRM_CONSISTENT:
|
||||
case _DRM_GEM:
|
||||
type = types[map->type];
|
||||
break;
|
||||
}
|
||||
|
||||
if (!map->mtrr)
|
||||
yesno = "no";
|
||||
|
|
|
|||
Loading…
Reference in a new issue