- /* we only care about class devices and block stuff */
- if (!strstr(devpath, "class") &&
- !strstr(devpath, "block")) {
- dbg("not a block or class device");
- goto exit;
+int main(int argc, char *argv[], char *envp[])
+{
+ int force = 0;
+ char *action = "add";
+ struct udev_rules rules = {};
+ char *devpath = NULL;
+ struct udevice *udev;
+ struct sysfs_device *dev;
+ int retval;
+ int rc = 0;
+
+ static const struct option options[] = {
+ { "action", 1, NULL, 'a' },
+ { "force", 0, NULL, 'f' },
+ { "help", 0, NULL, 'h' },
+ {}
+ };
+
+ info("version %s", UDEV_VERSION);
+ udev_config_init();
+ if (udev_log_priority < LOG_INFO) {
+ char priority[32];
+
+ udev_log_priority = LOG_INFO;
+ sprintf(priority, "%i", udev_log_priority);
+ setenv("UDEV_LOG", priority, 1);