]> err.no Git - systemd/commitdiff
no newline in log messages
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 23 Jun 2007 14:21:47 +0000 (16:21 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 23 Jun 2007 14:21:47 +0000 (16:21 +0200)
etc/udev/suse/64-device-mapper.rules
udev_selinux.c
udev_utils_file.c
udevd.c
udevinfo.c
udevstart.c
udevtest.c
udevtrigger.c

index f1d6c40308c066dc96b06da0ef240b1afd390f52..e8af567e2671f6d002eada09eb42f236d8bfe890 100644 (file)
@@ -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}"
 
index 77c0e7dc4a3de6ffbf0f695e8b5b08c40f2d4a52..1ad6e8ad122f51985601cbfc80ab0ada61120cce 100644 (file)
@@ -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;
                }
        }
index ba70b6b395f95d42b43a05401751a0be157b14f2..44c36863617466803dcdbefe192fe4c11dce3d46 100644 (file)
@@ -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)
diff --git a/udevd.c b/udevd.c
index 05df871a3493ab900774110eff104dd2b0a64ed6..23df5359bb206b451dc588bfa5ee2d7add500b58 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -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)
index 82057de54c566b9dd8469b7c5bf5583c4e888d95..d0b1c447f4d65f2692b026996333dbf58f8f0328 100644 (file)
@@ -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;
index a381c411a80f437157ed38a622723f52ba531041..6af5860e27e99cd1f3e641a396b148cf3f80d82c 100644 (file)
@@ -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) {
index 292a94916e705e079ab46e33d8a42bea84fe1ff4..418d43de14369a999c2423af5d13cad5727accb2 100644 (file)
@@ -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
 
index 7577c5f15ffd4232bbc6fdc92ecf3405ff064019..3b5be2006e5de952bd2343e5489b8b22fa6bdae6 100644 (file)
@@ -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);
 }