From 0bfd48e555db072dfb36ac10fabf3e93f89653d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 25 Jan 2005 02:57:52 +0000 Subject: [PATCH] Will now also publish directories for existing driver directories that have subdirectories in order to find device drivers like /dev/audio/raw without any drivers in /dev/audio. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11017 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/device_manager/probe.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/kernel/core/device_manager/probe.cpp b/src/kernel/core/device_manager/probe.cpp index 82d27a7ac7..ea6e55742a 100644 --- a/src/kernel/core/device_manager/probe.cpp +++ b/src/kernel/core/device_manager/probe.cpp @@ -930,6 +930,14 @@ probe_for_device_type(const char *type) return B_NO_MEMORY; } + if (S_ISDIR(stat.st_mode)) { + // We need to make sure that drivers in ie. "audio/raw/" can + // be found as well - therefore, we must make sure that "audio" + // exists on /dev. + if (type[0]) + devfs_publish_directory(type); + continue; + } entry->device = stat.st_dev; entry->node = stat.st_ino;