mufs: get parent directory in mufs_rmpath() to remove the directory entry from
This commit is contained in:
parent
6492a76d14
commit
704cd24061
1 changed files with 4 additions and 1 deletions
|
@ -96,12 +96,15 @@ int mufs_rmpath(struct mufs *fs, const char *path)
|
|||
char data[1 << dev->log2_block_size];
|
||||
struct mufs_dentry *entry, *next;
|
||||
struct mufs_tree *tree;
|
||||
char *s;
|
||||
char *s, *name;
|
||||
uint32_t va, offset, len;
|
||||
|
||||
if (!(s = mufs_abspath(path)))
|
||||
return -1;
|
||||
|
||||
name = strrchr(s, '/');
|
||||
*name++ = '\0';
|
||||
|
||||
if (!(tree = resolve_path(fs, s, NULL))) {
|
||||
free(s);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue