From 1bd132881440a294a2b2d8e41688f6f6df968b39 Mon Sep 17 00:00:00 2001 From: Ben Hamlin Date: Fri, 5 Jul 2019 01:57:48 -0500 Subject: [PATCH] Update usage example --- README.md | 6 +++--- src/System/Linux/RTNetlink.hs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f6946a3..5477292 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,10 @@ import Control.Monad (when) main :: IO () main = runRTNL $ do let mybridge = LinkName "mybridge" - create (Bridge mybridge) + create (Bridge, mybridge) change mybridge Up - state <- dump mybridge - when (head state == Up) $ + state <- dump' mybridge + when (state == Up) $ liftIO (putStrLn "I did it, mom!") destroy mybridge ``` diff --git a/src/System/Linux/RTNetlink.hs b/src/System/Linux/RTNetlink.hs index 642ab43..2deb11d 100644 --- a/src/System/Linux/RTNetlink.hs +++ b/src/System/Linux/RTNetlink.hs @@ -39,10 +39,10 @@ functions to make this easier. > main :: IO () > main = runRTNL $ do > let mybridge = LinkName "mybridge" -> create (Bridge mybridge) +> create (Bridge, mybridge) > change mybridge Up -> state <- dump mybridge -> when (head state == Up) $ +> state <- dump' mybridge +> when (state == Up) $ > liftIO (putStrLn "I did it, mom!") > destroy mybridge -}