From owner-svn-src-head@freebsd.org Mon Dec 2 21:14:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADEBF1B87E8 for ; Mon, 2 Dec 2019 21:14:23 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47RdCg2BcTz4Q16 for ; Mon, 2 Dec 2019 21:14:23 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1575321261; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=OIRqu0vApbkf1XX8TWDZKw/FqKR28Tn64yWGyjQM36ZXPjQhAZpU94ah3uqUwQXUz2oeuVZt7twCC Q4S/2KdqKkTUbD0xM6i0rnFzqXvz40du3sT/FG/3wyVqHP7he2A7sHteegff55XbsLJf+nQPjyCZX6 HJjbjxbjLF37Wdss+2z0wxfHI8QVzsr8OZf5bZMlpc9J5+IxtTbUyKJUhDKm9bOZ5KVjo/XSFd6aY8 eO37QzkHGcRHiGQWn7WTtZTc5x0VrPWcnMLrk6oAl0CQy6ChO7ycy+eWkJkKjdL8uwgpXCNLn1KZ3x itjqV4FyQEMbtmd6nicZ1bNoBDNtnCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=1vH67dMsHX9Hm75oIBwgLPAl/iNgy0prF7na/zdnzWM=; b=bKyoY+f+ZICgwE8WfChBriA97cXCgULSJSLMJ9siG4+5kb5BB+PI4k5Rd7nBM2MmVcgFAtYV12y4o 3n9Sn57aPUw5+oRqw/PdYGo8rm+Yi8rHmEQI0OiiBr6xDsP3zpTmHJM2hXFQlqaAJCoyneK5IUDpwb 5yta7nfMm7MyzB8pek0F/VDu9Xe7z9r+4z0XPnpGSGJByqGMm32R/t6vjJ468J1YX9Yf4886ncyTFe rfbrh+UgkU0S6fdE6w9gtnyUdG/9H6Az88INPRC7WRTRbO2PejrdKXWxuwgQASZ2EY8VC4TKjyvo22 ZrUyanGwFCS/sokJ85X6fKinRU7xkbA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=1vH67dMsHX9Hm75oIBwgLPAl/iNgy0prF7na/zdnzWM=; b=v8BWWhCGaZn2v22z271M8mkks2xotNZyz5Hxd3/piL44J0SCmdGpwezTADzGiijbt9PmIef36Twbk rvTpynMKQTFLs5/6jiQcLywUzO5riSa5M3Jra5YidIyTUYcFReLuahE+G2hBrtKe+6lEG2rr4zrjYJ L55BRWpq+9Lp9bfugGNdH73QrmOoFfd5y3oZARYj0dZnED2R/KLaksCLs9VaX10PgGyovq4DzkqtM0 tbYJSJTWO2w6aXltJPjjyMzwo595uU2vDII8pLuWjEJjfEd8KmEGU8H1Y4F930qnh6cgYrfVDzMaSV 4DcAx8vQ7p162X3r927JeNEWFqOvKYQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: b4230f70-1548-11ea-829e-79a40d15cccd X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id b4230f70-1548-11ea-829e-79a40d15cccd; Mon, 02 Dec 2019 21:14:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id xB2LEJoo097183; Mon, 2 Dec 2019 14:14:19 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <00084efce3baaad166ec9594e56bf43cd31ece0e.camel@freebsd.org> Subject: Re: svn commit: r355301 - head/usr.sbin/bhyve From: Ian Lepore To: Vincenzo Maffione , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 02 Dec 2019 14:14:19 -0700 In-Reply-To: <201912022051.xB2Kplot078056@repo.freebsd.org> References: <201912022051.xB2Kplot078056@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47RdCg2BcTz4Q16 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.88 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-0.93)[-0.929,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2019 21:14:23 -0000 On Mon, 2019-12-02 at 20:51 +0000, Vincenzo Maffione wrote: > Author: vmaffione > Date: Mon Dec 2 20:51:46 2019 > New Revision: 355301 > URL: https://svnweb.freebsd.org/changeset/base/355301 > > Log: > bhyve: uniform printf format string newlines > > Some of the printf statements only use LF to get a newline. > However, a CR character is also required for the serial console to > print debug logs in a nice way. > Fix those code locations that only use LF, by adding a CR > character. > > Reviewed by: markj, aleksandr.fedorov@itglobal.com > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D22552 > > Modified: > head/usr.sbin/bhyve/audio.c > head/usr.sbin/bhyve/hda_codec.c > head/usr.sbin/bhyve/net_backends.c > head/usr.sbin/bhyve/pci_ahci.c > head/usr.sbin/bhyve/pci_e82545.c > head/usr.sbin/bhyve/pci_hda.c > head/usr.sbin/bhyve/pci_nvme.c > head/usr.sbin/bhyve/pci_virtio_block.c > head/usr.sbin/bhyve/pci_virtio_console.c > head/usr.sbin/bhyve/pci_virtio_net.c > head/usr.sbin/bhyve/pci_virtio_rnd.c > head/usr.sbin/bhyve/pci_virtio_scsi.c > head/usr.sbin/bhyve/pci_xhci.c > head/usr.sbin/bhyve/rfb.c > These changes seem wrong in a couple ways... - Lines are terminated by linefeeds in unix-like systems. If linefeeds need to be translated to include carriage returns, that's the responsibility of the terminal/line-discipline layer, not the source strings being printed. - The sequence \n\r is very strange. For systems that do prefer carriage returns, the \r always comes before the \n (or stands alone on Mac systems), not after. I have a feeling that the root of this is something like "lots of people use bhyve for Windows, so they use Windows apps to look at logs, so the logs should be formatted for Windows." If that's the reasoning, then why shouldn't we convert EVERY printf in the source base to include carriage returns, just in case a windows user wants to browse a log file? -- Ian