blob: 5fbe9a44e1e1be4cfad1de14e4a1344d3f04f546 [file] [log] [blame]
// Copyright 2018 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.
library ddk.protocol.bad_block;
using zx;
[Layout="ddk-protocol"]
interface BadBlock {
/// Fills in |bad_blocks| with a list of bad blocks, up until
/// |bad_blocks_count|. The order of blocks is undefined.
/// |bad_blocks_actual| will be filled in with the actual number of bad
/// blocks. It is recommended to first make call with |bad_blocks_count|
/// equal to 0 in order to determine how large the |bad_blocks| is.
1: GetBadBlockList() -> (zx.status s, vector<uint32> bad_blocks);
/// Sets |block| as bad. If block is already marked bad, it has no effect.
2: MarkBlockBad(uint32 block) -> (zx.status s);
};