From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Xf9-0004BO-Of for qemu-devel@nongnu.org; Fri, 20 Oct 2017 09:48:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5Xf4-0007ln-QB for qemu-devel@nongnu.org; Fri, 20 Oct 2017 09:48:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40800 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e5Xf4-0007lX-JV for qemu-devel@nongnu.org; Fri, 20 Oct 2017 09:48:30 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9KDikVF093891 for ; Fri, 20 Oct 2017 09:48:26 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2dqgug4a2s-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 20 Oct 2017 09:48:26 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Oct 2017 09:48:26 -0400 References: <20171020102517.28385-1-borntraeger@de.ibm.com> <67132f0e-cc4d-312f-140a-1966f0d877c6@suse.de> <7a65ad71-9c6d-ee0a-851c-ab6bd9806180@de.ibm.com> From: Farhan Ali Date: Fri, 20 Oct 2017 09:48:22 -0400 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-Id: <9292cbd5-49b5-c9da-cc34-33466818a02e@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH] s390-ccw: print carriage return with new lines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , Alexander Graf , Cornelia Huck Cc: Thomas Huth , Bjoern Walk , David Hildenbrand , Pierre Morel , qemu-devel , Halil Pasic , "Jason J . Herne" , "Collin L. Walling" , Richard Henderson On 10/20/2017 07:02 AM, Christian Borntraeger wrote: > --- a/pc-bios/s390-ccw/sclp.c > +++ b/pc-bios/s390-ccw/sclp.c > @@ -83,7 +83,7 @@ long write(int fd, const void *str, size_t len) > return -EIO; > } > > - for (p = str; *p; ++p) { > + for (p = str; len ; ++p, len--) { > if (data_len > SCCB_DATA_LEN - 1) { > return -EFBIG; > } > > > The write function returns len, wouldn't this change make write return 0?