Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mciuU-0004up-2w for mharc-grub-devel@gnu.org; Tue, 19 Oct 2021 02:47:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mciuR-0004mD-Io for grub-devel@gnu.org; Tue, 19 Oct 2021 02:47:39 -0400 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:35582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mciuP-0007cy-Tt for grub-devel@gnu.org; Tue, 19 Oct 2021 02:47:39 -0400 Received: by mail-qt1-x82c.google.com with SMTP id n2so4069053qta.2 for ; Mon, 18 Oct 2021 23:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/UWYKPewMiA2vjdt+A5g7puoFDRrNUXvoK2i4QAgX4Y=; b=hf7XheH275Z1w4xS9aXvyXaWfpJxFQZkhGGRHfot1OEHhDP74aHJ8p5PWyKeK6mDzk iSYC0GcSbUUve6xO6tM2KuzFJxCFmTc0XEIPxCZ1BoUzrff36sfsCjZSg/dEjbTba9JA 8EybzjfMvHtkyYr4JXe2Ioh/rq4ZZVOruOFoEOozbzARq5Kl31RoFxFUZHeNReh03eFS 7KOVD0r9AplEdLRSogUNU18vOrF3OEP5rS9UPCZVY2vRWs6oZmpCqAkhuLNrzEIYCDq9 8Byi5wjerIMAG49ShgcDM7o4aw7cNCXWlR/xTmUqoKUmx9PRk+LekDuISERIoJI//2f3 qD1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/UWYKPewMiA2vjdt+A5g7puoFDRrNUXvoK2i4QAgX4Y=; b=GvI5XmxGsWSYmn9Y9gWOWFTPUfPH+c2YGwz/nqsko1hNcOqJwIJITb12odjVXmPZUB nXR70Q7uXmRTly/6xqea6rRveqglC33OxzPuHNEMZ30PlbLA6FQxtumntq+ZpFtebl+P Lxeqe+VVRCF6Brwpu1YCF/C++2JofP/q+fFWZJiO28ZGqrkQHRrWn0vUYZuIQOHfHyuu +jV7usloGHXzmG5gi6UcUfg/dobJxf/vn3gyGZ+WNNCDUwaIlOfHmkzY/gcTBItFvQwL mg090hGd1I3D5J96sZWhdxoYbQTNs69RwTGXuV65i2MI9AwUo5gteij+QqebmDiu4aI9 Py0w== X-Gm-Message-State: AOAM531WOspz3WMnqGdaRFnMGCSPPrOn0wLlrnYJ0/bqvRMAINdILiyk ipLwKh+mJUzKZaKz4nm8W7rvrStuHIwt+Q== X-Google-Smtp-Source: ABdhPJyBp0lKkThbm3G2sZMAT4DwKbB/OepunAnHlQzbLNFCEf0ZopibbsS3DqdR/Lqcxjyfyfae/w== X-Received: by 2002:ac8:5e50:: with SMTP id i16mr6790418qtx.183.1634626056594; Mon, 18 Oct 2021 23:47:36 -0700 (PDT) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id k9sm6476818qkj.75.2021.10.18.23.47.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 23:47:35 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Michael Schierl , Glenn Washburn Subject: [DEBUG 2/2] misc: Add debug log condition to log output Date: Tue, 19 Oct 2021 01:47:03 -0500 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82c; envelope-from=development@efficientek.com; helo=mail-qt1-x82c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 06:47:39 -0000 Adding the conditional to debug log messages allows the grub user to construct the $debug variable without needing to consult the source to find the conditional (especially useful for situations where the source is not readily available). Signed-off-by: Glenn Washburn --- grub-core/kern/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index ecef4839e..17a907b63 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -197,7 +197,7 @@ grub_real_dprintf (const char *file, const int line, const char *condition, if (grub_debug_enabled (condition)) { - grub_printf ("%s:%d: ", file, line); + grub_printf ("%s:%d:%s: ", file, line, condition); va_start (args, fmt); grub_vprintf (fmt, args); va_end (args); -- 2.27.0