usage
This commit is contained in:
		@@ -306,6 +306,18 @@ int forwardMinuteBuffer(t_forwarderHandle *handle, t_minuteBuffer *buf) {
 | 
				
			|||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void usage() {
 | 
				
			||||||
 | 
					    printf("sinkserver for mainsfrequency counter\n");
 | 
				
			||||||
 | 
					    printf("https://home.hottis.de/gitlab/wolutator/mains-frequency-counter-stm32\n");
 | 
				
			||||||
 | 
					    printf("Version: " VERSION "\n");
 | 
				
			||||||
 | 
					    printf("\nUsage\n");
 | 
				
			||||||
 | 
					    printf("  -f FILENAME R..... Config file to be used\n");
 | 
				
			||||||
 | 
					    printf("  -v ............... Verbose, writes all logging on stdout too\n");
 | 
				
			||||||
 | 
					    printf("  -s FACILITY ...... Sets syslog facility, only LOCAL[0..7]\n");
 | 
				
			||||||
 | 
					    printf("                     USER and DAEMON are supported\n");
 | 
				
			||||||
 | 
					    printf("  -h ............... This help\n");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(int argc, char **argv) {
 | 
					int main(int argc, char **argv) {
 | 
				
			||||||
    t_configHandle configHandle;
 | 
					    t_configHandle configHandle;
 | 
				
			||||||
    t_forwarderHandle forwarderHandle;
 | 
					    t_forwarderHandle forwarderHandle;
 | 
				
			||||||
@@ -327,15 +339,7 @@ int main(int argc, char **argv) {
 | 
				
			|||||||
                setfacility(optarg);
 | 
					                setfacility(optarg);
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            case 'h':
 | 
					            case 'h':
 | 
				
			||||||
                printf("sinkserver for mainsfrequency counter\n");
 | 
					                usage();
 | 
				
			||||||
                printf("https://home.hottis.de/gitlab/wolutator/mains-frequency-counter-stm32\n");
 | 
					 | 
				
			||||||
                printf("Version: " VERSION "\n");
 | 
					 | 
				
			||||||
                printf("\nUsage\n");
 | 
					 | 
				
			||||||
                printf("  -f FILENAME R..... Config file to be used\n");
 | 
					 | 
				
			||||||
                printf("  -v ............... Verbose, writes all logging on stdout too\n");
 | 
					 | 
				
			||||||
                printf("  -s FACILITY ...... Sets syslog facility, only LOCAL[0..7]\n");
 | 
					 | 
				
			||||||
                printf("                     USER and DAEMON are supported\n");
 | 
					 | 
				
			||||||
                printf("  -h ............... This help\n");
 | 
					 | 
				
			||||||
                exit(0);
 | 
					                exit(0);
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -374,4 +378,5 @@ int main(int argc, char **argv) {
 | 
				
			|||||||
    deinitForwarder(&forwarderHandle);
 | 
					    deinitForwarder(&forwarderHandle);
 | 
				
			||||||
    deinitReceiver(&receiverHandle);
 | 
					    deinitReceiver(&receiverHandle);
 | 
				
			||||||
    deinitConfig(&configHandle);
 | 
					    deinitConfig(&configHandle);
 | 
				
			||||||
 | 
					    free(configFilename);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user