1 // Copyright 2018 The Fuchsia Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "util.h" 6 7 #include <zircon/process.h> 8 #include <zircon/processargs.h> 9 10 namespace bootsvc { 11 12 const char* const kLastPanicFilePath = "log/last-panic.txt"; 13 RetrieveBootdata()14fbl::Vector<zx::vmo> RetrieveBootdata() { 15 fbl::Vector<zx::vmo> vmos; 16 zx::vmo vmo; 17 for (unsigned n = 0; 18 vmo.reset(zx_take_startup_handle(PA_HND(PA_VMO_BOOTDATA, n))), vmo.is_valid(); 19 n++) { 20 vmos.push_back(std::move(vmo)); 21 } 22 return vmos; 23 } 24 25 } // namespace bootsvc 26