chiark / gitweb /
base_filesystem_create: do not try to create "/root" if it exists
authorHarald Hoyer <harald@redhat.com>
Wed, 3 Sep 2014 11:22:40 +0000 (13:22 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 3 Sep 2014 11:26:27 +0000 (13:26 +0200)
The check, if the directory/file already exists is only executed, if
there is a symlink target specified. In case of "/root", there is none,
so it is unconditionally tried to create the directory.

In case of a readonly filesystem, errno != EEXIST, but errno == EROFS,
so base_filesystem_create() and switch_root does not succeed.

This patch checks for existance not only in the symlink case.


No differences found