posix file: Add procedure to query the size of a file
Change-Id: Ib3b31e90ca98dc09185463ce467a70770e0f222d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21095
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-file.ads b/common/hw-file.ads
index 9dbfcf7..bc2242c 100644
--- a/common/hw-file.ads
+++ b/common/hw-file.ads
@@ -39,4 +39,8 @@
Pre => (Readable or Writable) and
(if Map_Copy then Readable and not Writable);
+ -- Sets `Length` to the size of the file given by `Path` or 0 if an
+ -- error occurs.
+ procedure Size (Length : out Natural; Path : String);
+
end HW.File;