Permalink
Browse files

rfkill: list should return a rfkill_event record

Match the doc and return the record rather than a tagged proplist.
  • Loading branch information...
1 parent 5fe8725 commit d4bb79f53bfc21f40a7ef565d729105e3b87a009 @msantos committed Apr 14, 2012
Showing with 2 additions and 15 deletions.
  1. +2 −15 src/rfkill.erl
View
@@ -83,21 +83,8 @@ list_1(FD) ->
{ok, Data} = procket:read(FD, 8),
case event(Data) of
- #rfkill_event{
- op = ?RFKILL_OP_ADD,
-
- idx = Idx,
- type = Type,
- soft = Soft,
- hard = Hard
- } ->
- {rfkill_event, [
- {idx, Idx},
- {type, Type},
- {op, ?RFKILL_OP_ADD},
- {soft, Soft},
- {hard, Hard}
- ]};
+ #rfkill_event{op = ?RFKILL_OP_ADD} = Event ->
+ Event;
{error, eagain} ->
timer:sleep(10),
list_1(FD);

0 comments on commit d4bb79f

Please sign in to comment.