chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix output for USB path
[elogind.git]
/
udev_rules.c
diff --git
a/udev_rules.c
b/udev_rules.c
index 9fa2253e96e59afefc4bce2c73d733ec1583e34c..1aedb111181f79cda426eab7d4914ccf553c3aba 100644
(file)
--- a/
udev_rules.c
+++ b/
udev_rules.c
@@
-290,6
+290,12
@@
static int find_free_number(const char *base, const char *devpath)
char filename[PATH_SIZE];
struct udevice *udev_db;
int num = 0;
char filename[PATH_SIZE];
struct udevice *udev_db;
int num = 0;
+ static int warn = 1;
+
+ if (warn) {
+ err("%%e is deprecated, will be removed and is unlikey to work correctly. Don't use it.");
+ warn = 0;
+ }
/* check if the device already owns a matching name */
udev_db = udev_device_init();
/* check if the device already owns a matching name */
udev_db = udev_device_init();
@@
-616,6
+622,13
@@
found:
case SUBST_MODALIAS:
{
const char *value;
case SUBST_MODALIAS:
{
const char *value;
+ static int warn = 1;
+
+ if (warn) {
+ err("$modalias is deprecated, use $env{MODALIAS} or "
+ "$sysfs{modalias} instead.");
+ warn = 0;
+ }
value = sysfs_attr_get_value(udev->dev->devpath, "modalias");
if (value != NULL) {
value = sysfs_attr_get_value(udev->dev->devpath, "modalias");
if (value != NULL) {
@@
-715,6
+728,12
@@
static int match_rule(struct udevice *udev, struct udev_rule *rule)
if (rule->modalias.operation != KEY_OP_UNSET) {
const char *value;
if (rule->modalias.operation != KEY_OP_UNSET) {
const char *value;
+ static int warn = 1;
+
+ if (warn) {
+ err("MODALIAS is deprecated, use ENV{MODALIAS} or SYSFS{modalias} instead.");
+ warn = 0;
+ }
value = sysfs_attr_get_value(udev->dev->devpath, "modalias");
if (value == NULL) {
value = sysfs_attr_get_value(udev->dev->devpath, "modalias");
if (value == NULL) {