Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c02f81cc authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Always unlink /dev/__kmsg__.

Whether the open succeeds or fails, we should unlink.

Change-Id: Ic2f1e10dc7b6d6e459c56049da00d165bd63ba8f
parent 5db3936d
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -43,9 +43,6 @@ void klog_init(void) {
    static const char* name = "/dev/__kmsg__";
    if (mknod(name, S_IFCHR | 0600, (1 << 8) | 11) == 0) {
        klog_fd = open(name, O_WRONLY | O_CLOEXEC);
        if (klog_fd == -1) {
            return;
        }
        unlink(name);
    }
}