Index: superiotool.c
===================================================================
--- superiotool.c	(revision 2817)
+++ superiotool.c	(working copy)
@@ -169,10 +169,18 @@
 		       port, inb(port), inb(port + 1));
 }
 
+void print_version()
+{
+	char tmp[80];
+	strncpy((char *)&tmp,
+		(const char *)&SUPERIOTOOL_VERSION[6],
+		strlen(SUPERIOTOOL_VERSION) - 8);
+	printf("superiotool r%s\n", (char *)&tmp);
+}
+
 int main(int argc, char *argv[])
 {
 	int i, j, opt, option_index;
-	char tmp[80];
 
 	const static struct option long_options[] = {
 		{"dump",		no_argument, NULL, 'd'},
@@ -193,13 +201,11 @@
 			dump_readable = 1;
 			break;
 		case 'V':
+			print_version();
 			verbose = 1;
 			break;
 		case 'v':
-			strncpy((char *)&tmp,
-				(const char *)&SUPERIOTOOL_VERSION[6],
-				strlen(SUPERIOTOOL_VERSION) - 8);
-			printf("superiotool r%s\n", (char *)&tmp);
+			print_version();
 			exit(0);
 			break;
 		case 'h':
Index: superiotool.h
===================================================================
--- superiotool.h	(revision 2817)
+++ superiotool.h	(working copy)
@@ -80,6 +80,7 @@
 		  uint16_t port, uint16_t id);
 void dump_superio_readable(uint16_t port);
 void no_superio_found(const char *vendor, const char *info, uint16_t port);
+void print_version(void);
 
 /* ali.c */
 void probe_idregs_ali(uint16_t port);
