X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/79eef90baacbd6692aa761605b83ede7bfa9fa9f..592601b3341e6b7dc44530282cb311c323ec6566:/htools/Ganeti/HTools/CLI.hs diff --git a/htools/Ganeti/HTools/CLI.hs b/htools/Ganeti/HTools/CLI.hs index 308fe6d..a3b9a0c 100644 --- a/htools/Ganeti/HTools/CLI.hs +++ b/htools/Ganeti/HTools/CLI.hs @@ -567,12 +567,17 @@ maybeShowWarnings fix_msgs = hPutStrLn stderr . unlines . map (printf " - %s") $ fix_msgs -- | Format a list of key, value as a shell fragment. -printKeys :: String -> [(String, String)] -> IO () +printKeys :: String -- ^ Prefix to printed variables + -> [(String, String)] -- ^ List of (key, value) pairs to be printed + -> IO () printKeys prefix = mapM_ (\(k, v) -> printf "%s_%s=%s\n" prefix (map toUpper k) (ensureQuoted v)) -- | Prints the final @OK@ marker in machine readable output. -printFinal :: String -> Bool -> IO () +printFinal :: String -- ^ Prefix to printed variable + -> Bool -- ^ Whether output should be machine readable + -- Note: if not, there is nothing to print + -> IO () printFinal prefix True = -- this should be the final entry printKeys prefix [("OK", "1")]