/* 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>
#include <unistd.h>
#include "string-util.h"
-#include "udev-util.h"
#include "udev.h"
#include "udevadm-util.h"
, 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";
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;
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;
printf("run: '%s'\n", program);
}
out:
- udev_builtin_exit(udev);
+ udev_builtin_exit();
return rc;
}