blob: 5f20df159638e19ed7aad2918591273beb396e5b [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_TOOLS_BLOBFS_CORRUPT_CORRUPT_BLOB_H_
#define SRC_STORAGE_TOOLS_BLOBFS_CORRUPT_CORRUPT_BLOB_H_
#include "src/storage/blobfs/common.h"
#include "src/storage/lib/block_client/cpp/block_device.h"
struct BlobCorruptOptions {
blobfs::Digest merkle;
};
// Corrupts the contents of the given blob within the given blobfs formatted block device. Returns
// success iff the image is in a clean state and the requested blob was corrupted.
zx_status_t CorruptBlob(std::unique_ptr<block_client::BlockDevice> device,
BlobCorruptOptions* options);
#endif // SRC_STORAGE_TOOLS_BLOBFS_CORRUPT_CORRUPT_BLOB_H_