Ignore:
Timestamp:
Nov 10, 2018, 2:56:43 PM (3 years ago)
Author:
alain
Message:

Rewrite the mmap() and stat() syscalls to implement the cat command in ksh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/mini-libc/mman.c

    r473 r597  
    2828#include <stdio.h>
    2929
    30 ////////////////////////////////y
     30////////////////////////////////
    3131int munmap( void         * addr,
    3232            unsigned int   size )
     
    4747    mmap_attr_t attr;
    4848
    49     attr.addr   = addr;
     49    // addr argument must be NULL
     50    if( addr != NULL )
     51    {
     52        printf("\n[ERROR] in %s : the <addr> argument must be NULL\n", __FUNCTION__ );
     53        return NULL;
     54    }
     55
     56    //set the mmap attributes
     57    attr.addr   = NULL;
    5058    attr.length = length;
    5159    attr.prot   = prot;
Note: See TracChangeset for help on using the changeset viewer.