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 virtio-ports rule to use $attr instead of $ATTR
[elogind.git]
/
libudev
/
libudev.c
diff --git
a/libudev/libudev.c
b/libudev/libudev.c
index d197ba7b1930ab9cac59e928ab82a56bc6537a28..411e9aec8b5f12336a4125ce7fb7de85ffb8e708 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 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2008
-2009
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
@@
-21,10
+21,18
@@
#include "libudev.h"
#include "libudev-private.h"
#include "libudev.h"
#include "libudev-private.h"
+/**
+ * SECTION:libudev
+ * @short_description: libudev context
+ *
+ * The context contains the default values read from the udev config file,
+ * and is passed to all library operations.
+ */
+
/**
* udev:
*
/**
* udev:
*
- *
Library context, passed to all operations
.
+ *
Opaque object representing the library context
.
*/
struct udev {
int refcount;
*/
struct udev {
int refcount;
@@
-37,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,
@@
-114,8
+121,7
@@
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(UDEV_PREFIX "/dev");
+ udev->dev_path = strdup("/dev");
udev->sys_path = strdup("/sys");
config_file = strdup(SYSCONFDIR "/udev/udev.conf");
if (udev->dev_path == NULL ||
udev->sys_path = strdup("/sys");
config_file = strdup(SYSCONFDIR "/udev/udev.conf");
if (udev->dev_path == NULL ||
@@
-132,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);
@@
-319,7
+321,7
@@
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 prior
t
ity is read from the udev config file
+ * The initial syslog priority is read from the udev config file
* at startup.
*
* Returns: the current syslog priority
* at startup.
*
* Returns: the current syslog priority
@@
-351,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