Lines Matching refs:last_slash
258 int last_slash = -1; in vfs_mkdir() local
265 last_slash = i; in vfs_mkdir()
271 if (last_slash < 0) in vfs_mkdir()
274 char *buf = (char *)kzalloc(last_slash + 2, 0); in vfs_mkdir()
278 strncpy_from_user(buf, path, last_slash); in vfs_mkdir()
280 strncpy(buf, path, last_slash); in vfs_mkdir()
281 buf[last_slash + 1] = '\0'; in vfs_mkdir()
302 struct vfs_dir_entry_t *subdir_dentry = vfs_alloc_dentry(pathlen - last_slash); in vfs_mkdir()
305 subdir_dentry->name_length = pathlen - last_slash - 2; in vfs_mkdir()
307 subdir_dentry->name_length = pathlen - last_slash - 1; in vfs_mkdir()
309 … for (int i = last_slash + 1, cnt = 0; i < pathlen && cnt < subdir_dentry->name_length; ++i, ++cnt) in vfs_mkdir()
641 int last_slash = -1; in vfs_rmdir() local
648 last_slash = i + 1; in vfs_rmdir()
654 if (last_slash < 0) in vfs_rmdir()
659 char *buf = (char *)kzalloc(last_slash + 2, 0); in vfs_rmdir()
663 strncpy_from_user(buf, path, last_slash); in vfs_rmdir()
665 strncpy(buf, path, last_slash); in vfs_rmdir()
666 buf[last_slash + 1] = '\0'; in vfs_rmdir()
793 int last_slash = -1; in do_unlink_at() local
800 last_slash = i + 1; in do_unlink_at()
806 if (last_slash < 0) in do_unlink_at()
811 char *buf = (char *)kzalloc(last_slash + 1, 0); in do_unlink_at()
815 strncpy_from_user(buf, pathname, last_slash); in do_unlink_at()
817 strncpy(buf, pathname, last_slash); in do_unlink_at()
818 buf[last_slash] = '\0'; in do_unlink_at()