diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 2ca8827..2166edb 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -20,7 +20,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <getopt.h>
 #include <errno.h>
 #include <sys/klog.h>
 
@@ -28,71 +27,53 @@
 
 int dmesg_main(int argc, char **argv)
 {
-	char *buf
-#ifdef CONFIG_FEATURE_CLEAN_UP
-		= NULL
-#endif
-		;
+	char *buf, *tmp;
 	int bufsize = 8196;
-	int i, n;
-	int level = 0;
-	int lastc;
-	int cmd = 3;
+	int i, n = 0;
+	int c = 3;
 
-	while ((i = getopt(argc, argv, "cn:s:")) > 0) {
-		switch (i) {
-			case 'c':
-				cmd = 4;
-				break;
-			case 'n':
-				cmd = 8;
-				level = bb_xgetlarg(optarg, 10, 0, 10);
-				break;
-			case 's':
+	i = bb_getopt_ulflags(argc, argv, "cn:s:", &buf, &tmp);
+	if (i & 1)
+				c = 4;
+	if (i & 2) {
+				c = 8;
+				n = bb_xgetlarg(buf, 10, 0, 10);
+	}
+	if (i & 4)
 				/* I think a 512k max kernel ring buffer is big enough for
 				 * anybody, as the default is 16k...  Could be wrong though.
 				 * If so I'm sure I'll hear about it by the enraged masses*/
-				bufsize = bb_xgetlarg(optarg, 10, 4096, 512*1024);
-				break;
-			default:
-				bb_show_usage();
-		}
-	}
+				bufsize = bb_xgetlarg(tmp, 10, 4096, 512*1024);
 
-	if (optind < argc) {
-		bb_show_usage();
-	}
-
-	if (cmd == 8) {
-		if (klogctl(cmd, NULL, level) < 0)
+	if (c == 8) {
+		if (klogctl(c, NULL, n) < 0)
 			goto die_the_death;
 		goto all_done;
 	}
 
 	buf = xmalloc(bufsize);
-	if ((n = klogctl(cmd, buf, bufsize)) < 0)
+	if ((n = klogctl(c, buf, bufsize)) < 0)
 		goto die_the_death;
 
-	lastc = '\n';
+	c = '\n';
 	for (i = 0; i < n; i++) {
-		if (lastc == '\n' && buf[i] == '<') {
+		if (c == '\n' && buf[i] == '<') {
 			i++;
 			while (buf[i] >= '0' && buf[i] <= '9')
 				i++;
 			if (buf[i] == '>')
 				i++;
 		}
-		lastc = buf[i];
-		putchar(lastc);
+		c = buf[i];
+		putchar(c);
 	}
-	if (lastc != '\n')
+	if (c != '\n')
 		putchar('\n');
 all_done:
-#ifdef CONFIG_FEATURE_CLEAN_UP
-	if (buf) {
+	if (ENABLE_FEATURE_CLEAN_UP) {
 		free(buf);
 	}
-#endif
+
 	return EXIT_SUCCESS;
 die_the_death:
 	bb_perror_nomsg_and_die();
