summaryrefslogtreecommitdiffstats
path: root/otautil/include
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-07-17 07:09:59 +0200
committerTao Bao <tbao@google.com>2018-07-17 21:16:53 +0200
commit1700cc46b5531499b7b532cda05d442f5f60acd4 (patch)
treefa668d92873b1f1d1df22bb992610ea53a69ed49 /otautil/include
parentMerge "applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache()." (diff)
downloadandroid_bootable_recovery-1700cc46b5531499b7b532cda05d442f5f60acd4.tar
android_bootable_recovery-1700cc46b5531499b7b532cda05d442f5f60acd4.tar.gz
android_bootable_recovery-1700cc46b5531499b7b532cda05d442f5f60acd4.tar.bz2
android_bootable_recovery-1700cc46b5531499b7b532cda05d442f5f60acd4.tar.lz
android_bootable_recovery-1700cc46b5531499b7b532cda05d442f5f60acd4.tar.xz
android_bootable_recovery-1700cc46b5531499b7b532cda05d442f5f60acd4.tar.zst
android_bootable_recovery-1700cc46b5531499b7b532cda05d442f5f60acd4.zip
Diffstat (limited to 'otautil/include')
-rw-r--r--otautil/include/otautil/sysutil.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/otautil/include/otautil/sysutil.h b/otautil/include/otautil/sysutil.h
index 649f8ffae..2eeb7c302 100644
--- a/otautil/include/otautil/sysutil.h
+++ b/otautil/include/otautil/sysutil.h
@@ -54,4 +54,9 @@ class MemMapping {
// command should start with "reboot," (e.g. "reboot,bootloader" or "reboot,").
bool reboot(const std::string& command);
+// Returns a null-terminated char* array, where the elements point to the C-strings in the given
+// vector, plus an additional nullptr at the end. This is a helper function that facilitates
+// calling C functions (such as getopt(3)) that expect an array of C-strings.
+std::vector<char*> StringVectorToNullTerminatedArray(const std::vector<std::string>& args);
+
#endif // _OTAUTIL_SYSUTIL