printf: Remove unused 'bprintf'
[drm/drm-misc.git] / fs / cachefiles / error_inject.c
blob1715d5ca2b2d2470750bf5ecd50f113187693c5b
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Error injection handling.
4 * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 */
8 #include <linux/sysctl.h>
9 #include "internal.h"
11 unsigned int cachefiles_error_injection_state;
13 static struct ctl_table_header *cachefiles_sysctl;
14 static struct ctl_table cachefiles_sysctls[] = {
16 .procname = "error_injection",
17 .data = &cachefiles_error_injection_state,
18 .maxlen = sizeof(unsigned int),
19 .mode = 0644,
20 .proc_handler = proc_douintvec,
24 int __init cachefiles_register_error_injection(void)
26 cachefiles_sysctl = register_sysctl("cachefiles", cachefiles_sysctls);
27 if (!cachefiles_sysctl)
28 return -ENOMEM;
29 return 0;
33 void cachefiles_unregister_error_injection(void)
35 unregister_sysctl_table(cachefiles_sysctl);