summaryrefslogtreecommitdiffstats
path: root/otautil/include/otautil/sysutil.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-07-18 00:14:50 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-07-18 00:14:50 +0200
commit6e46cff9b27df699a1f78442606cbd09aed53461 (patch)
tree5bf35c6deefe6bcaeca33b371719f570a0b1147d /otautil/include/otautil/sysutil.h
parentMerge "applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache()." am: 624b6b6cd5 am: 603b7ed470 (diff)
parentMerge "Fix the arguments passed to getopt_long(3)." am: 29932e7bcc (diff)
downloadandroid_bootable_recovery-6e46cff9b27df699a1f78442606cbd09aed53461.tar
android_bootable_recovery-6e46cff9b27df699a1f78442606cbd09aed53461.tar.gz
android_bootable_recovery-6e46cff9b27df699a1f78442606cbd09aed53461.tar.bz2
android_bootable_recovery-6e46cff9b27df699a1f78442606cbd09aed53461.tar.lz
android_bootable_recovery-6e46cff9b27df699a1f78442606cbd09aed53461.tar.xz
android_bootable_recovery-6e46cff9b27df699a1f78442606cbd09aed53461.tar.zst
android_bootable_recovery-6e46cff9b27df699a1f78442606cbd09aed53461.zip
Diffstat (limited to 'otautil/include/otautil/sysutil.h')
-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