diff options
-rw-r--r-- | etc/udev/suse/64-device-mapper.rules | 3 | ||||
-rw-r--r-- | udev_selinux.c | 10 | ||||
-rw-r--r-- | udev_utils_file.c | 4 | ||||
-rw-r--r-- | udevd.c | 1 | ||||
-rw-r--r-- | udevinfo.c | 6 | ||||
-rw-r--r-- | udevstart.c | 2 | ||||
-rw-r--r-- | udevtest.c | 3 | ||||
-rw-r--r-- | udevtrigger.c | 4 |
8 files changed, 14 insertions, 19 deletions
diff --git a/etc/udev/suse/64-device-mapper.rules b/etc/udev/suse/64-device-mapper.rules index f1d6c40308..e8af567e26 100644 --- a/etc/udev/suse/64-device-mapper.rules +++ b/etc/udev/suse/64-device-mapper.rules @@ -11,11 +11,10 @@ ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" ENV{DM_STATE}=="SUSPENDED", GOTO="device_mapper_end" ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end" -IMPORT{program}="vol_id --export $tempnode" +IMPORT{program}="vol_id --export $tempnode" OPTIONS="link_priority=-100" ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS="link_priority=-90" - ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" diff --git a/udev_selinux.c b/udev_selinux.c index 77c0e7dc4a..1ad6e8ad12 100644 --- a/udev_selinux.c +++ b/udev_selinux.c @@ -75,7 +75,7 @@ static char *get_media(const char *devname, int mode) } media = strdup(mediabuf); - info("selinux_get_media(%s)='%s'\n", devname, media); + info("selinux_get_media(%s)='%s'", devname, media); close_out: fclose(fp); @@ -100,7 +100,7 @@ void selinux_setfilecon(const char *file, const char *devname, unsigned int mode if (ret < 0) if (matchpathcon(file, mode, &scontext) < 0) { - err("matchpathcon(%s) failed\n", file); + err("matchpathcon(%s) failed", file); return; } @@ -128,7 +128,7 @@ void selinux_setfscreatecon(const char *file, const char *devname, unsigned int if (ret < 0) if (matchpathcon(file, mode, &scontext) < 0) { - err("matchpathcon(%s) failed\n", file); + err("matchpathcon(%s) failed", file); return; } @@ -155,10 +155,10 @@ void selinux_init(void) */ if (is_selinux_running()) { if (!udev_root[0]) - err("selinux_init: udev_root not set\n"); + err("selinux_init: udev_root not set"); matchpathcon_init_prefix(NULL, udev_root); if (getfscreatecon(&prev_scontext) < 0) { - err("getfscreatecon failed\n"); + err("getfscreatecon failed"); prev_scontext = NULL; } } diff --git a/udev_utils_file.c b/udev_utils_file.c index ba70b6b395..44c3686361 100644 --- a/udev_utils_file.c +++ b/udev_utils_file.c @@ -45,14 +45,14 @@ int create_path(const char *path) pos--; pos[0] = '\0'; - dbg("stat '%s'\n", p); + dbg("stat '%s'", p); if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR) return 0; if (create_path (p) != 0) return -1; - dbg("mkdir '%s'\n", p); + dbg("mkdir '%s'", p); if (mkdir(p, 0755) == 0) return 0; if (errno == EEXIST) @@ -957,7 +957,6 @@ int main(int argc, char *argv[], char *envp[]) selinux_init(); dbg("version %s", UDEV_VERSION); - /* parse commandline options */ while (1) { option = getopt_long(argc, argv, "dtvhV", options, NULL); if (option == -1) diff --git a/udevinfo.c b/udevinfo.c index 82057de54c..d0b1c447f4 100644 --- a/udevinfo.c +++ b/udevinfo.c @@ -265,7 +265,6 @@ int main(int argc, char *argv[], char *envp[]) goto exit; } - /* get command line options */ while (1) { option = getopt_long(argc, argv, "aen:p:q:rVh", options, NULL); if (option == -1) @@ -279,7 +278,7 @@ int main(int argc, char *argv[], char *envp[]) strlcpy(name, &optarg[strlen(udev_root)+1], sizeof(name)); else strlcpy(name, optarg, sizeof(name)); - dbg("name: %s\n", name); + dbg("name: %s", name); break; case 'p': /* remove /sys if given */ @@ -287,10 +286,9 @@ int main(int argc, char *argv[], char *envp[]) strlcpy(path, &optarg[strlen(sysfs_path)], sizeof(path)); else strlcpy(path, optarg, sizeof(path)); - dbg("path: %s\n", path); + dbg("path: %s", path); break; case 'q': - dbg("udev query: %s\n", optarg); action = ACTION_QUERY; if (strcmp(optarg, "name") == 0) { query = QUERY_NAME; diff --git a/udevstart.c b/udevstart.c index a381c411a8..6af5860e27 100644 --- a/udevstart.c +++ b/udevstart.c @@ -68,7 +68,7 @@ static int device_list_insert(const char *path, struct list_head *device_list) struct device *new_device; const char *devpath = &path[strlen(sysfs_path)]; - dbg("insert: '%s'\n", devpath); + dbg("insert: '%s'", devpath); list_for_each_entry(loop_device, device_list, node) { if (strcmp(loop_device->path, devpath) > 0) { diff --git a/udevtest.c b/udevtest.c index 292a94916e..418d43de14 100644 --- a/udevtest.c +++ b/udevtest.c @@ -44,8 +44,7 @@ void log_message (int priority, const char *format, ...) va_start(args, format); vprintf(format, args); va_end(args); - if (format[strlen(format)-1] != '\n') - printf("\n"); + printf("\n"); } #endif diff --git a/udevtrigger.c b/udevtrigger.c index 7577c5f15f..3b5be2006e 100644 --- a/udevtrigger.c +++ b/udevtrigger.c @@ -118,12 +118,12 @@ static void trigger_uevent(const char *devpath) fd = open(filename, O_WRONLY); if (fd < 0) { - dbg("error on opening %s: %s\n", filename, strerror(errno)); + dbg("error on opening %s: %s", filename, strerror(errno)); return; } if (write(fd, "add", 3) < 0) - info("error on triggering %s: %s\n", filename, strerror(errno)); + info("error on triggering %s: %s", filename, strerror(errno)); close(fd); } |