Revision ef947a42 src/Ganeti/HTools/Program/Hscan.hs

b/src/Ganeti/HTools/Program/Hscan.hs
34 34
import System.Exit
35 35
import System.IO
36 36
import System.FilePath
37
import System.Time
37 38

  
38 39
import Text.Printf (printf)
39 40

  
......
89 90
fixSlash = map (\x -> if x == '/' then '_' else x)
90 91

  
91 92
-- | Generates serialized data from loader input.
92
processData :: ClusterData -> Result ClusterData
93
processData input_data = do
94
  cdata@(ClusterData _ nl il _ _) <- mergeData [] [] [] [] input_data
93
processData :: ClockTime -> ClusterData -> Result ClusterData
94
processData now input_data = do
95
  cdata@(ClusterData _ nl il _ _) <- mergeData [] [] [] [] now input_data
95 96
  let (_, fix_nl) = checkData nl il
96 97
  return cdata { cdNodes = fix_nl }
97 98

  
......
106 107
  return False
107 108

  
108 109
writeData nlen name opts (Ok cdata) = do
109
  let fixdata = processData cdata
110
  now <- getClockTime
111
  let fixdata = processData now cdata
110 112
  case fixdata of
111 113
    Bad err -> printf "\nError for %s: failed to process data. Details:\n%s\n"
112 114
               name err >> return False

Also available in: Unified diff