dehardcode device path
This commit is contained in:
parent
216b9c0d64
commit
2e1c6a11c0
4
main.c
4
main.c
|
|
@ -83,10 +83,10 @@ int drm_open_device(char* fileName)
|
|||
int main(int argc, char** argv)
|
||||
{
|
||||
if(argc < 2) {
|
||||
printf("Usage: %s [DEVICE]\n", argv[0]);
|
||||
printf("Usage: %s [DEVICE]\n[DEVICE] is sysfs path to a drm device like /dev/dri/card0", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
int device = drm_open_device("/dev/dri/card2");
|
||||
int device = drm_open_device(argv[1]);
|
||||
if(device < 0)
|
||||
return 2;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue