chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libudev: resolve ifindex in udev_device_new_from_id_filename()
[elogind.git]
/
libudev
/
libudev.c
diff --git
a/libudev/libudev.c
b/libudev/libudev.c
index 05b62efd8686f09e6bfbb7eb9b7d47fd0e8b2b7b..cd418709f0336b32468bc8aafc2b079d6c5c7936 100644
(file)
--- a/
libudev/libudev.c
+++ b/
libudev/libudev.c
@@
-1,7
+1,7
@@
/*
* libudev - interface to udev device information
*
/*
* libudev - interface to udev device information
*
- * Copyright (C) 2008-20
09
Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2008-20
10
Kay Sievers <kay.sievers@vrfy.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@
-45,7
+45,6
@@
struct udev {
char *rules_path;
struct udev_list_node properties_list;
int log_priority;
char *rules_path;
struct udev_list_node properties_list;
int log_priority;
- int run;
};
void udev_log(struct udev *udev,
};
void udev_log(struct udev *udev,
@@
-72,7
+71,7
@@
static void log_stderr(struct udev *udev,
* @udev: udev library context
*
* Retrieve stored data pointer from library context. This might be useful
* @udev: udev library context
*
* Retrieve stored data pointer from library context. This might be useful
- * to access from callbacks.
+ * to access from callbacks
like a custom logging function
.
*
* Returns: stored userdata
**/
*
* Returns: stored userdata
**/
@@
-122,7
+121,6
@@
struct udev *udev_new(void)
udev->log_fn = log_stderr;
udev->log_priority = LOG_ERR;
udev_list_init(&udev->properties_list);
udev->log_fn = log_stderr;
udev->log_priority = LOG_ERR;
udev_list_init(&udev->properties_list);
- udev->run = 1;
udev->dev_path = strdup("/dev");
udev->sys_path = strdup("/sys");
config_file = strdup(SYSCONFDIR "/udev/udev.conf");
udev->dev_path = strdup("/dev");
udev->sys_path = strdup("/sys");
config_file = strdup(SYSCONFDIR "/udev/udev.conf");
@@
-140,10
+138,6
@@
struct udev *udev_new(void)
udev_add_property(udev, "SYSFS_PATH", udev->sys_path);
}
udev_add_property(udev, "SYSFS_PATH", udev->sys_path);
}
- env = getenv("UDEV_RUN");
- if (env != NULL && strcmp(env, "0") == 0)
- udev->run = 0;
-
env = getenv("UDEV_CONFIG_FILE");
if (env != NULL) {
free(config_file);
env = getenv("UDEV_CONFIG_FILE");
if (env != NULL) {
free(config_file);
@@
-152,7
+146,7
@@
struct udev *udev_new(void)
}
if (config_file == NULL)
goto err;
}
if (config_file == NULL)
goto err;
- f = fopen(config_file, "r");
+ f = fopen(config_file, "r
e
");
if (f != NULL) {
char line[UTIL_LINE_SIZE];
int line_nr = 0;
if (f != NULL) {
char line[UTIL_LINE_SIZE];
int line_nr = 0;
@@
-327,10
+321,10
@@
void udev_set_log_fn(struct udev *udev,
* udev_get_log_priority:
* @udev: udev library context
*
* udev_get_log_priority:
* @udev: udev library context
*
- * The initial
syslog priort
ity is read from the udev config file
+ * The initial
logging prior
ity is read from the udev config file
* at startup.
*
* at startup.
*
- * Returns: the current
syslo
g priority
+ * Returns: the current
loggin
g priority
**/
int udev_get_log_priority(struct udev *udev)
{
**/
int udev_get_log_priority(struct udev *udev)
{
@@
-340,10
+334,10
@@
int udev_get_log_priority(struct udev *udev)
/**
* udev_set_log_priority:
* @udev: udev library context
/**
* udev_set_log_priority:
* @udev: udev library context
- * @priority: the new
syslo
g priority
+ * @priority: the new
loggin
g priority
*
*
- * Set the current
syslo
g priority. The value controls which messages
- * are
send to syslog
.
+ * Set the current
loggin
g priority. The value controls which messages
+ * are
logged
.
**/
void udev_set_log_priority(struct udev *udev, int priority)
{
**/
void udev_set_log_priority(struct udev *udev, int priority)
{
@@
-359,11
+353,6
@@
const char *udev_get_rules_path(struct udev *udev)
return udev->rules_path;
}
return udev->rules_path;
}
-int udev_get_run(struct udev *udev)
-{
- return udev->run;
-}
-
/**
* udev_get_sys_path:
* @udev: udev library context
/**
* udev_get_sys_path:
* @udev: udev library context