corecode's projects
/
nvidia.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
e44be6f
)
update to latest suser->priv_check changes
author
Simon Schubert <simon.schubert@epfl.ch>
Tue, 4 Aug 2009 16:12:39 +0000 (18:12 +0200)
committer
Simon Schubert <simon.schubert@epfl.ch>
Tue, 4 Aug 2009 16:12:39 +0000 (18:12 +0200)
src/nvidia_os.c
patch
|
blob
|
blame
|
history
diff --git
a/src/nvidia_os.c
b/src/nvidia_os.c
index
e262eea
..
84853cf
100644
(file)
--- a/
src/nvidia_os.c
+++ b/
src/nvidia_os.c
@@
-16,6
+16,9
@@
/* DragonFly compat */
#include <machine/pmap_inval.h>
+#if __DragonFly_version >= 200204
+#include <sys/priv.h>
+#endif
void
pmap_invalidate_range(struct pmap *pmap, vm_offset_t sva, vm_offset_t eva)
@@
-162,7
+165,11
@@
RM_STATUS NV_API_CALL os_get_current_time(
BOOL NV_API_CALL os_is_administrator(PHWINFO pDev)
{
+#if __DragonFly_version >= 200204
+ return priv_check(CURTHREAD, PRIV_ROOT) ? FALSE : TRUE;
+#else
return suser(CURTHREAD) ? FALSE : TRUE;
+#endif
}
U008 NV_API_CALL os_io_read_byte(