From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian)) id 1A5UxD-0007Q1-00 for ; Fri, 03 Oct 2003 11:47:03 -0700 Received: from smtp100.mail.sc5.yahoo.com ([216.136.174.138]) by sc8-sf-mx1.sourceforge.net with smtp (Exim 4.22) id 1A5UxC-00076E-5U for user-mode-linux-devel@lists.sourceforge.net; Fri, 03 Oct 2003 11:47:02 -0700 From: BlaisorBlade MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_7Rcf/Mo61TpKtcY" Message-Id: <200310032048.27028.blaisorblade_spam@yahoo.it> Subject: [uml-devel] Errno handling bug Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: Date: Fri, 3 Oct 2003 20:48:27 +0200 To: user-mode-linux-devel@lists.sourceforge.net --Boundary-00=_7Rcf/Mo61TpKtcY Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I posted this patch some time ago, but it was hidden inside an unrelated thread. It applies to .22-[345]um **Description** On the i386 arch(and I think others, too) the translation from return value(of calls like open(), fork()...) to errno setting is done in include/asm-i386/unistd.h. Instead, UML doesn't do it. I'm posting a patch to correct this in include/asm-um/unistd.h for mainline, but I think that parts of the rest of Uml will have to be changed, probably, to conform to the new(and correct) semantic. **Why it IS needed** Code inside the kernel relies on this behaviour. It's a things archs must do. So, it will have to end up in, at some point. **Tested** Yes, but not everything is clear. Stability is ok, but some error messages I get are strange: modprobe: modprobe: Can't locate module char-major-10-135 request_module[char-major-10-135]: waitpid(26,...) failed, errno 0 Which however seems to be either fine or not related directly to this: waitpid returns 0 when no child is found, and maybe this happens here. However this is not clear to me. If you agree that this patch will have to go in, I'll complete it with complete checking for errno. But I think I'll need a working version of -4um(I'm going to test -5um), since I think that version has added/changed also much uses of errno. -- cat <