mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +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 -
|
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
|
Introduce and use log_sys_* macros from LVM2
|
||||||
dm_fclose: new function
|
dm_fclose: new function
|
||||||
libdevmapper, dmeventd: be paranoid about detecting write failure
|
libdevmapper, dmeventd: be paranoid about detecting write failure
|
||||||
|
@ -33,6 +33,7 @@ static int _create_dir_recursive(const char *dir)
|
|||||||
if (*orig) {
|
if (*orig) {
|
||||||
rc = mkdir(orig, 0777);
|
rc = mkdir(orig, 0777);
|
||||||
if (rc < 0 && errno != EEXIST) {
|
if (rc < 0 && errno != EEXIST) {
|
||||||
|
if (errno != EROFS)
|
||||||
log_sys_error("mkdir", orig);
|
log_sys_error("mkdir", orig);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -43,6 +44,7 @@ static int _create_dir_recursive(const char *dir)
|
|||||||
/* Create final directory */
|
/* Create final directory */
|
||||||
rc = mkdir(dir, 0777);
|
rc = mkdir(dir, 0777);
|
||||||
if (rc < 0 && errno != EEXIST) {
|
if (rc < 0 && errno != EEXIST) {
|
||||||
|
if (errno != EROFS)
|
||||||
log_sys_error("mkdir", orig);
|
log_sys_error("mkdir", orig);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user