[PATCH 6/8] lib: fwts_mmap.c: add more comments
Keng-Yu Lin
kengyu at canonical.com
Thu May 31 06:50:33 UTC 2012
On Fri, May 25, 2012 at 6:40 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_mmap.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/lib/src/fwts_mmap.c b/src/lib/src/fwts_mmap.c
> index fd119d4..c47960d 100644
> --- a/src/lib/src/fwts_mmap.c
> +++ b/src/lib/src/fwts_mmap.c
> @@ -26,6 +26,11 @@
>
> #define PAGE_SIZE 4096
>
> +/*
> + * fwts_mmap()
> + * Try and map physical memory from offset address 'start' and length
> + * 'size'. Return either the address or FWTS_MAP_FAILED if failed to mmap.
> + */
> void *fwts_mmap(const off_t start, const size_t size)
> {
> int fd;
> @@ -52,6 +57,10 @@ void *fwts_mmap(const off_t start, const size_t size)
> return ret;
> }
>
> +/*
> + * fwts_munmap()
> + * Unmap memory mapped wuth fwts_mmap. Needs the mmap'd address and size.
> + */
> int fwts_munmap(void *mem, const size_t size)
> {
> int page_size;
> --
> 1.7.10
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>
More information about the fwts-devel
mailing list