[PATCH radeontool 2/5] Warn if run without superuser rights
Tormod Volden
lists.tormod at gmail.com
Fri Dec 2 13:32:03 PST 2011
From: Tormod Volden <debian.tormod at gmail.com>
Signed-off-by: Tormod Volden <debian.tormod at gmail.com>
---
radeontool.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/radeontool.c b/radeontool.c
index de742d1..cb7f051 100644
--- a/radeontool.c
+++ b/radeontool.c
@@ -2951,6 +2951,8 @@ void radeon_rom_tables(const char * file)
int main(int argc,char *argv[])
{
+ if (geteuid() != 0)
+ fprintf(stderr, "Warning: Need root privileges to access hardware\n");
if(argc == 1) {
map_radeon_cntl_mem();
usage();
--
1.7.5.4
More information about the xorg-driver-ati
mailing list