summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2011-08-23 19:09:17 +0200
committerTormod Volden <debian.tormod@gmail.com>2011-10-03 21:23:55 +0200
commit80c08767404705250467f378931fe8bf35a11c2d (patch)
treeefab8465ff66fd5dbcebb28c3cb66515f81576f9
parent4176e3ca0dd1c22c1cf4b15ea14d975e5a97e2f6 (diff)
Warn if run without superuser rights
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
-rw-r--r--radeontool.c2
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();