chiark / gitweb /
udev: link-config - sanity check the ifname and mac address
[elogind.git] / src / udev / udevadm.c
index 818edee38f1ecd53553c423e7e9b2659c4d2dce4..e14b3ca27c0248f9c063a38f13e65f1e872a7846 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2007-2012 Kay Sievers <kay@vrfy.org>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -56,6 +56,7 @@ static const struct udevadm_cmd *udevadm_cmds[] = {
         &udevadm_settle,
         &udevadm_control,
         &udevadm_monitor,
+        &udevadm_hwdb,
         &udevadm_test,
         &udevadm_test_builtin,
         &udevadm_version,
@@ -130,9 +131,10 @@ int main(int argc, char *argv[])
 
         if (command != NULL)
                 for (i = 0; i < ELEMENTSOF(udevadm_cmds); i++) {
-                        if (strcmp(udevadm_cmds[i]->name, command) == 0) {
+                        if (streq(udevadm_cmds[i]->name, command)) {
                                 argc -= optind;
                                 argv += optind;
+                                /* we need '0' here to reset the internal state */
                                 optind = 0;
                                 rc = run_command(udev, udevadm_cmds[i], argc, argv);
                                 goto out;