From patchwork Mon Jul 21 13:02:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 33959 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4E61320672 for ; Mon, 21 Jul 2014 13:03:01 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rp18sf59905528iec.4 for ; Mon, 21 Jul 2014 06:03:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=oIf/44QK8JwsDtjE8s+/07kf6iTMgYbklV4QYOv5A9E=; b=HJJuWui96mFdsSMfqQ8sFIlqIDICMOF2cr4oEu9dyFufFhv/xnGLX6ixaJdtumMpDu F0lv4ulFVFEHJD9rC0LOn61u7of4PIom3blN3afxBvi90Htf1KeDSY0LxfK3QGydZbq1 iWvEooilZAfIfuX3uDFSFUCD6yKJdEBJxGHyxviNXkatiMOLfQSzegHmshTV3eAnhlzo glyd46THXsfE0W9w9MdZGf0GV4PE5C59gRkJ482SflA2Bhc/66NiYq3AEMUoaK2DR3WE flw3bZ0KyC6zoG85qD+2PQDT8V5rAouzYj7SVjQOVDzHBoYTiV+DskH7J7vKbu2S+JwP ZZ6g== X-Gm-Message-State: ALoCoQkTmwARhpUbhfPnGh9xPJ235OBov5ZLoGw+X/oslFf6/kphc4mWOih6cQNLfcikR/hgxMSF X-Received: by 10.50.33.18 with SMTP id n18mr1388737igi.8.1405947780797; Mon, 21 Jul 2014 06:03:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.132 with SMTP id o4ls2079905qga.40.gmail; Mon, 21 Jul 2014 06:03:00 -0700 (PDT) X-Received: by 10.52.239.6 with SMTP id vo6mr9557658vdc.59.1405947780630; Mon, 21 Jul 2014 06:03:00 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id si10si11266085vcb.10.2014.07.21.06.03.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jul 2014 06:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so11815258vcb.31 for ; Mon, 21 Jul 2014 06:03:00 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr1660471vcf.71.1405947780071; Mon, 21 Jul 2014 06:03:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp110326vcb; Mon, 21 Jul 2014 06:02:59 -0700 (PDT) X-Received: by 10.70.133.167 with SMTP id pd7mr3740113pdb.31.1405947779097; Mon, 21 Jul 2014 06:02:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bp9si7086570pdb.478.2014.07.21.06.02.58 for ; Mon, 21 Jul 2014 06:02:58 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932275AbaGUNCm (ORCPT + 13 others); Mon, 21 Jul 2014 09:02:42 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:60628 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932205AbaGUNCj (ORCPT ); Mon, 21 Jul 2014 09:02:39 -0400 Received: by mail-ie0-f174.google.com with SMTP id rp18so6555848iec.5 for ; Mon, 21 Jul 2014 06:02:39 -0700 (PDT) X-Received: by 10.43.48.8 with SMTP id uu8mr27951935icb.10.1405947759028; Mon, 21 Jul 2014 06:02:39 -0700 (PDT) Received: from localhost.localdomain (c-24-245-18-91.hsd1.mn.comcast.net. [24.245.18.91]) by mx.google.com with ESMTPSA id ri8sm38580163igc.0.2014.07.21.06.02.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Jul 2014 06:02:38 -0700 (PDT) From: Alex Elder To: akpm@linux-foundation.org Cc: kay@vrfy.org, pmladek@suse.cz, bp@suse.de, john.stultz@linaro.org, jack@suse.cz, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/7] printk: report dropped messages on separate line Date: Mon, 21 Jul 2014 08:02:35 -0500 Message-Id: <1405947761-26004-2-git-send-email-elder@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405947761-26004-1-git-send-email-elder@linaro.org> References: <1405947761-26004-1-git-send-email-elder@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: elder@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It is possible for the log to be filled too quickly for the consoles to be able to keep up. This is detected in console_unlock(), and when it occurs, a message is inserted to note the event. When reviewing some nearby code, Petr Mládek suggested it might be nicer if this message were placed on a separate line. This patch implements that suggestion. Suggested-by: Petr Mládek Signed-off-by: Alex Elder Reviewed-by: Petr Mládek --- kernel/printk/printk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 13e839d..ffc9928 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2142,9 +2142,10 @@ again: } if (console_seq < log_first_seq) { - len = sprintf(text, "** %u printk messages dropped ** ", + len = sprintf(text, + "%s** %u printk messages dropped **\n", + (console_prev & LOG_CONT) ? "\n" : "", (unsigned)(log_first_seq - console_seq)); - /* messages are gone, move to first one */ console_seq = log_first_seq; console_idx = log_first_idx;