[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 50/53: Fix crash on accessing vcs without a console being active
From: |
Samuel Thibault |
Subject: |
[hurd] 50/53: Fix crash on accessing vcs without a console being active |
Date: |
Thu, 20 Mar 2014 02:23:53 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit a13a5288214c6dbb25bd8da04057f8ff17750ec1
Author: Samuel Thibault <address@hidden>
Date: Sun Mar 16 19:45:34 2014 +0100
Fix crash on accessing vcs without a console being active
* console-client/current-vcs.c (vcs_readlink): Return error as negative
values.
(vcs_read): Convert errors returned by vcs_readlink before returning
them.
---
console-client/current-vcs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/console-client/current-vcs.c b/console-client/current-vcs.c
index e88e549..f1112f9 100644
--- a/console-client/current-vcs.c
+++ b/console-client/current-vcs.c
@@ -57,7 +57,7 @@ vcs_readlink (struct iouser *user, struct node *np, char *buf)
ret = sprintf (buf, "%s/%d", cons_file, cur);
if (ret < 0)
- ret = errno;
+ ret = -errno;
}
return ret;
}
@@ -75,14 +75,14 @@ vcs_read (struct protid *user, char **data,
{
size = vcs_readlink (user->user, NULL, NULL);
if (size < 0)
- return size;
+ return -size;
buf = alloca (size);
err = vcs_readlink (user->user, NULL, buf);
if (err < 0)
- return err;
+ return -err;
if (offset + amount > size)
amount = size - offset;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 38/53: trans/ifsock: fix receiver lookup, (continued)
- [hurd] 38/53: trans/ifsock: fix receiver lookup, Samuel Thibault, 2014/03/19
- [hurd] 40/53: mach-defpager: remove comments around form feeds, Samuel Thibault, 2014/03/19
- [hurd] 45/53: mach-defpager: fix warnings about uninitialized variables, Samuel Thibault, 2014/03/19
- [hurd] 41/53: mach-defpager: fix warnings about unused variables, Samuel Thibault, 2014/03/19
- [hurd] 32/53: pfinet: improve the mig mutator functions, Samuel Thibault, 2014/03/19
- [hurd] 47/53: mach-defpager: silently ignore requests to page to active partition, Samuel Thibault, 2014/03/19
- [hurd] 46/53: mach-defpager: fix type of size arguments, Samuel Thibault, 2014/03/19
- [hurd] 35/53: pfinet: fix receiver lookups in iioctl-ops.c, Samuel Thibault, 2014/03/19
- [hurd] 49/53: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/03/19
- [hurd] 30/53: libnetfs: fix receiver lookups in fsys server functions, Samuel Thibault, 2014/03/19
- [hurd] 50/53: Fix crash on accessing vcs without a console being active,
Samuel Thibault <=
- [hurd] 37/53: term: fix receiver lookups in the term server functions, Samuel Thibault, 2014/03/19
- [hurd] 33/53: libtrivfs: improve the mig mutator functions, Samuel Thibault, 2014/03/19
- [hurd] 51/53: Fix vcs_readlink propagating error returned by console_current_id, Samuel Thibault, 2014/03/19
- [hurd] 53/53: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2014/03/19
- [hurd] 52/53: Fix handling of console readlink errors, Samuel Thibault, 2014/03/19
- [hurd] 04/53: isofs: add bz2 to OTHERLIBS, Samuel Thibault, 2014/03/19
- [hurd] 11/53: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/03/19
- [hurd] 09/53: libdiskfs: fix typo, Samuel Thibault, 2014/03/19
- [hurd] 13/53: Add missing copyright notice, Samuel Thibault, 2014/03/19
- [hurd] 42/53: mach-defpager: add and use synchronized_printf for dprintf, Samuel Thibault, 2014/03/19