chiark / gitweb /
cgroup: when comparing agent paths, use path_equal()
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Sep 2015 16:27:19 +0000 (18:27 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:19:06 +0000 (10:19 +0100)
After all a path is a path is a path and we should use path_equal() to
comapre those.

src/basic/cgroup-util.c

index 8fbbd30429d93452e74e078cdabac7fffb357a73..b9fd9a6d4b8e5a1b58e6593e33d554baed4464cc 100644 (file)
@@ -842,7 +842,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
                 r = write_string_file_no_create(fs, agent);
                 if (r < 0)
                         return r;
-        } else if (!streq(sc, agent))
+        } else if (!path_equal(sc, agent))
                 return -EEXIST;
 
         fs = mfree(fs);