/* * kernel/configs.c * Echo the kernel .config file used to build the kernel * * Copyright (C) 2002 Khalid Aziz * Copyright (C) 2002 Randy Dunlap * Copyright (C) 2002 Al Stone * Copyright (C) 2002 Hewlett-Packard Company * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or * NON INFRINGEMENT. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include /**************************************************/ /* the actual current config file */ /* * Define kernel_config_data and kernel_config_data_size, which contains the * wrapped and compressed configuration file. The file is first compressed * with gzip and then bounded by two eight byte magic numbers to allow * extraction from a binary kernel image: * * IKCFG_ST * * IKCFG_ED */ #define MAGIC_START "IKCFG_ST" #define MAGIC_END "IKCFG_ED" #include "config_data.h" #define MAGIC_SIZE (sizeof(MAGIC_START) - 1) #define kernel_config_data_size \ (sizeof(kernel_config_data) - 1 - MAGIC_SIZE * 2) #ifdef CONFIG_IKCONFIG_PROC static ssize_t ikconfig_read_current(struct file *file, char __user *buf, size_t len, loff_t * offset) { return simple_read_from_buffer(buf, len, offset, kernel_config_data + MAGIC_SIZE, kernel_config_data_size); } static const struct file_operations ikconfig_file_ops = { .owner = THIS_MODULE, .read = ikconfig_read_current, .llseek = default_llseek, }; static int __init ikconfig_init(void) { struct proc_dir_entry *entry; /* create the current config file */ entry = proc_create("config.gz", S_IFREG | S_IRUGO, NULL, &ikconfig_file_ops); if (!entry) return -ENOMEM; proc_set_size(entry, kernel_config_data_size); return 0; } static void __exit ikconfig_cleanup(void) { remove_proc_entry("config.gz", NULL); } module_init(ikconfig_init); module_exit(ikconfig_cleanup); #endif /* CONFIG_IKCONFIG_PROC */ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Randy Dunlap"); MODULE_DESCRIPTION("Echo the kernel .config file used to build the kernel"); ge
4 +0200'>2023-11-30
AgeCommit message (Expand)AuthorFilesLines
2008-11-09clarify usage expectations for cnt32_to_63()Nicolas Pitre1-6/+16
2008-09-24MN10300: Move asm-arm/cnt32_to_63.h to include/linux/David Howells1-0/+80
wifi: ath10k: Update Qualcomm Innovation Center, Inc. copyrightsJeff Johnson1-0/+1
2022-01-11ath10k: fix memory overwrite of the WoWLAN wakeup packet patternWen Gong1-3/+4
2020-08-17ath10k: Use fallthrough pseudo-keywordGustavo A. R. Silva1-1/+1
2019-02-20ath10k: switch to use SPDX license identifiersKalle Valo1-12/+1
2019-02-12ath10k: fix documentation in ath10k_wow_convert_8023_to_80211()Kalle Valo1-4/+3
2018-11-06ath10k: fix some typoYangtao Li1-2/+2
2018-10-13ath10k: support NET_DETECT WoWLAN featureWen Gong1-0/+168
2018-09-03ath10k: add waiting htt tx complete before wow enableWen Gong1-0/+2
2018-04-24ath10k: convert wow pattern from 802.3 to 802.11Wen Gong1-5/+133
2017-12-27ath10k: update copyright yearKalle Valo1-1/+1