blob: 834b170ab6eb8a0210589d7c02a67b16862fef2b [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_STORAGE_EXTRACTOR_BIN_PARSE_H_
#define SRC_STORAGE_EXTRACTOR_BIN_PARSE_H_
#include <lib/zx/status.h>
#include <optional>
#include <string>
#include <fbl/unique_fd.h>
namespace extractor {
enum class DiskType {
kMinfs,
};
struct ExtractOptions {
// Disk/input path from where disk will be extracted.
std::string input_path;
fbl::unique_fd input_fd;
// Image/output path where extracted image will be written.
std::string output_path;
fbl::unique_fd output_fd;
std::optional<DiskType> type = std::nullopt;
// If true, dumps pii along with metadata.
bool dump_pii = false;
};
zx::status<ExtractOptions> ParseCommandLineArguments(int argc, char* const argv[]);
} // namespace extractor
#endif // SRC_STORAGE_EXTRACTOR_BIN_PARSE_H_