Source Activity

Syndicate content
Haiku's main repository
Updated: 36 min 38 sec ago

driver_settings: fix allocating an empty settings

Wed, 2015-01-14 12:39
I misread the condition and broke this in 0687a01. Thanks to Axel for reviewing! * Refactor the code again to move all the error checking at the top of the function, to make it easier to read. I misread the condition and broke this in 0687a01. Thanks to Axel for reviewing! * Refactor the code again to move all the error checking at the top of the function, to make it easier to read.
Categories: Development

Fix driver_settings in kernel mode outside of drivers.

Wed, 2015-01-14 10:47
The API allows to create driver settings which are not added to the global list, however those were left partially uninitialized, and there was no way to cleanly delete them. Tag such unattached settings with a ref_count of -1, and have delete_driver_settings check for this and handle the case correctly. Note: #10494 comment 2 says the settings for packagefs shouldn't be added to the kernel driver settings list, which is why I went with this solution. An alternative would be always using the list and the reference counting, but I don't know what the consequences are. Fixes #10494. The API allows to create driver settings which are not added to the global list, however those were left partially uninitialized, and there was no way to cleanly delete them. Tag such unattached settings with a ref_count of -1, and have delete_driver_settings check for this and handle the case correctly. Note: #10494 comment 2 says the settings for packagefs shouldn't be added to the kernel driver settings list, which is why I went with this solution. An alternative would be always using the list and the reference counting, but I don't know what the consequences are. Fixes #10494.
Categories: Development

driver_settings: don't strdup(NULL)

Wed, 2015-01-14 09:54
* This is not allowed by strdup POSIX specs and GCC may use its builtin strdup which doesn't check for it. * also refactor parse_driver_settings_string to create the settings_handle using settings_new, to reduce code duplication. * This is not allowed by strdup POSIX specs and GCC may use its builtin strdup which doesn't check for it. * also refactor parse_driver_settings_string to create the settings_handle using settings_new, to reduce code duplication.
Categories: Development

fssh_api_wrapper: fix build on non-Haiku.

Wed, 2015-01-14 09:15
* I'm not sure why strings.h needs to be included before , but it wouldn't work otherwise. * I'm not sure why strings.h needs to be included before , but it wouldn't work otherwise.
Categories: Development

WebPositive: parse "host:port" as a valid URL

Wed, 2015-01-14 09:14
* Web+ would not understand this and do a search engine query instead. * Fixes #11726 * Also add some comments to _SmartURLHandler to make it clearer how it handles URLs. * Web+ would not understand this and do a search engine query instead. * Fixes #11726 * Also add some comments to _SmartURLHandler to make it clearer how it handles URLs.
Categories: Development

ext2: fix logic error.

Tue, 2015-01-13 21:50
* Thanks to Ingo and Jérôme for review. * The Remove can't fail after a succesful Lookup so don't check for that * Return B_OK on success * Thanks to Ingo and Jérôme for review. * The Remove can't fail after a succesful Lookup so don't check for that * Return B_OK on success
Categories: Development

Updated youtube-dl package.

Tue, 2015-01-13 18:12
Categories: Development

Sudoku: consolidated set value code paths.

Tue, 2015-01-13 17:23
* Renamed _ToggleValue() to _SetValue(), and only let it do that. * It's now called from _InsertKey(), and _SolveSingle() as well which results in a correct visual update (ie. completed values, and the value hints are updated correctly). * _SolveSingle() would also not test for a completed game. * Renamed _ToggleValue() to _SetValue(), and only let it do that. * It's now called from _InsertKey(), and _SolveSingle() as well which results in a correct visual update (ie. completed values, and the value hints are updated correctly). * _SolveSingle() would also not test for a completed game.
Categories: Development

BFS B+tree test: style cleanup.

Tue, 2015-01-13 16:37
Categories: Development

rootfs: fs_shel build fix attempt.

Tue, 2015-01-13 15:21
Sorry, I can't test all cases when building from Haiku. Including after the fs shell wrapper makes the compiler fail because new needs a size_t argument (not an fssh_size_t). But including it before also fails because it includes C++ typedefs without the fssh wrapper, leading to conflicts. Undefining size_t just for the include of isn't very clean, but seems to work. new gets a size_t argument as it should and the other typedefs aren't conflicting. Sorry, I can't test all cases when building from Haiku. Including after the fs shell wrapper makes the compiler fail because new needs a size_t argument (not an fssh_size_t). But including it before also fails because it includes C++ typedefs without the fssh wrapper, leading to conflicts. Undefining size_t just for the include of isn't very clean, but seems to work. new gets a size_t argument as it should and the other typedefs aren't conflicting.
Categories: Development

Remove khash from the sources.

Tue, 2015-01-13 14:11
Fixes #9552. Fixes #9552.
Categories: Development

rootfs: convert to BOpenHashTable.

Tue, 2015-01-13 13:52
* Add an fs-shell compatible version of BOpenHashTable in the fs_shell to keep it working. The header is renamed to KOpenHashTable to avoid a conflict with the OpenHashTable.h available in private/shared which is not API compatible. * Add an fs-shell compatible version of BOpenHashTable in the fs_shell to keep it working. The header is renamed to KOpenHashTable to avoid a conflict with the OpenHashTable.h available in private/shared which is not API compatible.
Categories: Development

BOpenHashTable: document some subtleties

Tue, 2015-01-13 12:31
Mainly the interaction of resizing the table with iterators. Mainly the interaction of resizing the table with iterators.
Categories: Development

block cache: convert to BOpenHashTable.

Tue, 2015-01-13 12:28
Categories: Development

Remove old block cache implementation

Tue, 2015-01-13 08:21
This was not used anywhere except the tests written for it (which is also removed). This was not used anywhere except the tests written for it (which is also removed).
Categories: Development

BFS btreeTest: fixed DEBUG build.

Tue, 2015-01-13 07:54
Categories: Development

modules: Fix #11746.

Tue, 2015-01-13 00:08
- When normalizing paths of the preloaded modules to their final mounted path, remove them from the hash table before updating their path. Otherwise, the remove would fail due to the hash no longer matching, which in turn would cause the code in question to introduce an infinite loop in the hash table's internal link list due to manually rewriting the next link. - When normalizing paths of the preloaded modules to their final mounted path, remove them from the hash table before updating their path. Otherwise, the remove would fail due to the hash no longer matching, which in turn would cause the code in question to introduce an infinite loop in the hash table's internal link list due to manually rewriting the next link.
Categories: Development

gcc4 build fix.

Mon, 2015-01-12 18:04
* offsetof is not allowed on non-POD types so we need to use offset_of_member (gcc2 accepts offsetof, and C++11 relaxed the constraints on where it is allowed so it should work there too) * we have offset_of_member as a workaround until we switch to C++11, move it from khash (which is soon to be removed) to list.h which is the other place where it is used (for this one single call in our whole codebase) Also fix a typo in vfs.cpp. * offsetof is not allowed on non-POD types so we need to use offset_of_member (gcc2 accepts offsetof, and C++11 relaxed the constraints on where it is allowed so it should work there too) * we have offset_of_member as a workaround until we switch to C++11, move it from khash (which is soon to be removed) to list.h which is the other place where it is used (for this one single call in our whole codebase) Also fix a typo in vfs.cpp.
Categories: Development