Changeset 54084 in vbox
- Timestamp:
- Feb 5, 2015 1:59:30 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Additions/x11/vboxvideo/getmode.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/getmode.c
r54054 r54084 496 496 { 497 497 #define BITS_PER_BLOCK (sizeof(unsigned long) * 8) 498 char pszFile[64] = "/dev/input/";499 char pszDevice[64] = "";498 char szFile[64] = "/dev/input/"; 499 char szDevice[64] = ""; 500 500 unsigned long afKeys[KEY_MAX / BITS_PER_BLOCK]; 501 501 502 strncat( pszFile, pDirent->d_name, sizeof(pszFile));502 strncat(szFile, pDirent->d_name, sizeof(szFile) - sizeof("/dev/input/")); 503 503 if (fd != -1) 504 504 close(fd); 505 fd = open( pszFile, O_RDONLY | O_NONBLOCK);505 fd = open(szFile, O_RDONLY | O_NONBLOCK); 506 506 if ( fd == -1 507 || ioctl(fd, EVIOCGNAME(sizeof( pszDevice)), pszDevice) == -1508 || strcmp( pszDevice, "Video Bus") != 0)507 || ioctl(fd, EVIOCGNAME(sizeof(szDevice)), szDevice) == -1 508 || strcmp(szDevice, "Video Bus") != 0) 509 509 continue; 510 510 if ( ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(afKeys)), afKeys) == -1
Note:
See TracChangeset
for help on using the changeset viewer.

