From patchwork Sat May 4 12:06:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 241446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 469B62C00AF for ; Sat, 4 May 2013 22:07:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DB70A10BA3F; Sat, 4 May 2013 12:06:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MK860bxNi2uZ; Sat, 4 May 2013 12:06:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8FAB710249C; Sat, 4 May 2013 12:06:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8977B8F753 for ; Sat, 4 May 2013 12:07:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DB72F8C46C for ; Sat, 4 May 2013 12:06:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hNukl5aq53Yv for ; Sat, 4 May 2013 12:06:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from loknar.toptech.com.ar (loknar.toptech.com.ar [78.46.79.162]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0B5CB8C438 for ; Sat, 4 May 2013 12:06:53 +0000 (UTC) Received: from asgard (host147.190-138-228.telecom.net.ar [190.138.228.147]) (authenticated bits=0) by loknar.toptech.com.ar (8.14.7/8.14.7) with ESMTP id r44C6kOF008977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 4 May 2013 12:06:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1367669211; bh=7/wvZdMvKHqiLNdGpu+6S2AJSdQYtPfxLEEzNI9JBxs=; h=From:To:Cc:Subject:Date; b=ELEUCUO9BCohcqiADxTYQFqw+ODBeCboqEZwHkra8L1TLPUGt1RbBP4Uysnmnyvwh NU/cC+BxzlzcqZGeEROVKeKkLdZNSkTh0A9zthLAa/mpE4vedMDnNcOeBk8qO/n7s1 WRpm+ccwQDuEgjJYfc+PdilLHaqaNUxlpAT1Xpqo= Received: by asgard (sSMTP sendmail emulation); Sat, 04 May 2013 09:06:45 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Sat, 4 May 2013 09:06:45 -0300 Message-Id: <1367669205-1745-1-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 1.8.1.5 X-Virus-Scanned: clamav-milter 0.97.7 at loknar X-Virus-Status: Clean Subject: [Buildroot] [PATCH] samba: add option for built-in debug messages X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This option allows users to specify the maximum level for compiled-in debug messages with -1 being none. In a typical scenario of nmbd+smbd+smbpasswd this can save a full megabyte of target space. Signed-off-by: Gustavo Zacarias --- package/samba/Config.in | 8 ++++++++ package/samba/samba.mk | 3 +++ 2 files changed, 11 insertions(+) diff --git a/package/samba/Config.in b/package/samba/Config.in index fedbccd..0ab67ed 100644 --- a/package/samba/Config.in +++ b/package/samba/Config.in @@ -13,6 +13,14 @@ config BR2_PACKAGE_SAMBA if BR2_PACKAGE_SAMBA +config BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL + int "Maximum level of compiled-in debug messages" + range -1 10000 + default -1 + help + Define the level of compiled-in debug messages. + This allows for big space savings, -1 being the lowest (none). + config BR2_PACKAGE_SAMBA_LIBICONV bool "extended encodings (libiconv)" depends on !BR2_ENABLE_LOCALE diff --git a/package/samba/samba.mk b/package/samba/samba.mk index 3a004e1..683c7b2 100644 --- a/package/samba/samba.mk +++ b/package/samba/samba.mk @@ -158,6 +158,9 @@ else SAMBA_CONF_OPT += --with-libiconv="" endif +# Compiled debug messages by level +SAMBA_CONF_OPT += CFLAGS="$(TARGET_CFLAGS) -DMAX_DEBUG_LEVEL=$(BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL)" + ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y) ifneq ($(BR2_HAVE_DOCUMENTATION),y) SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION