[Bug 161481] [libc] mount(2) fails with ENAMETOOLONG with path shorter than 255 // 1023 characters
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jun 18 21:29:18 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=161481
Nick Hibma <n_hibma at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |n_hibma at FreeBSD.org
--- Comment #3 from Nick Hibma <n_hibma at FreeBSD.org> ---
In our NanoBSD builds we use nullfs to provide a dir with packages to install.
I changed the MAKEOBJDIR to include the full path to working directory to
provide a means to separate multiple images and versions of images.
nullfs couldn't handle the length of that path. I am -very- surprised that
nullfs is not able to handle MAX_PATH length paths.
Our workaround is the use the MD5 of the full path instead of the path itself:
# XXX Take the MD5 of the path as mount_nullfs (for packages) does not handle
long paths. See
# FreeBSD PR kern/161481.
p="$(echo "$PWD" | sed -Ee 's#^/((usr)?/home|Users)/##' | md5)"
NANO_OBJ=${NANO_OBJ:-"/usr/obj/nanobsd/$p"}
I do understand that this is actually a rather complex little bug, as it goes
across a number of APIs.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list