From 9f05d04d79fa07b54e7a21f9970008c3af031063 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 25 Aug 1997 23:42:36 +0000 Subject: (S_io_write): Negate linux error codes before returning. --- pfinet/io-ops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pfinet') diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c index 72895065..147e52b0 100644 --- a/pfinet/io-ops.c +++ b/pfinet/io-ops.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -46,7 +46,9 @@ S_io_write (struct sock_user *user, user->sock->userflags); mutex_unlock (&global_lock); - if (err >= 0) + if (err < 0) + err = -err; + else { *amount = err; err = 0; -- cgit v1.2.3