vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / accelerants / via / GetDeviceInfo.c
blob817c515d7926c8d5fbf608d9ef25ee9b793c304c
1 /*
2 Author:
3 Rudolf Cornelissen 7/2004-1/2016
4 */
6 #define MODULE_BIT 0x04000000
8 #include "acc_std.h"
10 /* Get some info about the device */
11 status_t GET_ACCELERANT_DEVICE_INFO(accelerant_device_info * adi)
13 LOG(4,("GET_ACCELERANT_DEVICE_INFO: returning info\n"));
15 /* no info on version is provided, so presumably this is for my info */
16 adi->version = 1;
18 sprintf(adi->name, "VIA chipset");
19 switch (si->ps.card_type)
21 case VT3022:
22 sprintf(adi->chipset, "CLE266 Unichrome Pro (VT3022)");
23 break;
24 case VT3108:
25 sprintf(adi->chipset, "K8M800 Unichrome Pro (VT3108)");
26 break;
27 case VT3122:
28 sprintf(adi->chipset, "CLE266 Unichrome Pro (VT3122)");
29 break;
30 case VT3205:
31 sprintf(adi->chipset, "KM400 Unichrome (VT3205)");
32 break;
33 case VT7205:
34 sprintf(adi->chipset, "KM400 Unichrome (VT7205)");
35 break;
36 default:
37 sprintf(adi->chipset, "unknown");
38 break;
40 sprintf(adi->serial_no, "unknown");
41 adi->memory = si->ps.memory_size;
42 adi->dac_speed = si->ps.max_dac1_clock;
44 return B_OK;