chiark / gitweb /
[PATCH] rename udevdb* to udev_db*
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Fri, 12 Nov 2004 05:32:19 +0000 (06:32 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:25:14 +0000 (22:25 -0700)
Makefile
dev_d.c
namedev.c
udev.c
udev_add.c
udev_db.c [moved from udevdb.c with 94% similarity]
udev_db.h [moved from udevdb.h with 71% similarity]
udev_remove.c
udevinfo.c
udevtest.c

index 50c7227..09b74fc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -210,7 +210,7 @@ OBJS =      udev_lib.o      \
        udev_add.o      \
        udev_remove.o   \
        udev_sysfs.o    \
-       udevdb.o        \
+       udev_db.o       \
        namedev.o       \
        namedev_parse.o \
        dev_d.o         \
@@ -220,7 +220,7 @@ HEADERS =   udev.h          \
                udev_lib.h      \
                namedev.h       \
                udev_version.h  \
-               udevdb.h        \
+               udev_db.h       \
                udev_sysfs.h    \
                logging.h       \
                selinux.h       \
@@ -292,7 +292,7 @@ $(TESTER): $(LIBC) $(TESTER).o $(OBJS) $(HEADERS)
        $(QUIET) $(STRIPCMD) $@
 
 $(INFO): $(LIBC) $(INFO).o $(OBJS) $(HEADERS)
-       $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_lib.o udev_config.o udevdb.o $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+       $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_lib.o udev_config.o udev_db.o $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
        $(QUIET) $(STRIPCMD) $@
 
 $(DAEMON): $(LIBC) $(DAEMON).o $(OBJS) udevd.h
diff --git a/dev_d.c b/dev_d.c
index b3d05d9..d14c70c 100644 (file)
--- a/dev_d.c
+++ b/dev_d.c
@@ -29,7 +29,6 @@
 
 #include "udev.h"
 #include "udev_lib.h"
-#include "udevdb.h"
 #include "logging.h"
 
 static int run_program(const char *filename, void *data)
index 9c94e69..3ab45d4 100644 (file)
--- a/namedev.c
+++ b/namedev.c
@@ -40,7 +40,7 @@
 #include "udev_version.h"
 #include "logging.h"
 #include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
 
 static struct sysfs_attribute *find_sysfs_attribute(struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device, char *attr);
 
@@ -194,7 +194,7 @@ static int find_free_number(struct udevice *udev, const char *name)
        while (1) {
                dbg("look for existing node '%s'", filename);
                memset(&db_udev, 0x00, sizeof(struct udevice));
-               if (udevdb_get_dev_byname(&db_udev, filename) != 0) {
+               if (udev_db_get_device_byname(&db_udev, filename) != 0) {
                        dbg("free num=%d", num);
                        return num;
                }
diff --git a/udev.c b/udev.c
index bb3385e..a41f222 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -34,9 +34,8 @@
 #include "udev_lib.h"
 #include "udev_sysfs.h"
 #include "udev_version.h"
-#include "logging.h"
 #include "namedev.h"
-#include "udevdb.h"
+#include "logging.h"
 
 
 #ifdef LOG
index c139bd3..4fb5ef1 100644 (file)
@@ -42,7 +42,7 @@
 #include "udev_version.h"
 #include "logging.h"
 #include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
 
 #include "selinux.h"
 
@@ -303,8 +303,8 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
                if (retval != 0)
                        goto exit;
 
-               if (udevdb_add_dev(udev) != 0)
-                       dbg("udevdb_add_dev failed, but we create the node anyway, "
+               if (udev_db_add_device(udev) != 0)
+                       dbg("udev_db_add_dev failed, but we create the node anyway, "
                            "remove might not work for custom names");
 
                /* use full path to the environment */
similarity index 94%
rename from udevdb.c
rename to udev_db.c
index 38830b0..f2a890e 100644 (file)
--- a/udevdb.c
+++ b/udev_db.c
@@ -1,5 +1,5 @@
 /*
- * udevdb.c
+ * udev_db.c
  *
  * Userspace devfs
  *
@@ -35,7 +35,7 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "logging.h"
-#include "udevdb.h"
+#include "udev_db.h"
 
 #define PATH_TO_NAME_CHAR              '@'
 
@@ -57,7 +57,7 @@ static int get_db_filename(struct udevice *udev, char *filename, int len)
        return 0;
 }
 
-int udevdb_add_dev(struct udevice *udev)
+int udev_db_add_device(struct udevice *udev)
 {
        char filename[SYSFS_PATH_MAX];
        FILE *f;
@@ -135,7 +135,7 @@ static int parse_db_file(struct udevice *udev, const char *filename)
        return 0;
 }
 
-int udevdb_get_dev(struct udevice *udev)
+int udev_db_get_device(struct udevice *udev)
 {
        char filename[SYSFS_PATH_MAX];
 
@@ -144,7 +144,7 @@ int udevdb_get_dev(struct udevice *udev)
        return parse_db_file(udev, filename);
 }
 
-int udevdb_delete_dev(struct udevice *udev)
+int udev_db_delete_device(struct udevice *udev)
 {
        char filename[SYSFS_PATH_MAX];
 
@@ -154,7 +154,7 @@ int udevdb_delete_dev(struct udevice *udev)
        return 0;
 }
 
-int udevdb_get_dev_byname(struct udevice *udev, const char *name)
+int udev_db_get_device_byname(struct udevice *udev, const char *name)
 {
        struct dirent *ent;
        DIR *dir;
similarity index 71%
rename from udevdb.h
rename to udev_db.h
index 4f6b5de..141c586 100644 (file)
--- a/udevdb.h
+++ b/udev_db.h
@@ -1,5 +1,5 @@
 /*
- * udevdb.h
+ * udev_db.h
  *
  * Userspace devfs
  *
  *
  */
 
-#ifndef _UDEVDB_H_
-#define _UDEVDB_H_
+#ifndef _UDEV_DB_H_
+#define _UDEV_DB_H_
 
 
-extern int udevdb_add_dev(struct udevice *dev);
-extern int udevdb_get_dev(struct udevice *dev);
-extern int udevdb_delete_dev(struct udevice *dev);
+extern int udev_db_add_device(struct udevice *dev);
+extern int udev_db_get_device(struct udevice *dev);
+extern int udev_db_delete_device(struct udevice *dev);
 
-extern int udevdb_get_dev_byname(struct udevice *udev, const char *name);
+extern int udev_db_get_device_byname(struct udevice *udev, const char *name);
 
-#endif /* _UDEVDB_H_ */
+#endif /* _UDEV_DB_H_ */
index 56834a4..32cd785 100644 (file)
@@ -33,9 +33,9 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
-#include "logging.h"
 #include "namedev.h"
-#include "udevdb.h"
+#include "udev_db.h"
+#include "logging.h"
 
 static int delete_path(const char *path)
 {
@@ -175,7 +175,7 @@ int udev_remove_device(struct udevice *udev)
        if (udev->type != 'b' && udev->type != 'c')
                return 0;
 
-       retval = udevdb_get_dev(udev);
+       retval = udev_db_get_device(udev);
        if (retval) {
                /* fall back to kernel name */
                temp = strrchr(udev->devpath, '/');
@@ -186,7 +186,7 @@ int udev_remove_device(struct udevice *udev)
        }
 
        dbg("remove name='%s'", udev->name);
-       udevdb_delete_dev(udev);
+       udev_db_delete_device(udev);
 
        /* use full path to the environment */
        snprintf(udev->devname, NAME_SIZE, "%s/%s", udev_root, udev->name);
index 1148272..08c25d3 100644 (file)
@@ -32,8 +32,8 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
+#include "udev_db.h"
 #include "logging.h"
-#include "udevdb.h"
 
 
 #define SYSFS_VALUE_SIZE               256
@@ -355,7 +355,7 @@ static int process_options(int argc, char *argv[])
                        }
                        memset(&udev, 0x00, sizeof(struct udevice));
                        strfieldcpy(udev.devpath, pos);
-                       retval = udevdb_get_dev(&udev);
+                       retval = udev_db_get_device(&udev);
                        if (retval != 0) {
                                printf("device not found in database\n");
                                goto exit;
@@ -374,7 +374,7 @@ static int process_options(int argc, char *argv[])
 
                        memset(&udev, 0x00, sizeof(struct udevice));
                        strfieldcpy(udev.name, pos);
-                       retval = udevdb_get_dev_byname(&udev, pos);
+                       retval = udev_db_get_device_byname(&udev, pos);
                        if (retval != 0) {
                                printf("device not found in database\n");
                                goto exit;
index 14c5115..b9a5fea 100644 (file)
@@ -31,8 +31,8 @@
 #include "udev.h"
 #include "udev_lib.h"
 #include "udev_version.h"
-#include "logging.h"
 #include "namedev.h"
+#include "logging.h"
 
 
 #ifdef LOG