- struct sysfs_class_device *class_dev;
- char *devpath;
- char path[SYSFS_PATH_MAX];
- char temp[NAME_SIZE];
- struct udevice udev;
- char *subsystem = NULL;
+ int force = 0;
+ const char *action = "add";
+ const char *subsystem = NULL;
+ const char *devpath = NULL;
+ struct udevice *udev;
+ struct sysfs_device *dev;
+ struct udev_rules rules = {};
+ int retval;
+ int rc = 0;
+
+ static const struct option options[] = {
+ { "action", 1, NULL, 'a' },
+ { "subsystem", 1, NULL, 's' },
+ { "force", 0, NULL, 'f' },
+ { "help", 0, NULL, 'h' },
+ {}
+ };