Re: [PATCH v3] printk: Add boottime and real timestamps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/03/2017 06:18 PM, Prarit Bhargava wrote:
+	/*
+	 * Only allow enabling and disabling of the current printk_time
+	 * setting.  Changing it from one setting to another confuses
+	 * userspace.
+	 */
We should allow a debug option to permit this (but that can be a followup patch, do not stall this one on a wish-list item).
+	if (printk_time_setting == PRINTK_TIME_DISABLE) {
+		printk_time_setting = _printk_time;
+	} else if ((printk_time_setting != _printk_time) &&
+		   (_printk_time != 0)) {
+		pr_warn("printk: timestamp can only be set to 0(disabled) or %d(%s) ",
trailing space? why did checkpatch.pl not find this for you? should be trailing newline.
+			printk_time_setting,
+			printk_time_str[printk_time_setting]);
+		return -EINVAL;
+	}
+
+	printk_time = _printk_time;
+	pr_info("printk: timestamp set to %d(%s).",
missing trailing newline
+		printk_time, printk_time_str[printk_time]);
+	return 0;
+}
-- Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux