Mercurial > hvf > hvf-old
changeset 535:ae984d5d8cf2
cp/shell: a better error message when we failed to allocate a virt device
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Tue, 26 Apr 2011 15:45:16 -0400 |
parents | e323b4a731d4 |
children | 0d79cb89e046 |
files | cp/shell/init.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/cp/shell/init.c Tue Apr 26 15:43:03 2011 -0400 +++ b/cp/shell/init.c Tue Apr 26 15:45:16 2011 -0400 @@ -31,16 +31,18 @@ static int __alloc_guest_devices(struct virt_sys *sys) { + int ret; int i; INIT_LIST_HEAD(&sys->virt_devs); for(i=0; sys->directory->devices[i].type != VDEV_INVAL; i++) { - if (alloc_virt_dev(sys, &sys->directory->devices[i], - 0x10000 + i)) - con_printf(sys->con, "Failed to allocate vdev %04X, SCH = %05X\n", + ret = alloc_virt_dev(sys, &sys->directory->devices[i], + 0x10000 + i); + if (ret) + con_printf(sys->con, "Failed to allocate vdev %04X, SCH = %05X (%s)\n", sys->directory->devices[i].vdev, - 0x10000 + i); + 0x10000 + i, errstrings[-ret]); } return 0;