Revision 8cd36391 htools/Ganeti/HTools/CLI.hs

b/htools/Ganeti/HTools/CLI.hs
35 35
    , defaultLuxiSocket
36 36
    , maybePrintNodes
37 37
    , maybePrintInsts
38
    , maybeShowWarnings
38 39
    -- * The options
39 40
    , oDataFile
40 41
    , oDiskMoves
......
490 491
    hPutStrLn stderr ""
491 492
    hPutStrLn stderr $ msg ++ " instance map:"
492 493
    hPutStr stderr instdata
494

  
495
-- | Function to display warning messages from parsing the cluster
496
-- state.
497
maybeShowWarnings :: [String] -- ^ The warning messages
498
                  -> IO ()
499
maybeShowWarnings fix_msgs =
500
  unless (null fix_msgs) $ do
501
    hPutStrLn stderr "Warning: cluster has inconsistent data:"
502
    hPutStrLn stderr . unlines . map (printf "  - %s") $ fix_msgs

Also available in: Unified diff