1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00
Commit Graph

290 Commits

Author SHA1 Message Date
b721056e04 Add generic function to read /dev/urandom, used in uuid calculation. 2008-12-07 04:23:37 +00:00
f302d21406 cleaner const char* usage for last_path_component() 2008-11-12 09:53:33 +00:00
0499fb88d6 removed redundant redeclaration of init_indent() and init_msg_prefix() from lvm-logging.h 2008-11-12 09:41:44 +00:00
7314bc1d45 no need for libdevmapper.h on system any more 2008-11-10 21:25:45 +00:00
3e5b6ed214 more tweaking to get things to compile - dmlib.h for log fns, list.h 2008-11-03 18:59:59 +00:00
0782ad5002 further progress 2008-11-01 02:19:19 +00:00
04f06bc91c autoreconf 2008-10-31 22:34:42 +00:00
fcc5d4434a separate lvm-globals 2008-10-30 17:40:00 +00:00
cf66732d19 Separate out globals from the logging code. 2008-10-30 17:39:00 +00:00
84b9ec9733 Split out lvm-logging.h from log.h. 2008-10-30 17:27:28 +00:00
68f2de6d4a Add usrlibdir & usrsbindir to configure. 2008-10-07 19:11:59 +00:00
bc9481770a remove now-redundant slash-stripping 2008-07-31 15:38:52 +00:00
2d415cf9f8 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
d0191583e8 Begin syncing configure.in for merge/unification with device-mapper. 2008-06-13 14:37:18 +00:00
d4ce89d9da 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
67cdbd7e4d Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
1995c9ffb5 Build changes to replace fsadm C program with shell script. 2007-12-17 12:23:24 +00:00
4df0c15074 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
dfef7f6942 Add %PVS extents option to lvresize, lvextend, and lvcreate. 2007-09-20 21:39:08 +00:00
21bc366486 Clean up numerous compiler warnings that crept in recently.
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
be6845999b Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
7a197a6220 Update to use autoconf 2.61, while still supporting 2.57. 2007-08-14 19:11:31 +00:00
b58a94fed4 Don't leak a file descriptor in fcntl_lock_file(), when fcntl fails. 2007-07-28 15:20:36 +00:00
941e4f5567 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
1a5d6bd23d 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
622703467c Fix compilation warning in util.c. 2007-07-23 10:41:19 +00:00
6c35e3c84c 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
bbcd24607c 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
c93e6b5f79 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
1bf5aae913 Change some #include lines to search only standard system directories. 2007-04-27 17:46:16 +00:00
4f2f566b06 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
15309c57bd Add count_chars and count_chars_len functions, two
generic string utility functions.

--
2007-04-25 18:24:19 +00:00
87cec8eb5e 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
2e1b92e3ea 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
c1c16a8f01 Protect .cache manipulations with fcntl locking.
Change .cache timestamp comparisons to use ctime.
2006-11-04 03:34:10 +00:00
1e2f720a76 remove unused variable 2006-10-12 17:18:40 +00:00
8b1a3214b5 Add timestamp functions with --disable-realtime configure option. [AJ] 2006-09-30 20:02:02 +00:00
a45da5f676 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
0550c1b618 Move lvm_snprintf into libdevmapper. 2006-08-21 12:54:53 +00:00
7d7736b7b4 Add dm_split_words() and dm_split_lvm_name() to libdevmapper. 2006-08-21 12:07:03 +00:00
10eb720306 wrappers files 2006-08-17 19:56:28 +00:00
916490f8bf Add lvm_getpagesize wrapper. 2006-08-17 18:23:44 +00:00
f2f8855b76 add dlerror to another error path 2006-07-05 17:26:36 +00:00
0b431b8a17 Use RTLD_GLOBAL when loading shared libraries. 2006-07-04 19:40:27 +00:00
2293567c8c Fix lvcreate corelog validation.
Add --config for overriding most config file settings from cmdline.
  Quote arguments when printing command line.
  Remove linefeed from 'initialising logging' message.
  Add 'Completed' debug message.
  Don't attempt library exit after reloading config files.
  Always compile with libdevmapper, even if device-mapper is disabled.
2006-05-16 16:48:31 +00:00
324d0b9742 not reqd 2006-05-12 19:44:42 +00:00
72b2cb613a Make SIZE_SHORT the default for display_size().
Fix some memory leaks in error paths found by coverity.
Use C99 struct initialisers.
Move DEFS into configure.h.
Clean-ups to remove miscellaneous compiler warnings.
2006-05-09 21:23:51 +00:00
2f1489a673 Fix activation code to check for pre-existing mirror logs. 2006-04-28 17:01:07 +00:00
8a2fc58645 Check for libsepol.
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
1a01b0c103 Suppress locking library load failure message if --ignorelockingfailure. 2006-04-03 18:43:55 +00:00