Use incorrect use of BPathMonitor in input/midi/net server
The B_ENTRY_* constants aren't valid watch flags.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user