mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +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
9dd7e3fb24
commit
06fe319347
@ -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,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user