1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Make the libdevmapper version of create_dir equivalent to the LVM2 one.

(_create_dir_recursive): Refrain from logging a mkdir failure due to EROFS.
Patch by Jun'ichi Nomura.
This commit is contained in:
Jim Meyering 2007-07-28 10:27:34 +00:00
parent 87518d850b
commit 1c200869d9
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.22 -
================================
Don't log mkdir fail-with-EROFS, to make create_dir equiv to the one in LVM2
Introduce and use log_sys_* macros from LVM2
dm_fclose: new function
libdevmapper, dmeventd: be paranoid about detecting write failure

View File

@ -33,7 +33,8 @@ static int _create_dir_recursive(const char *dir)
if (*orig) {
rc = mkdir(orig, 0777);
if (rc < 0 && errno != EEXIST) {
log_sys_error("mkdir", orig);
if (errno != EROFS)
log_sys_error("mkdir", orig);
goto out;
}
}
@ -43,7 +44,8 @@ static int _create_dir_recursive(const char *dir)
/* Create final directory */
rc = mkdir(dir, 0777);
if (rc < 0 && errno != EEXIST) {
log_sys_error("mkdir", orig);
if (errno != EROFS)
log_sys_error("mkdir", orig);
goto out;
}