]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/udev/udevadm-test.c
udev: drop unused udev struct
[thirdparty/systemd.git] / src / udev / udevadm-test.c
index cca49b2cccca3ff94f80c80933f14f773ba65386..b27f82cfc61d223735ef3f3f419304987192b0fd 100644 (file)
@@ -1,20 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright (C) 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
- * Copyright (C) 2004-2008 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
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * Copyright © 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
  */
 
 #include <errno.h>
@@ -27,7 +13,6 @@
 #include <unistd.h>
 
 #include "string-util.h"
-#include "udev-util.h"
 #include "udev.h"
 #include "udevadm-util.h"
 
@@ -42,7 +27,7 @@ static void help(void) {
                , program_invocation_short_name);
 }
 
-static int adm_test(struct udev *udev, int argc, char *argv[]) {
+static int adm_test(int argc, char *argv[]) {
         int resolve_names = 1;
         char filename[UTIL_PATH_SIZE];
         const char *action = "add";
@@ -108,9 +93,9 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
 
         sigprocmask(SIG_SETMASK, NULL, &sigmask_orig);
 
-        udev_builtin_init(udev);
+        udev_builtin_init();
 
-        rules = udev_rules_new(udev, resolve_names);
+        rules = udev_rules_new(resolve_names);
         if (rules == NULL) {
                 fprintf(stderr, "error reading rules\n");
                 rc = 3;
@@ -124,7 +109,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
                 strscpy(filename, sizeof(filename), syspath);
         delete_trailing_chars(filename, "/");
 
-        dev = udev_device_new_from_synthetic_event(udev, filename, action);
+        dev = udev_device_new_from_synthetic_event(NULL, filename, action);
         if (dev == NULL) {
                 fprintf(stderr, "unable to open device '%s'\n", filename);
                 rc = 4;
@@ -154,7 +139,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
                 printf("run: '%s'\n", program);
         }
 out:
-        udev_builtin_exit(udev);
+        udev_builtin_exit();
         return rc;
 }