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

[Minios-devel] [UNIKRAFT/LIBNEWLIBC PATCH 1/1] Revisit the pipe function


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Wed, 4 Sep 2019 15:47:25 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L79/UUoKAKAPYZpIL8RD5WcaEWVDzz67dkVwWrqi1Ac=; b=feLdu0N3F5zuSRYkUv0inpXVIo/+2DCIM1kzeGuZFkaQ20CI3z6lhecyn4lZwuTU11oBRtJ8wdahyZz10xH+boDZVBtLavcYmy1K22ZagSPUgrgdO1s0vwxEWDYK8O8uWOVMwFyAvMBS0yTOJcrZB+7qWsC9wU5hy6rVewfVP/LSOv4pkE77a4Ig//yowxLj8moiYI68/ddrEhHr0QL3H6cM/kpgO4c4GJ9RYuS/CeRIN8s/DAQI2eRGAE6jNjcP7GahRWqMfdC46JiPmTkEIGglnwQqCLJmX+3C9KnwxPYPYR20gMjAfhFTLRj/fuet3McUC1/EuDeHYHv0VXzTrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTmHh5yQOJePqUI0a/8YIp6947uxw07C77k9FMg+4Daz91zWQm6k9fZHgjtPQ5NSUXSvm6R7ez80PBww6x7V7EbdqUu13Tose0DpBdtL/QqB2dkFcmE1GVpGtyBxgRCJFqqzahgXRerIdBN8f7Mt9r2Xi8UPuf/SwjS0hUSPGXuBRiZqkVsMkrmINidunM+SRISHUvThebkjamdJ3+jIkbJGlMXRSHDP+Moo87LPJNUQpDx6dY4XSRf9J4APuJfDjsKrkWs7aCI7IzFv9pZ2BPMyxL0Uyb9AZz+HpYuyZG9D70X7j7tOgQ8kUbTyBkUY1LnmijIIkPmNt+4SwSYs3w==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>, "costin.lupu@xxxxxxxxx" <costin.lupu@xxxxxxxxx>
  • Delivery-date: Wed, 04 Sep 2019 15:47:31 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVYzgMPEQAr7/rM0qbLoa0Mqm1Xg==
  • Thread-topic: [UNIKRAFT/LIBNEWLIBC PATCH 1/1] Revisit the pipe function

The pipe(...) stub should return an error. This is becuase the callee
will try to use the file descriptors returned by this function.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/file.c b/file.c
index 1566679..7d78f79 100644
--- a/file.c
+++ b/file.c
@@ -116,7 +116,8 @@ int utimes(const char *filename __unused,
 
 int pipe(int pipefd[2] __unused)
 {
-       return 0;
+       errno = EFAULT;
+       return -1;
 }
 
 char *realpath(const char *restrict file_name, char *restrict resolved_name)
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.