blob: 61968526ac823be28dd3fd598ed923f3a463aa29 [file] [log] [blame] [edit]
// 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_DEVICES_BLOCK_DRIVERS_BLOCK_VERITY_CONFIG_H_
#define SRC_DEVICES_BLOCK_DRIVERS_BLOCK_VERITY_CONFIG_H_
#include <fuchsia/hardware/block/verified/llcpp/fidl.h>
#include <zircon/device/block.h>
#include <zircon/errors.h>
namespace block_verity {
// Checks that `config` specifies both a root hash and a block size, and that
// the block size matches the one observed in `blk`. Returns ZX_OK on success,
// ZX_ERR_INVALID_ARGS otherwise.
zx_status_t CheckConfig(const llcpp::fuchsia::hardware::block::verified::Config& config,
const block_info_t& blk);
} // namespace block_verity
#endif // SRC_DEVICES_BLOCK_DRIVERS_BLOCK_VERITY_CONFIG_H_