Use common's progname functions in ovnisync
This commit adds the progname_get function in common.h header and extends the ovnisync tool to use them
This commit is contained in:
		
							parent
							
								
									3ea89edac7
								
							
						
					
					
						commit
						24252ebbb3
					
				| @ -18,6 +18,12 @@ progname_set(char *name) | ||||
| 	progname = name; | ||||
| } | ||||
| 
 | ||||
| const char * | ||||
| progname_get(void) | ||||
| { | ||||
| 	return progname; | ||||
| } | ||||
| 
 | ||||
| void | ||||
| enable_debug(void) | ||||
| { | ||||
|  | ||||
| @ -11,6 +11,7 @@ extern int is_debug_enabled; | ||||
| /* Debug macros */ | ||||
| 
 | ||||
| void progname_set(char *name); | ||||
| const char *progname_get(void); | ||||
| void enable_debug(void); | ||||
| void verr(const char *prefix, const char *func, const char *errstr, ...); | ||||
| void vdie(const char *prefix, const char *func, const char *errstr, ...); | ||||
|  | ||||
| @ -11,10 +11,9 @@ | ||||
| #include <sys/stat.h> | ||||
| #include <time.h> | ||||
| #include <unistd.h> | ||||
| #include "common.h" | ||||
| #include "ovni.h" | ||||
| 
 | ||||
| const char progname[] = "ovnisync"; | ||||
| 
 | ||||
| struct offset { | ||||
| 	/* All in nanoseconds */ | ||||
| 	double delta_mean; | ||||
| @ -441,6 +440,8 @@ do_work(struct options *options, int rank) | ||||
| int | ||||
| main(int argc, char *argv[]) | ||||
| { | ||||
| 	progname_set("ovnisync"); | ||||
| 
 | ||||
| 	MPI_Init(&argc, &argv); | ||||
| 
 | ||||
| 	int rank; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Kevin Sala
						Kevin Sala