diff options
author | msmith <msmith@FreeBSD.org> | 1999-08-31 01:00:30 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-08-31 01:00:30 +0000 |
commit | bb57ce86c93ba9d59c9a05d08e1887f98cd7f1de (patch) | |
tree | d434683a204e895f08b45752a3ac89ec0f51a824 /sys/i386 | |
parent | 67ba4fb168b97c829b8f413eb267ef4390ccb629 (diff) | |
download | FreeBSD-src-bb57ce86c93ba9d59c9a05d08e1887f98cd7f1de.zip FreeBSD-src-bb57ce86c93ba9d59c9a05d08e1887f98cd7f1de.tar.gz |
Make the error return from mem_range_attr_get actually do something useful
(return an error to the caller)
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/mem.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index de134f1..7477567 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -429,8 +429,9 @@ mem_ioctl(dev, cmd, data, flags, p) md = (struct mem_range_desc *) malloc(nd * sizeof(struct mem_range_desc), M_MEMDESC, M_WAITOK); - mem_range_attr_get(md, &nd); - error = copyout(md, mo->mo_desc, + error = mem_range_attr_get(md, &nd); + if (!error) + error = copyout(md, mo->mo_desc, nd * sizeof(struct mem_range_desc)); free(md, M_MEMDESC); } else { @@ -460,7 +461,7 @@ mem_ioctl(dev, cmd, data, flags, p) * Implementation-neutral, kernel-callable functions for manipulating * memory range attributes. */ -void +int mem_range_attr_get(mrd, arg) struct mem_range_desc *mrd; int *arg; @@ -474,6 +475,7 @@ mem_range_attr_get(mrd, arg) } else { bcopy(mem_range_softc.mr_desc, mrd, (*arg) * sizeof(struct mem_range_desc)); } + return(0); } int |