Fix EINVAL handling and O_DIRECT
Fix EINVAL handling and O_DIRECT

MohamedSeliem/contiki,MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,arurke/contiki,arurke/contiki,MohamedSeliem/contiki,MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,MohamedSeliem/contiki,arurke/contiki,arurke/contiki,arurke/contiki