projects
/
platform
/
upstream
/
libdrm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libkms: use drm_mmap/drm_munmap wrappers
[platform/upstream/libdrm.git]
/
tests
/
gem_flink.c
diff --git
a/tests/gem_flink.c
b/tests/gem_flink.c
index
8dc8832
..
ce43e42
100644
(file)
--- a/
tests/gem_flink.c
+++ b/
tests/gem_flink.c
@@
-117,10
+117,15
@@
int main(int argc, char **argv)
{
int fd;
{
int fd;
+ if (geteuid()) {
+ fprintf(stderr, "requires root privileges, skipping\n");
+ return 77;
+ }
+
fd = drm_open_matching("8086:*", 0);
if (fd < 0) {
fprintf(stderr, "failed to open intel drm device, skipping\n");
fd = drm_open_matching("8086:*", 0);
if (fd < 0) {
fprintf(stderr, "failed to open intel drm device, skipping\n");
- return
0
;
+ return
77
;
}
test_flink(fd);
}
test_flink(fd);