Refactor findsize into util away from erase

At first the size was only needed for erase, now it is needed for the
drives interface. The code needed to be refactored to make drive
interface implementation possible.

Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I0a23ee23a0de3fd89a9e776b4854e8da9a8ff2e4
diff --git a/include/pattern.hpp b/include/pattern.hpp
index 69301e7..4def784 100644
--- a/include/pattern.hpp
+++ b/include/pattern.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include "erase.hpp"
+#include "util.hpp"
 
 #include <stdplus/fd/create.hpp>
 #include <stdplus/fd/managed.hpp>
@@ -27,6 +28,11 @@
      *
      *  @param[in] bytes - Size of the block device
      */
+    void writePattern()
+    {
+        writePattern(util::Util::findSizeOfBlockDevice(devPath));
+    }
+
     void writePattern(uint64_t driveSize);
 
     /** @brief verifies the uncompressible random pattern is on the drive
@@ -34,6 +40,11 @@
      *
      *  @param[in] bytes - Size of the block device
      */
+
+    void verifyPattern()
+    {
+        verifyPattern(util::Util::findSizeOfBlockDevice(devPath));
+    }
     void verifyPattern(uint64_t driveSize);
 };