Index: uspace/app/usbinfo/main.c
===================================================================
--- uspace/app/usbinfo/main.c	(revision 3100ebe441ce5d61eca2e0863425293b7564eb1e)
+++ uspace/app/usbinfo/main.c	(revision 81ca2044fc8ece8a458baa4b4bb7520a019fd9ea)
@@ -130,4 +130,12 @@
 }
 
+static struct option long_options[] = {
+	{"help", no_argument, NULL, 'h'},
+	{"identification", no_argument, NULL, 'i'},
+	{"match-ids", no_argument, NULL, 'm'},
+	{0, 0, NULL, 0}
+};
+static const char *short_options = "him";
+
 int main(int argc, char *argv[])
 {
@@ -137,10 +145,39 @@
 	}
 
+	bool action_print_short_identification = false;
+	bool action_print_match_ids = false;
+
 	/*
 	 * Process command-line options. They determine what shall be
 	 * done with the device.
 	 */
-
-	/* TODO */
+	int opt;
+	do {
+		opt = getopt_long(argc, argv,
+		    short_options, long_options, NULL);
+		switch (opt) {
+			case -1:
+				break;
+			case '?':
+				print_usage(argv[0]);
+				return 1;
+			case 'h':
+				print_usage(argv[0]);
+				return 0;
+			case 'i':
+				action_print_short_identification = true;
+				break;
+			case 'm':
+				action_print_match_ids = true;
+				break;
+			default:
+				break;
+		}
+	} while (opt > 0);
+
+	/* Set the default action. */
+	if (!action_print_match_ids && !action_print_short_identification) {
+		action_print_short_identification = true;
+	}
 
 	/*
@@ -149,5 +186,5 @@
 	 */
 	int i;
-	for (i = 1; i < argc; i++) {
+	for (i = optind; i < argc; i++) {
 		char *devpath = argv[i];
 
@@ -170,10 +207,12 @@
 
 		/* Run actions the user specified. */
-		/* TODO */
-
-
 		printf("%s\n", devpath);
-		dump_short_device_identification(dev);
-		dump_device_match_ids(dev);
+
+		if (action_print_short_identification) {
+			dump_short_device_identification(dev);
+		}
+		if (action_print_match_ids) {
+			dump_device_match_ids(dev);
+		}
 
 		/* Destroy the control pipe (close the session etc.). */
