| 1 | # Copyright 1999-2012 Gentoo Foundation |
1 | # Copyright 1999-2013 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.94 2013/01/14 21:19:39 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.95 2013/01/16 14:29:01 zmedico Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: linux-info.eclass |
5 | # @ECLASS: linux-info.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # kernel-misc@gentoo.org |
7 | # kernel-misc@gentoo.org |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| … | |
… | |
| 321 | # It checks that CONFIG_<option>=y is present in the current kernel .config |
321 | # It checks that CONFIG_<option>=y is present in the current kernel .config |
| 322 | # If linux_config_exists returns false, the results of this are UNDEFINED. You |
322 | # If linux_config_exists returns false, the results of this are UNDEFINED. You |
| 323 | # MUST call linux_config_exists first. |
323 | # MUST call linux_config_exists first. |
| 324 | linux_chkconfig_builtin() { |
324 | linux_chkconfig_builtin() { |
| 325 | linux_config_qa_check linux_chkconfig_builtin |
325 | linux_config_qa_check linux_chkconfig_builtin |
| 326 | localRESULT config |
326 | local RESULT config |
| 327 | config="${KV_OUT_DIR}/.config" |
327 | config="${KV_OUT_DIR}/.config" |
| 328 | [ ! -f "${config}" ] && config="/proc/config.gz" |
328 | [ ! -f "${config}" ] && config="/proc/config.gz" |
| 329 | RESULT="$(getfilevar_noexec CONFIG_${1} "${config}")" |
329 | RESULT="$(getfilevar_noexec CONFIG_${1} "${config}")" |
| 330 | [ "${RESULT}" = "y" ] && return 0 || return 1 |
330 | [ "${RESULT}" = "y" ] && return 0 || return 1 |
| 331 | } |
331 | } |