Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (7 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_mkdir.c

    r303 r407  
    11/*
    2  * sys_mkdir.c - Create a new directory
     2 * sys_mkdir.c - Create a new directory in file system.
    33 *
    44 * Author    Alain Greiner (2016,2017)
     
    5050    }
    5151
    52     // get pathname copy in kernel space
    53     error = hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH );
    54 
    55     if( error )
     52    // check pathname length
     53    if( hal_strlen_from_uspace( pathname ) >= CONFIG_VFS_MAX_PATH_LENGTH )
    5654    {
    5755        printk("\n[ERROR] in %s : pathname too long\n", __FUNCTION__ );
     
    5957        return -1;
    6058    }
     59
     60    // copy pathname in kernel space
     61    hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH );
    6162
    6263    // get cluster and local pointer on reference process
Note: See TracChangeset for help on using the changeset viewer.