1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* Error injection handling. 3 * 4 * Copyright (C) 2021 Red Hat, Inc. All Rights 5 * Written by David Howells (dhowells@redhat.c 6 */ 7 8 #include <linux/sysctl.h> 9 #include "internal.h" 10 11 unsigned int cachefiles_error_injection_state; 12 13 static struct ctl_table_header *cachefiles_sys 14 static struct ctl_table cachefiles_sysctls[] = 15 { 16 .procname = "error_injec 17 .data = &cachefiles_ 18 .maxlen = sizeof(unsig 19 .mode = 0644, 20 .proc_handler = proc_douintv 21 }, 22 }; 23 24 int __init cachefiles_register_error_injection 25 { 26 cachefiles_sysctl = register_sysctl("c 27 if (!cachefiles_sysctl) 28 return -ENOMEM; 29 return 0; 30 31 } 32 33 void cachefiles_unregister_error_injection(voi 34 { 35 unregister_sysctl_table(cachefiles_sys 36 } 37
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.