mirror_zfs/cmd/zed
Chris Dunlap 6ac770b196 Replace zed_file_create_dirs() with mkdirp()
When processing directory components starting from the root dir,
zed_file_create_dirs() contained a bug in checking the return value of
mkdir().  A typo was made, and the test for (mkdir_errno != EEXIST) was
erroneously written as (mkdir_errno == EEXIST).  If some of the leading
directory components already existed, this bug would cause the routine
to exit before creating the remaining directory components.

Instead of fixing the above mkdir_errno test, this commit replaces
zed_file_create_dirs() with mkdirp().  This cleanup was already
planned, and zed_file_create_dirs() only existed because I didn't
realize mkdirp() was already in tree at the time.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2248
2014-04-09 13:32:54 -07:00
..
zed.d Add automatic hot spare functionality 2014-04-02 13:10:08 -07:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am Add automatic hot spare functionality 2014-04-02 13:10:08 -07:00
zed_conf.c Replace zed_file_create_dirs() with mkdirp() 2014-04-09 13:32:54 -07:00
zed_conf.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_event.c Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_event.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_exec.c Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_exec.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_file.c Replace zed_file_create_dirs() with mkdirp() 2014-04-09 13:32:54 -07:00
zed_file.h Replace zed_file_create_dirs() with mkdirp() 2014-04-09 13:32:54 -07:00
zed_log.c Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_log.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_strings.c Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_strings.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed.c Replace check for _POSIX_MEMLOCK w/ HAVE_MLOCKALL 2014-04-02 13:10:08 -07:00
zed.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00