Initial commit; kernel source import

This commit is contained in:
Nathan
2025-04-06 23:50:55 -05:00
commit 25c6d769f4
45093 changed files with 18199410 additions and 0 deletions

45
drivers/md/dm-verity.h Normal file
View File

@@ -0,0 +1,45 @@
/*
* Copyright (C) 2010 The Chromium OS Authors <chromium-os-dev@chromium.org>
* All Rights Reserved.
*
* This file is released under the GPL.
*
* Provide error types for use when creating a custom error handler.
* See Documentation/device-mapper/dm-verity.txt
*/
#ifndef DM_VERITY_H
#define DM_VERITY_H
#include <linux/notifier.h>
struct dm_verity_error_state {
int code;
int transient; /* Likely to not happen after a reboot */
u64 block;
const char *message;
sector_t dev_start;
sector_t dev_len;
struct block_device *dev;
sector_t hash_dev_start;
sector_t hash_dev_len;
struct block_device *hash_dev;
/* Final behavior after all notifications are completed. */
int behavior;
};
/* This enum must be matched to allowed_error_behaviors in dm-verity.c */
enum dm_verity_error_behavior {
DM_VERITY_ERROR_BEHAVIOR_EIO = 0,
DM_VERITY_ERROR_BEHAVIOR_PANIC,
DM_VERITY_ERROR_BEHAVIOR_NONE,
DM_VERITY_ERROR_BEHAVIOR_NOTIFY
};
int dm_verity_register_error_notifier(struct notifier_block *nb);
int dm_verity_unregister_error_notifier(struct notifier_block *nb);
#endif /* DM_VERITY_H */