Add fastboot_test.cpp and test --os-version/--os-patch-level parsing.
Also switch all remaining headers over to #pragma once, and actually
use FB_COMMAND_SZ.
Bug: http://b/77340848
Test: ran tests
Change-Id: I27107d054c206e66c39208099e36a55df604e08f
diff --git a/fastboot/fastboot.h b/fastboot/fastboot.h
index 3d5a261..2935eb5 100644
--- a/fastboot/fastboot.h
+++ b/fastboot/fastboot.h
@@ -26,14 +26,15 @@
* SUCH DAMAGE.
*/
-#ifndef _FASTBOOT_H_
-#define _FASTBOOT_H_
+#pragma once
#include <inttypes.h>
#include <stdlib.h>
#include <string>
+#include <bootimg.h>
+
class Transport;
struct sparse_file;
@@ -99,6 +100,7 @@
class FastBoot {
public:
int Main(int argc, char* argv[]);
-};
-#endif
+ void ParseOsPatchLevel(boot_img_hdr_v1*, const char*);
+ void ParseOsVersion(boot_img_hdr_v1*, const char*);
+};