[PATCH] busybox: fix mkdir -p on read only file systems

Peter Korsgaard jacmet at uclibc.org
Fri May 16 00:04:46 PDT 2008


>>>>> "Denys" == Denys Vlasenko <vda.linux at googlemail.com> writes:

 Denys> On Wednesday 14 May 2008 11:19, Peter Korsgaard wrote:
 >> From: Peter Korsgaard <jacmet at sunsite.dk>
 >> 
 >> Read only file systems return EROFS on mkdir() even if the directory exists.
 >> Update the check in bb_make_directory to handle EROFS like EEXIST.

 Denys> Why?

 Denys> Unlike "directory already exists", "read-only fs" is the real error
 Denys> in real-world usage - user won't be able to create files in it later.

The issue is when you span mount points, E.G. my specific problem was
with /var on a ro mount, with /var/lib a symlink to /tmp, and trying
to do a mkdir -p /var/lib/blah.

mkdir /var/lib/blah worked, mkdir -p didn't. With the patch it does.

-- 
Bye, Peter Korsgaard


More information about the busybox mailing list