File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public class RFKillDevice {
2828 event. idx = idx;
2929 event. op = RFKillOperation . CHANGE ;
3030 event. soft = value ? 1 : 0 ;
31- if (Posix . write (manager. fd, &event, 8 ) != 8 )
31+ if (Posix . write (manager. fd, &event, sizeof ( RFKillEvent )) != sizeof ( RFKillEvent ) )
3232 return ;
3333 }
3434 }
@@ -139,7 +139,7 @@ public class RFKillManager : Object {
139139 event. type = type;
140140 event. op = RFKillOperation . CHANGE_ALL ;
141141 event. soft = lock_enabled ? 1 : 0 ;
142- if (Posix . write (fd, &event, 8 ) != 8 )
142+ if (Posix . write (fd, &event, sizeof ( RFKillEvent )) != sizeof ( RFKillEvent ) )
143143 return ;
144144 }
145145
@@ -148,7 +148,7 @@ public class RFKillManager : Object {
148148
149149 private bool read_event () {
150150 var event = RFKillEvent ();
151- if (Posix . read (fd, &event, 8 ) != 8 )
151+ if (Posix . read (fd, &event, sizeof ( RFKillEvent )) != sizeof ( RFKillEvent ) )
152152 return false ;
153153
154154 switch (event. op) {
You can’t perform that action at this time.
0 commit comments