Use incorrect use of BPathMonitor in input/midi/net server

The B_ENTRY_* constants aren't valid watch flags.
This commit is contained in:
Ingo Weinhold
2013-06-27 21:57:44 +02:00
parent 04382d496e
commit c143884fdf
3 changed files with 6 additions and 8 deletions
+2 -3
View File
@@ -217,9 +217,8 @@ AddOnManager::StartMonitoringDevice(DeviceAddOn* addOn, const char* device)
bool newPath; bool newPath;
status_t status = _AddDevicePath(addOn, path.String(), newPath); status_t status = _AddDevicePath(addOn, path.String(), newPath);
if (status == B_OK && newPath) { if (status == B_OK && newPath) {
status = BPathMonitor::StartWatching(path.String(), B_ENTRY_CREATED status = BPathMonitor::StartWatching(path.String(),
| B_ENTRY_REMOVED | B_ENTRY_MOVED | B_WATCH_FILES_ONLY B_WATCH_FILES_ONLY | B_WATCH_RECURSIVELY, this);
| B_WATCH_RECURSIVELY, this);
if (status != B_OK) { if (status != B_OK) {
bool lastPath; bool lastPath;
_RemoveDevicePath(addOn, path.String(), lastPath); _RemoveDevicePath(addOn, path.String(), lastPath);
+2 -3
View File
@@ -127,9 +127,8 @@ DeviceWatcher::Start()
"Initial devices scan", B_NORMAL_PRIORITY, this)); "Initial devices scan", B_NORMAL_PRIORITY, this));
// And watch for any change // And watch for any change
return BPathMonitor::StartWatching(kDevicesRoot, B_ENTRY_CREATED return BPathMonitor::StartWatching(kDevicesRoot,
| B_ENTRY_REMOVED | B_ENTRY_MOVED | B_WATCH_FILES_ONLY B_WATCH_FILES_ONLY | B_WATCH_RECURSIVELY, this);
| B_WATCH_RECURSIVELY, this);
} }
+2 -2
View File
@@ -250,8 +250,8 @@ NetServer::ReadyToRun()
_BringUpInterfaces(); _BringUpInterfaces();
_StartServices(); _StartServices();
BPrivate::BPathMonitor::StartWatching("/dev/net", B_ENTRY_CREATED BPrivate::BPathMonitor::StartWatching("/dev/net",
| B_ENTRY_REMOVED | B_WATCH_FILES_ONLY | B_WATCH_RECURSIVELY, this); B_WATCH_FILES_ONLY | B_WATCH_RECURSIVELY, this);
} }