X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev.c;h=a562bc27bea63ceb570598f4e2bed65300e6108f;hp=ed42862c00881d195e10012b8ca2dd964501dcfa;hb=f7b4eca455c7dbf850d984892756f22dbd9ddc3d;hpb=c2f17c9ea8a90d1c12158b947b3f8096404afe33 diff --git a/udev.c b/udev.c index ed42862c0..a562bc27b 100644 --- a/udev.c +++ b/udev.c @@ -74,8 +74,8 @@ static void get_dirs(void) { char *temp; char *udev_db = UDEV_DB; - char *udev_config = NAMEDEV_CONFIG_FILE; - char *udev_permission = NAMEDEV_CONFIG_PERMISSION_FILE; + char *udev_config = UDEV_CONFIG_FILE; + char *udev_permission = UDEV_CONFIG_PERMISSION_FILE; int retval; retval = sysfs_get_mnt_path(sysfs_path, SYSFS_PATH_MAX); @@ -86,7 +86,7 @@ static void get_dirs(void) temp = getenv("UDEV_TEST"); if (temp != NULL) { /* hm testing is happening, use the specified values, if they are present */ - temp = getenv("UDEV_SYSFS_PATH"); + temp = getenv("SYSFS_PATH"); if (temp) strncpy(sysfs_path, temp, sizeof(sysfs_path)); temp = getenv("UDEV_CONFIG_DIR"); @@ -105,7 +105,7 @@ static void get_dirs(void) if (temp) udev_permission = temp; } - dbg("sysfs_path = %s", sysfs_path); + dbg("sysfs_path='%s'", sysfs_path); strncpy(udev_db_filename, udev_config_dir, sizeof(udev_db_filename)); strncat(udev_db_filename, udev_db, sizeof(udev_db_filename)); @@ -141,12 +141,12 @@ int main(int argc, char **argv, char **envp) dbg ("no devpath?"); goto exit; } - dbg("looking at %s", devpath); + dbg("looking at '%s'", devpath); /* we only care about class devices and block stuff */ if (!strstr(devpath, "class") && !strstr(devpath, "block")) { - dbg("not block or class"); + dbg("not a block or class device"); goto exit; } @@ -166,7 +166,7 @@ int main(int argc, char **argv, char **envp) get_dirs(); retval = udevdb_init(UDEVDB_DEFAULT); if (retval != 0) { - dbg("Unable to initialize database."); + dbg("unable to initialize database"); goto exit; } @@ -180,7 +180,7 @@ int main(int argc, char **argv, char **envp) retval = udev_remove_device(devpath, subsystem); else { - dbg("Unknown action: %s", action); + dbg("unknown action '%s'", action); retval = -EINVAL; } udevdb_exit(); @@ -188,4 +188,3 @@ int main(int argc, char **argv, char **envp) exit: return retval; } -