Alasdair Kergon
6f53e4b536
Attempt cleanup in child before execing new binary in exec_cmd()
2009-02-28 00:54:06 +00:00
Alasdair Kergon
e5f7ae3878
fsadm cleanups & release prep
2009-02-27 23:40:11 +00:00
Zdeněk Kabeláč
c4d4403955
Fixed bug where lvresize option -t was not properly passed to fsadm.
...
Using argv[] list in exec_cmd() to allow more params for external commands.
Fsadm does not allow checking mounted filesystem.
Fsadm no longer accepts 'any other key' as 'no' answer to y/n.
Fsadm improved handling of command line options.
2009-02-24 15:48:00 +00:00
Alasdair Kergon
3640dc2fa3
Move tools/version.h to lib/misc/lvm-version.h.
...
Split LVM_VERSION into MAJOR, MINOR, PATCHLEVEL, RELEASE and RELEASE_DATE.
2009-02-22 22:11:58 +00:00
Dave Wysochanski
211b07a2e2
Create global is_static() to eliminate from the library init function.
...
Very simple / crude method of removing 'is_static' from initialization.
Why should we require an application tell us whether it is linked
statically or dynamically to libLVM? If the application is linked
statically, but libraries exist and dlopen() calls succeed, why
do we care if it's statically linked?
2008-12-18 05:27:17 +00:00
Dave Wysochanski
647314d3cc
Make _init_rand() thread safe - use rand_r() instead of rand().
...
Use good entropy for seed value if possible.
2008-12-07 04:27:56 +00:00
Dave Wysochanski
30e6773617
Add generic function to read /dev/urandom, used in uuid calculation.
2008-12-07 04:23:37 +00:00
Zdeněk Kabeláč
1c38ce8245
cleaner const char* usage for last_path_component()
2008-11-12 09:53:33 +00:00
Zdeněk Kabeláč
54d790828f
removed redundant redeclaration of init_indent() and init_msg_prefix() from lvm-logging.h
2008-11-12 09:41:44 +00:00
Alasdair Kergon
98cd400443
no need for libdevmapper.h on system any more
2008-11-10 21:25:45 +00:00
Alasdair Kergon
05329c885a
more tweaking to get things to compile - dmlib.h for log fns, list.h
2008-11-03 18:59:59 +00:00
Alasdair Kergon
ba70dce803
further progress
2008-11-01 02:19:19 +00:00
Alasdair Kergon
e83f71d678
autoreconf
2008-10-31 22:34:42 +00:00
Alasdair Kergon
10857e3321
separate lvm-globals
2008-10-30 17:40:00 +00:00
Alasdair Kergon
85a4e47879
Separate out globals from the logging code.
2008-10-30 17:39:00 +00:00
Alasdair Kergon
759e49f025
Split out lvm-logging.h from log.h.
2008-10-30 17:27:28 +00:00
Alasdair Kergon
be2c03fa96
Add usrlibdir & usrsbindir to configure.
2008-10-07 19:11:59 +00:00
Alasdair Kergon
d30a2653b5
remove now-redundant slash-stripping
2008-07-31 15:38:52 +00:00
Dave Wysochanski
111829da46
Add uninitialized_var macro to suppress invalid compiler warnings.
...
One such warning is seen on fedora9 gcc compiler:
/metadata.c:1923: warning: 'results' may be used uninitialized in this function
2008-06-23 19:04:34 +00:00
Jim Meyering
750f81b4b5
Begin syncing configure.in for merge/unification with device-mapper.
2008-06-13 14:37:18 +00:00
Alasdair Kergon
a109ce1eca
Escape double quotes and backslashes in external metadata and config data.
...
Add functions for escaping double quotes in strings.
Rename count_chars_len to count_chars.
2008-03-12 16:03:22 +00:00
Alasdair Kergon
1ddd4509dc
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Alasdair Kergon
147482ea69
Build changes to replace fsadm C program with shell script.
2007-12-17 12:23:24 +00:00
Jim Meyering
efd83567c9
Fix the fsadm build failure without using -llvm.
...
* lib/misc/util.c (last_path_component): Move definition to ...
* lib/misc/last-path-component.h (last_path_component): ...here.
New file. Make the function "static inline".
* include/.symlinks: Add last-path-component.h.
* lib/misc/util.h (last_path_component): Remove declaration.
* tools/fsadm/fsadm.c: Include "last-path-component.h".
* tools/lvmcmdline.c: Likewise.
Author: Jim Meyering <meyering@redhat.com>
2007-10-03 16:10:04 +00:00
Dave Wysochanski
1bfc4335bb
Add %PVS extents option to lvresize, lvextend, and lvcreate.
2007-09-20 21:39:08 +00:00
Alasdair Kergon
d080291150
Clean up numerous compiler warnings that crept in recently.
...
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
Alasdair Kergon
3f507a26fb
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Alasdair Kergon
fbccd12924
Update to use autoconf 2.61, while still supporting 2.57.
2007-08-14 19:11:31 +00:00
Jim Meyering
38b6963c8b
Don't leak a file descriptor in fcntl_lock_file(), when fcntl fails.
2007-07-28 15:20:36 +00:00
Jim Meyering
7b6248983d
Remove create_dir function; use now-equivalent dm_create_dir instead.
...
* lib/misc/lvm-file.c (_create_dir_recursive, create_dir): Remove functions.
* lib/misc/lvm-file.h (create_dir): Remove declaration.
* lib/commands/toolcontext.c (create_toolcontext): s/create_dir/dm_create_dir/
* lib/format_text/archiver.c (archive, backup): Likewise.
* lib/format_text/format-text.c (_add_dir): Likewise.
* lib/locking/file_locking.c (init_file_locking): Likewise.
Patch by Jun'ichi Nomura.
2007-07-28 12:26:21 +00:00
Jim Meyering
5e84cb560d
Detect stream write failure reliably; new fn: lvm_fclose; use dm_fclose
...
* lib/misc/lvm-file.c (lvm_fclose): New function.
* lib/misc/lvm-file.h (lvm_fclose): Declare it.
* lib/config/config.c (write_config_file): Use the new function to detect
and diagnose unlikely write failure.
* lib/filters/filter-persistent.c (persistent_filter_dump): Likewise.
* lib/format_text/archive.c (archive_vg): Likewise.
* lib/format_text/format-text.c (_vg_write_file): Likewise.
* lib/log/log.c (fin_log): Similar, but use dm_fclose directly.
Include "\n" at end of each fprintf format string.
2007-07-24 17:48:08 +00:00
Milan Broz
5b5caa8a16
Fix compilation warning in util.c.
2007-07-23 10:41:19 +00:00
Jim Meyering
b2cba098bb
Eliminate uses of strdup+basename. Use last_path_component instead.
...
* lib/misc/util.c, lib/misc/util.h (last_path_component): New files.
* lib/Makefile.in (SOURCES): Add misc/util.c.
* lib/misc/lib.h: Include "util.h".
* tools/fsadm/fsadm.c: Include "util.h". (_usage): Use last_path_component,
not basename.
* tools/lvmcmdline.c (_find_command, lvm2_main): Likewise.
* include/.symlinks: Add lib/misc/util.h.
2007-07-20 15:48:39 +00:00
Jim Meyering
1ec0d47f10
Use gcc's printf attribute wherever possible.
...
* daemons/clvmd/clvmd.h (debuglog): Add __attribute__((printf)).
* lib/config/config.c (_line_append): Likewise.
* lib/misc/lvm-string.h (emit_to_buffer): Likewise.
2007-07-20 15:38:19 +00:00
Jim Meyering
fa28cea152
Introduce is_same_inode macro, now including a comparison of st_dev.
...
* lib/misc/lvm-file.h (is_same_inode): Define.
* lib/filters/filter-persistent.c (persistent_filter_dump): Use is_same_inode
in place of a direct st_ino-only comparison.
* lib/locking/file_locking.c (_release_lock, _lock_file): Likewise.
2007-07-20 15:22:46 +00:00
Alasdair Kergon
2294fdb496
Change some #include lines to search only standard system directories.
2007-04-27 17:46:16 +00:00
Alasdair Kergon
dcdbbb3ecb
Add devices/preferred_names config regex list for displayed device names.
...
Free a temporary dir string in fcntl_lock_file() after use.
Fix a dm_pool_destroy() in matcher_create().
Introduce goto_bad macro.
2007-04-26 16:44:59 +00:00
Dave Wysochanski
dd4477406b
Add count_chars and count_chars_len functions, two
...
generic string utility functions.
--
2007-04-25 18:24:19 +00:00
Alasdair Kergon
b05678d8bf
Move .cache file into a new /etc/lvm/cache directory by default.
...
Add devices/cache_dir & devices/cache_file_prefix, deprecating devices/cache.
Create directory in fcntl_lock_file() if required.
2007-02-28 18:27:13 +00:00
Alasdair Kergon
f813d41a76
Add some missing close() and fclose() return code checks.
...
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
6531e88761
Protect .cache manipulations with fcntl locking.
...
Change .cache timestamp comparisons to use ctime.
2006-11-04 03:34:10 +00:00
Alasdair Kergon
48e02f2086
remove unused variable
2006-10-12 17:18:40 +00:00
Alasdair Kergon
4ef1220b16
Add timestamp functions with --disable-realtime configure option. [AJ]
2006-09-30 20:02:02 +00:00
Alasdair Kergon
08e253bed1
lvm.static uses built-in cluster locking instead of external locking.
...
Don't attempt to load shared libraries if built statically.
2006-08-31 22:21:00 +00:00
Alasdair Kergon
b0b60fafd5
Move lvm_snprintf into libdevmapper.
2006-08-21 12:54:53 +00:00
Alasdair Kergon
a93fe79bc4
Add dm_split_words() and dm_split_lvm_name() to libdevmapper.
2006-08-21 12:07:03 +00:00
Alasdair Kergon
36a9a81ff1
wrappers files
2006-08-17 19:56:28 +00:00
Alasdair Kergon
984651d99d
Add lvm_getpagesize wrapper.
2006-08-17 18:23:44 +00:00
Alasdair Kergon
19a7b4479b
add dlerror to another error path
2006-07-05 17:26:36 +00:00
Alasdair Kergon
0f987d2982
Use RTLD_GLOBAL when loading shared libraries.
2006-07-04 19:40:27 +00:00