[Nagiosplug-checkins] CVS: nagiosplug/plugins check_disk.c,1.7.2.3,1.7.2.4

Ton Voon tonvoon at users.sourceforge.net
Tue Jul 1 02:28:15 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv9693

Modified Files:
      Tag: r1_3_0
	check_disk.c 
Log Message:
Fix for large filesystems > 3TB (Stuart Webster)


Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -C2 -r1.7.2.3 -r1.7.2.4
*** check_disk.c	25 Jun 2003 12:38:37 -0000	1.7.2.3
--- check_disk.c	1 Jul 2003 09:27:56 -0000	1.7.2.4
***************
*** 42,46 ****
  int process_arguments (int, char **);
  int validate_arguments (void);
! int check_disk (int usp, int free_disk);
  void print_help (void);
  void print_usage (void);
--- 42,46 ----
  int process_arguments (int, char **);
  int validate_arguments (void);
! int check_disk (int usp, float free_disk);
  void print_help (void);
  void print_usage (void);
***************
*** 63,69 ****
  {
  	int usp = -1;
! 	int total_disk = -1;
! 	int used_disk = -1;
! 	int free_disk = -1;
  	int result = STATE_UNKNOWN;
  	int disk_result = STATE_UNKNOWN;
--- 63,69 ----
  {
  	int usp = -1;
! 	float total_disk = -1;
! 	float used_disk = -1;
! 	float free_disk = -1;
  	int result = STATE_UNKNOWN;
  	int disk_result = STATE_UNKNOWN;
***************
*** 102,108 ****
  			continue;
  
! 		if (sscanf (input_buffer, "%s %d %d %d %d%% %s", file_system,
  		     &total_disk, &used_disk, &free_disk, &usp, mntp) == 6 ||
! 		    sscanf (input_buffer, "%s %*s %d %d %d %d%% %s", file_system,
  				 &total_disk, &used_disk, &free_disk, &usp, mntp) == 6) {
  
--- 102,108 ----
  			continue;
  
! 		if (sscanf (input_buffer, "%s %f %f %f %d%% %s", file_system,
  		     &total_disk, &used_disk, &free_disk, &usp, mntp) == 6 ||
! 		    sscanf (input_buffer, "%s %*s %f %f %f %d%% %s", file_system,
  				 &total_disk, &used_disk, &free_disk, &usp, mntp) == 6) {
  
***************
*** 123,127 ****
  
  			if (disk_result!=STATE_OK || verbose>=0) 
! 				asprintf (&output, "%s [%d kB (%d%%) free on %s]", output,
  				          free_disk, 100 - usp, display_mntp ? mntp : file_system);
  
--- 123,127 ----
  
  			if (disk_result!=STATE_OK || verbose>=0) 
! 				asprintf (&output, "%s [%.0f kB (%d%%) free on %s]", output,
  				          free_disk, 100 - usp, display_mntp ? mntp : file_system);
  
***************
*** 318,322 ****
  
  int
! check_disk (usp, free_disk)
  {
  	int result = STATE_UNKNOWN;
--- 318,322 ----
  
  int
! check_disk (int usp, float free_disk)
  {
  	int result = STATE_UNKNOWN;





More information about the Commits mailing list