mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Fixed wrong directory name issue, strlen() was off by one.
This commit is contained in:
2
README
2
README
@@ -134,7 +134,7 @@ most fundamental posix calls and it implements modern features such as
|
||||
demand-paging and virtual filesystem layer. Different from other posix-like
|
||||
systems, it is based on a microkernel design. It has a cleanly separated set of
|
||||
services, it is small and well-focused. Its design is carefully thought out, so
|
||||
it's not just a mock-up implementation of an operating system API. Its source
|
||||
it's not just a mock-up implementation of the existing POSIX API. Its source
|
||||
code is also freely available (See LICENSE heading). For these reasons it is a
|
||||
good candidate as systems software to be used on embedded platforms. Currently
|
||||
it has little or no users, therefore compared to systems with a saturated user
|
||||
|
||||
@@ -81,6 +81,8 @@ struct vnode *generic_vnode_lookup(struct vnode *thisnode,
|
||||
* where path = { "//comp1/comp2", "/", "/comp1/comp2", "comp1/comp2" }
|
||||
*/
|
||||
|
||||
printf("Looking up: %s\n", pdata->path);
|
||||
|
||||
/* Handle the special root case */
|
||||
if (pdata->root)
|
||||
component = pathdata_handle_root(pdata);
|
||||
|
||||
@@ -49,6 +49,7 @@ int vfs_create(struct tcb *task, struct pathdata *pdata, unsigned int mode)
|
||||
char *nodename;
|
||||
int err;
|
||||
|
||||
printf("%s: %s\n", __FUNCTION__, pdata->path);
|
||||
/* The last component is to be created */
|
||||
nodename = splitpath_end(&pdata->path, '/');
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ static inline int l4_mkdir(const char *pathname, mode_t mode)
|
||||
int fd;
|
||||
|
||||
// write_mr(L4SYS_ARG0, (unsigned long)pathname);
|
||||
copy_to_utcb((void *)pathname, 0, strlen(pathname));
|
||||
copy_to_utcb((void *)pathname, 0, strlen(pathname) + 1);
|
||||
write_mr(L4SYS_ARG0, (unsigned long)utcb_page);
|
||||
write_mr(L4SYS_ARG1, (u32)mode);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ static inline int l4_open(const char *pathname, int flags, mode_t mode)
|
||||
int fd;
|
||||
|
||||
// write_mr(L4SYS_ARG0, (unsigned long)pathname);
|
||||
copy_to_utcb((void *)pathname, 0, strlen(pathname));
|
||||
copy_to_utcb((void *)pathname, 0, strlen(pathname) + 1);
|
||||
write_mr(L4SYS_ARG0, (unsigned long)utcb_page);
|
||||
write_mr(L4SYS_ARG1, flags);
|
||||
write_mr(L4SYS_ARG2, (u32)mode);
|
||||
|
||||
Reference in New Issue
Block a user