diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-11-22 04:32:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-11-22 04:32:39 +0000 |
commit | 6effb70949141b61d1086c93e1d762604c236d0e (patch) | |
tree | 7f9b4afe2d6976aa03da0afce0812e12809936e2 /share | |
parent | 80d28cd33f972b177d9a6a361466c012db202961 (diff) |
loadfirmware() man page, sick of mickey
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/Makefile | 4 | ||||
-rw-r--r-- | share/man/man9/loadfirmware.9 | 58 |
2 files changed, 60 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 5e6c3ec449c..68df578193f 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.83 2004/11/02 22:50:26 jaredy Exp $ +# $OpenBSD: Makefile,v 1.84 2004/11/22 04:32:38 deraadt Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -9,7 +9,7 @@ MAN= altq.9 audio.9 autoconf.9 boot.9 buffercache.9 bus_dma.9 bus_space.9 \ evcount.9 extattr.9 file.9 \ fork1.9 extent.9 getdevvp.9 getnewvnode.9 hash.9 hashinit.9 \ hardclock.9 hook_establish.9 hz.9 hzto.9 iic.9 intro.9 inittodr.9 \ - kern.9 knote.9 kthread.9 ktrace.9 lock.9 log.9 \ + kern.9 knote.9 kthread.9 ktrace.9 loadfirmware.9 lock.9 log.9 \ malloc.9 mbuf.9 mbuf_tags.9 md5.9 microtime.9 namei.9 \ panic.9 pfind.9 physio.9 pmap.9 \ pool.9 powerhook_establish.9 ppsratecheck.9 printf.9 psignal.9 \ diff --git a/share/man/man9/loadfirmware.9 b/share/man/man9/loadfirmware.9 new file mode 100644 index 00000000000..aa6f472ab68 --- /dev/null +++ b/share/man/man9/loadfirmware.9 @@ -0,0 +1,58 @@ +.\" $OpenBSD: loadfirmware.9,v 1.1 2004/11/22 04:32:38 deraadt Exp $ +.\" +.\" Copyright (c) 2004 Theo de Raadt +.\" All rights reserved. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd November 21, 2004 +.Dt LOADFIRMWARE 9 +.Os +.Sh NAME +.Nm loadfirmware +.Nd load a firmware file from the filesystem +.Sh SYNOPSIS +.Fd #include <sys/device.h> +.Ft int +.Fn loadfirmware "const char *filename" "u_char **buf" "size_t *buflen" +.Sh DESCRIPTION +The +.Fn loadfirmware +function loads a firmware from the file specified by +.Ar filename +in the directory +.Pa /etc/firmware Ns . +Memory for the firmware is allocated using +.Xr malloc 9 +with type +.Va M_DEVBUF +as need be, within a reasonable size limit. +.Pp +If no longer needed, the firmware buffer +.Va buf +can be freed using +.Xr free 9 +with type +.Va M_DEVBUF. +.Sh RETURN VALUES +If successful, +.Ar buf +is set to point to the allocation and +.Ar buflen +is set to the size of the firmware. +Then +.Fn loadfirmware +returns 0. +Otherwise, it returns an +.Va errno +style error. |