Revision 21839f47 htools/Ganeti/HTools/Program/Hspace.hs
b/htools/Ganeti/HTools/Program/Hspace.hs | ||
---|---|---|
23 | 23 |
|
24 | 24 |
-} |
25 | 25 |
|
26 |
module Ganeti.HTools.Program.Hspace (main) where |
|
26 |
module Ganeti.HTools.Program.Hspace (main, options) where
|
|
27 | 27 |
|
28 | 28 |
import Control.Monad |
29 | 29 |
import Data.Char (toUpper, isAlphaNum, toLower) |
... | ... | |
33 | 33 |
import Data.Ord (comparing) |
34 | 34 |
import System.Exit |
35 | 35 |
import System.IO |
36 |
import System.Environment (getArgs) |
|
37 | 36 |
|
38 | 37 |
import Text.Printf (printf, hPrintf) |
39 | 38 |
|
... | ... | |
392 | 391 |
(rspecCpu spx) Running [] True (-1) (-1) disk_template |
393 | 392 |
|
394 | 393 |
-- | Main function. |
395 |
main :: IO () |
|
396 |
main = do |
|
397 |
cmd_args <- getArgs |
|
398 |
(opts, args) <- parseOpts cmd_args "hspace" options |
|
399 |
|
|
394 |
main :: Options -> [String] -> IO () |
|
395 |
main opts args = do |
|
400 | 396 |
unless (null args) $ do |
401 | 397 |
hPutStrLn stderr "Error: this program doesn't take any arguments." |
402 | 398 |
exitWith $ ExitFailure 1 |
Also available in: Unified diff