chiark / gitweb /
libudev: GPL -> LGPL
[elogind.git] / udev / lib / libudev.c
index fcb784580b3d0579bc59619fbbc4562acd5a6439..2177e5459c5ed016b5388cec95396b2c09570e66 100644 (file)
@@ -3,18 +3,10 @@
  *
  * Copyright (C) 2008 Kay Sievers <kay.sievers@vrfy.org>
  *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  */
 
 #include <stdio.h>
@@ -85,7 +77,7 @@ void udev_set_userdata(struct udev *udev, void *userdata)
  * Create udev library context.
  *
  * The initial refcount is 1, and needs to be decremented to
- * release the ressources of the udev library context.
+ * release the resources of the udev library context.
  *
  * Returns: a new udev library context
  **/
@@ -230,13 +222,13 @@ struct udev *udev_new(void)
 
        if (udev->dev_path == NULL || udev->sys_path == NULL)
                goto err;
-       info(udev, "context %p created\n", udev);
-       info(udev, "log_priority=%d\n", udev->log_priority);
-       info(udev, "config_file='%s'\n", config_file);
-       info(udev, "dev_path='%s'\n", udev->dev_path);
-       info(udev, "sys_path='%s'\n", udev->sys_path);
+       dbg(udev, "context %p created\n", udev);
+       dbg(udev, "log_priority=%d\n", udev->log_priority);
+       dbg(udev, "config_file='%s'\n", config_file);
+       dbg(udev, "dev_path='%s'\n", udev->dev_path);
+       dbg(udev, "sys_path='%s'\n", udev->sys_path);
        if (udev->rules_path != NULL)
-               info(udev, "rules_path='%s'\n", udev->rules_path);
+               dbg(udev, "rules_path='%s'\n", udev->rules_path);
        free(config_file);
        return udev;
 err:
@@ -267,7 +259,7 @@ struct udev *udev_ref(struct udev *udev)
  * @udev: udev library context
  *
  * Drop a reference of the udev library context. If the refcount
- * reaches zero, the ressources of the context will be released.
+ * reaches zero, the resources of the context will be released.
  *
  **/
 void udev_unref(struct udev *udev)
@@ -281,7 +273,7 @@ void udev_unref(struct udev *udev)
        free(udev->dev_path);
        free(udev->sys_path);
        free(udev->rules_path);
-       info(udev, "context %p released\n", udev);
+       dbg(udev, "context %p released\n", udev);
        free(udev);
 }
 
@@ -290,9 +282,9 @@ void udev_unref(struct udev *udev)
  * @udev: udev library context
  * @log_fn: function to be called for logging messages
  *
- * The built-in logging, which writes to stderr, it can be
+ * The built-in logging writes to stderr. It can be
  * overridden by a custom function, to plug log messages
- * into the users logging functionality.
+ * into the users' logging functionality.
  *
  **/
 void udev_set_log_fn(struct udev *udev,
@@ -370,7 +362,7 @@ struct udev_list_entry *udev_add_property(struct udev *udev, const char *key, co
                list_entry = udev_get_properties_list_entry(udev);
                list_entry = udev_list_entry_get_by_name(list_entry, key);
                if (list_entry != NULL)
-                       udev_list_entry_remove(list_entry);
+                       udev_list_entry_delete(list_entry);
                return NULL;
        }
        return udev_list_entry_add(udev, &udev->properties_list, key, value, 1, 0);