git: usr.sbin/makefs: Fix "-o D" option when intermediate directories exist

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Mon Jun 12 23:13:57 PDT 2023


commit ac97ce6029a0c983cde2e0412a236b7aa455a770
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Mon Jun 12 01:44:12 2023 -0700

    usr.sbin/makefs: Fix "-o D" option when intermediate directories exist
    
    HAMMER2_DELETE_FILE assumes a given inode is a directory containing
    dirent whose name is destroy.path. Therefore ioctl caller side needs
    to split path components and only pass the last component along with
    its direct parent directory inode.
    
    It currently worked only when a target file path is the last component
    without intermediate directories (no intermediate '/').
    
    hammer2_ioc_destroy_t::path should be renamed to "name", as it
    doesn't allow a file "path".

Summary of changes:
 usr.sbin/makefs/hammer2.c               | 34 ++++++++++++++++++++++++++++++---
 usr.sbin/makefs/hammer2/hammer2_inode.c |  2 +-
 2 files changed, 32 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ac97ce6029a0c983cde2e0412a236b7aa455a770


-- 
DragonFly BSD source repository


More information about the Commits mailing list