From: Marcel Holtmann Date: Fri, 5 Jun 2009 10:31:10 +0000 (+0200) Subject: open device read-only for list and event operations X-Git-Tag: v2.31-rc1~98^2~13^2~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6980381c65cc758cb0d4bb472555735e041732e1;p=thirdparty%2Futil-linux.git open device read-only for list and event operations --- diff --git a/rfkill.c b/rfkill.c index c26d396cd3..a7f5f64b01 100644 --- a/rfkill.c +++ b/rfkill.c @@ -24,7 +24,7 @@ static void rfkill_event(void) ssize_t len; int fd, n; - fd = open("/dev/rfkill", O_RDWR); + fd = open("/dev/rfkill", O_RDONLY); if (fd < 0) { perror("Can't open RFKILL control device"); return; @@ -119,7 +119,7 @@ static void rfkill_list(void) ssize_t len; int fd; - fd = open("/dev/rfkill", O_RDWR); + fd = open("/dev/rfkill", O_RDONLY); if (fd < 0) { perror("Can't open RFKILL control device"); return;