summaryrefslogtreecommitdiff
path: root/udevdb.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2003-11-24 22:27:17 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:03 -0700
commitf7b4eca455c7dbf850d984892756f22dbd9ddc3d (patch)
tree55488d985521e5b05f47ff4847b52e0fcbae3fa5 /udevdb.c
parent74894b53f8f9f4de6f269a5c0c0f8ea03baa1587 (diff)
[PATCH] overall whitespace + debug text conditioning
01-overall-whitespace+debug-text-conditioning.diff o cleanup whitespace o clarify a few comments o enclose all printed debug string values in ''
Diffstat (limited to 'udevdb.c')
-rw-r--r--udevdb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/udevdb.c b/udevdb.c
index ec67a07962..e0bd39e84b 100644
--- a/udevdb.c
+++ b/udevdb.c
@@ -54,7 +54,7 @@ int udevdb_add_dev(const char *path, const struct udevice *dev)
strcpy(keystr, path);
key.dptr = keystr;
key.dsize = strlen(keystr) + 1;
-
+
data.dptr = (void *)dev;
data.dsize = sizeof(*dev);
@@ -79,7 +79,7 @@ struct udevice *udevdb_get_dev(const char *path)
dev = malloc(sizeof(*dev));
if (dev == NULL)
goto exit;
-
+
memcpy(dev, data.dptr, sizeof(*dev));
exit:
free(data.dptr);
@@ -99,7 +99,7 @@ int udevdb_delete_dev(const char *path)
key.dptr = keystr;
key.dsize = strlen(keystr) + 1;
-
+
return tdb_delete(udevdb, key);
}
@@ -116,8 +116,8 @@ void udevdb_exit(void)
/**
* udevdb_init: initializes database
- * @init_flag: database can either be in memory - UDEVDB_INTERNAL - or
- * written to a file with UDEVDB_DEFAULT.
+ * @init_flag: UDEVDB_INTERNAL - database stays in memory
+ * UDEVDB_DEFAULT - database is written to a file
*/
int udevdb_init(int init_flag)
{
@@ -127,9 +127,9 @@ int udevdb_init(int init_flag)
udevdb = tdb_open(udev_db_filename, 0, init_flag, O_RDWR | O_CREAT, 0644);
if (udevdb == NULL) {
if (init_flag == UDEVDB_INTERNAL)
- dbg("Unable to initialize in-memory database");
+ dbg("unable to initialize in-memory database");
else
- dbg("Unable to initialize database at %s", udev_db_filename);
+ dbg("unable to initialize database at '%s'", udev_db_filename);
return -EINVAL;
}
return 0;