2008-10-30 20:40:00 +03:00
/*
* Copyright ( C ) 2001 - 2004 Sistina Software , Inc . All rights reserved .
2011-02-18 17:11:22 +03:00
* Copyright ( C ) 2004 - 2011 Red Hat , Inc . All rights reserved .
2008-10-30 20:40:00 +03:00
*
* This file is part of LVM2 .
*
* This copyrighted material is made available to anyone wishing to use ,
* modify , copy , or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License v .2 .1 .
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program ; if not , write to the Free Software Foundation ,
* Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
*/
# ifndef _LVM_GLOBALS_H
# define _LVM_GLOBALS_H
# define VERBOSE_BASE_LEVEL _LOG_WARN
# define SECURITY_LEVEL 0
2012-02-01 17:42:18 +04:00
# define PV_MIN_SIZE_KB 512
2008-10-30 20:40:00 +03:00
void init_verbose ( int level ) ;
config: add silent mode
Accept -q as the short form of --quiet.
Suppress non-essential standard output if -q is given twice.
Treat log/silent in lvm.conf as equivalent to -qq.
Review all log_print messages and change some to
log_print_unless_silent.
When silent, the following commands still produce output:
dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
pvs, version, vgcfgrestore -l, vgdisplay, vgs.
[Needs checking.]
Non-essential messages are shifted from log level 4 to log level 5
for syslog and lvm2_log_fn purposes.
2012-08-25 23:35:48 +04:00
void init_silent ( int silent ) ;
2008-10-30 20:40:00 +03:00
void init_test ( int level ) ;
void init_md_filtering ( int level ) ;
void init_pvmove ( int level ) ;
void init_full_scan_done ( int level ) ;
2011-04-22 16:05:32 +04:00
void init_obtain_device_list_from_udev ( int device_list_from_udev ) ;
2008-10-30 20:40:00 +03:00
void init_trust_cache ( int trustcache ) ;
void init_debug ( int level ) ;
2013-01-08 02:25:19 +04:00
void init_debug_classes_logged ( int classes ) ;
2008-10-30 20:40:00 +03:00
void init_cmd_name ( int status ) ;
void init_ignorelockingfailure ( int level ) ;
void init_lockingfailed ( int level ) ;
void init_security_level ( int level ) ;
void init_mirror_in_sync ( int in_sync ) ;
void init_dmeventd_monitor ( int reg ) ;
2010-01-05 23:56:51 +03:00
void init_background_polling ( int polling ) ;
2008-10-30 20:40:00 +03:00
void init_ignore_suspended_devices ( int ignore ) ;
2008-11-03 21:59:59 +03:00
void init_error_message_produced ( int produced ) ;
2008-12-18 08:27:17 +03:00
void init_is_static ( unsigned value ) ;
2010-01-11 18:40:03 +03:00
void init_udev_checking ( int checking ) ;
2010-10-13 19:40:38 +04:00
void init_dev_disable_after_error_count ( int value ) ;
2011-02-18 17:11:22 +03:00
void init_pv_min_size ( uint64_t sectors ) ;
2011-07-01 18:09:19 +04:00
void init_activation_checks ( int checks ) ;
2011-08-11 21:46:13 +04:00
void init_detect_internal_vg_cache_corruption ( int detect ) ;
2011-09-22 21:39:56 +04:00
void init_retry_deactivation ( int retry ) ;
2008-10-30 20:40:00 +03:00
void set_cmd_name ( const char * cmd_name ) ;
2010-08-11 16:14:23 +04:00
void set_sysfs_dir_path ( const char * path ) ;
2008-10-30 20:40:00 +03:00
int test_mode ( void ) ;
int md_filtering ( void ) ;
int pvmove_mode ( void ) ;
int full_scan_done ( void ) ;
2011-04-22 16:05:32 +04:00
int obtain_device_list_from_udev ( void ) ;
2008-10-30 20:40:00 +03:00
int trust_cache ( void ) ;
int verbose_level ( void ) ;
config: add silent mode
Accept -q as the short form of --quiet.
Suppress non-essential standard output if -q is given twice.
Treat log/silent in lvm.conf as equivalent to -qq.
Review all log_print messages and change some to
log_print_unless_silent.
When silent, the following commands still produce output:
dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
pvs, version, vgcfgrestore -l, vgdisplay, vgs.
[Needs checking.]
Non-essential messages are shifted from log level 4 to log level 5
for syslog and lvm2_log_fn purposes.
2012-08-25 23:35:48 +04:00
int silent_mode ( void ) ;
2008-10-30 20:40:00 +03:00
int debug_level ( void ) ;
2013-01-08 02:25:19 +04:00
int debug_class_is_logged ( int class ) ;
2008-10-30 20:40:00 +03:00
int ignorelockingfailure ( void ) ;
int lockingfailed ( void ) ;
int security_level ( void ) ;
int mirror_in_sync ( void ) ;
2010-01-05 23:56:51 +03:00
int background_polling ( void ) ;
2008-10-30 20:40:00 +03:00
int ignore_suspended_devices ( void ) ;
const char * log_command_name ( void ) ;
2008-12-18 08:27:17 +03:00
unsigned is_static ( void ) ;
2010-01-11 18:40:03 +03:00
int udev_checking ( void ) ;
2010-08-11 16:14:23 +04:00
const char * sysfs_dir_path ( void ) ;
2011-02-18 17:11:22 +03:00
uint64_t pv_min_size ( void ) ;
2011-07-01 18:09:19 +04:00
int activation_checks ( void ) ;
2011-08-11 21:46:13 +04:00
int detect_internal_vg_cache_corruption ( void ) ;
2011-09-22 21:39:56 +04:00
int retry_deactivation ( void ) ;
2008-10-30 20:40:00 +03:00
# define DMEVENTD_MONITOR_IGNORE -1
int dmeventd_monitor_mode ( void ) ;
2010-10-13 19:40:38 +04:00
# define NO_DEV_ERROR_COUNT_LIMIT 0
int dev_disable_after_error_count ( void ) ;
2008-10-30 20:40:00 +03:00
# endif