1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Export dm_create_dir (was create_dir) to help fix LVM2 link error

* lib/libdm-file.c (dm_create_dir): Rename from create_dir.
* lib/libdevmapper.h (dm_create_dir): Declare.
* lib/.exported_symbols: Add dm_create_dir.
* lib/ioctl/libdm-iface.c (_create_control): Update sole use.
Patch by Jun'ichi Nomura.  Details in
http://www.redhat.com/archives/lvm-devel/2007-July/msg00040.html
This commit is contained in:
Jim Meyering 2007-07-28 10:48:36 +00:00
parent 06fe319347
commit 4d418dee0e
5 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.22 -
================================
Export dm_create_dir (was create_dir) to help fix LVM2 link error
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

View File

@ -1,6 +1,7 @@
dm_lib_release
dm_lib_exit
dm_driver_version
dm_create_dir
dm_fclose
dm_get_library_version
dm_log

View File

@ -225,7 +225,7 @@ static int _create_control(const char *control, uint32_t major, uint32_t minor)
return 0;
old_umask = umask(0022);
ret = create_dir(dm_dir());
ret = dm_create_dir(dm_dir());
umask(old_umask);
if (!ret)

View File

@ -628,6 +628,12 @@ char *dm_basename(const char *path);
* file/stream manipulation
**************************/
/*
* Create a directory (with parent directories if necessary).
* Returns 1 on success, 0 on failure.
*/
int dm_create_dir(const char *dir);
/*
* Close a stream, with nicer error checking than fclose's.
* Derived from gnulib's close-stream.c.

View File

@ -55,7 +55,7 @@ out:
return r;
}
int create_dir(const char *dir)
int dm_create_dir(const char *dir)
{
struct stat info;