summaryrefslogtreecommitdiff
path: root/Kernel/Devices
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-09 21:03:39 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-09 21:03:39 +0100
commite9dda8d59261d021d046074f39bc2c0a140a723a (patch)
tree06007eabddb48417a93183b15b8281e6ee95c2ce /Kernel/Devices
parentbe459acaea138102f97d25c355b12025836ab003 (diff)
downloadserenity-e9dda8d59261d021d046074f39bc2c0a140a723a.zip
Kernel: Give PTY's *actually* unique major ID's
Okay, one "dunce hat" point for me. The new PTY majors conflicted with PATAChannel. Now they are 200 for master and 201 for slave, not used by anything else.. I hope!
Diffstat (limited to 'Kernel/Devices')
-rw-r--r--Kernel/Devices/Device.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/Devices/Device.cpp b/Kernel/Devices/Device.cpp
index 94f02331b7..ed83cfa2ea 100644
--- a/Kernel/Devices/Device.cpp
+++ b/Kernel/Devices/Device.cpp
@@ -30,6 +30,10 @@ Device::Device(unsigned major, unsigned minor)
, m_minor(minor)
{
u32 device_id = encoded_device(major, minor);
+ auto it = all_devices().find(device_id);
+ if (it != all_devices().end()) {
+ dbg() << "Already registered " << major << "," << minor << ": " << it->value->class_name();
+ }
ASSERT(!all_devices().contains(device_id));
all_devices().set(device_id, this);
}