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:
parent
87518d850b
commit
1c200869d9
@ -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
|
||||
|
@ -33,6 +33,7 @@ static int _create_dir_recursive(const char *dir)
|
||||
if (*orig) {
|
||||
rc = mkdir(orig, 0777);
|
||||
if (rc < 0 && errno != EEXIST) {
|
||||
if (errno != EROFS)
|
||||
log_sys_error("mkdir", orig);
|
||||
goto out;
|
||||
}
|
||||
@ -43,6 +44,7 @@ static int _create_dir_recursive(const char *dir)
|
||||
/* Create final directory */
|
||||
rc = mkdir(dir, 0777);
|
||||
if (rc < 0 && errno != EEXIST) {
|
||||
if (errno != EROFS)
|
||||
log_sys_error("mkdir", orig);
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user