diff --git a/clone.go b/clone.go index 7e962b2..da9da68 100644 --- a/clone.go +++ b/clone.go @@ -10,6 +10,7 @@ package main */ import ( + "fmt" "io" "os" ) @@ -31,7 +32,7 @@ func clone(cloneBs int, cloneSource string, cloneTarget string) { } defer fTarget.Close() errorHandler(err) - //todo progress indicator + progress := cloneBs for { n, err := fSource.Read(p) if err == io.EOF { @@ -42,6 +43,9 @@ func clone(cloneBs int, cloneSource string, cloneTarget string) { errorHandler(err) _, err = fTarget.Write(p[:n]) errorHandler(err) + fmt.Println(progress/1048576, "MB written...") + progress += cloneBs } + fmt.Println("Performing sync operations...") fTarget.Sync() } diff --git a/wipe.go b/wipe.go index df045db..2ed4f33 100644 --- a/wipe.go +++ b/wipe.go @@ -70,6 +70,7 @@ func writeToDisk(wipeDisk string, blocksize int, writeType string) { } _, err = fTarget.Write(block[:n]) } + fmt.Println("Performing sync operations...") fTarget.Sync() }