freebsd-dev/lib/libspl
Chris Dunlap 7368eb621e Set errno for mkdirp() called with NULL path ptr
If mkdirp() is called with a NULL ptr for the path arg, it will return
-1 with errno unchanged.  This is unexpected since on error it should
return -1 and set errno to one of the error values listed for mkdir(2).

This commit sets errno = ENOENT for this NULL ptr case.  This is in
accordance with the errors specified by mkdir(2):

  ENOENT
  A component of the path prefix does not exist or is a null pathname.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2248
2014-04-09 13:32:22 -07:00
..
asm-generic cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
asm-i386 Add atomic_sub_* functions to libspl. 2012-10-17 08:56:37 -07:00
asm-x86_64 Add atomic_sub_* functions to libspl. 2012-10-17 08:56:37 -07:00
include Assert alignment in umem_alloc_aligned 2014-03-20 12:01:37 -07:00
getexecname.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
gethrestime.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
gethrtime.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
getmntany.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
list.c Add linux libspl support 2010-08-31 13:41:59 -07:00
Makefile.am Generate libraries with correct DT_NEEDED entries 2013-10-10 16:56:51 -07:00
mkdirp.c Set errno for mkdirp() called with NULL path ptr 2014-04-09 13:32:22 -07:00
strlcat.c Add linux libspl support 2010-08-31 13:41:59 -07:00
strlcpy.c Add linux libspl support 2010-08-31 13:41:59 -07:00
strnlen.c Add linux libspl support 2010-08-31 13:41:59 -07:00
timestamp.c Add linux libspl support 2010-08-31 13:41:59 -07:00
xdr.c Add linux libspl support 2010-08-31 13:41:59 -07:00
zone.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00