Commit Graph

8833 Commits

Author SHA1 Message Date
hyche 2b6c2ec390 fs_shell: Added socket filetype.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:02:59 -05:00
hyche 1750cd1e92 block_cache: Implement cache_has_block_in_transaction function that will check the existence of block in one specific transaction.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:02:56 -05:00
hyche e715614613 AVLTree: forward LeftMost and RightMost method from AVLTreeBase
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 10:56:08 -05:00
Augustin Cavalier 06b79f5509 build/Errors.h: Synchronize with the non-build one.
This file was apparenly based off the BeOS one (as is evidenced
by the "Be Incorporated" copyright ... which is problematic.)
Now it's directly based off of the non-build one.
2017-12-05 18:36:11 -05:00
Augustin Cavalier f1e8af173c net_socket: control op should be uint32.
Where it is called from stack_interface_ioctl, the parameter
is already a uint32 there.

Fixes #13826.
2017-12-03 13:57:26 -05:00
Augustin Cavalier acf02fd2cf locale: Fix another class/struct mixup. 2017-12-03 13:44:30 -05:00
Augustin Cavalier 7c234361eb Fix more class/struct mixups. 2017-12-02 22:24:06 -05:00
Augustin Cavalier bf77c15232 kernel/vm: Correct virtual function declarations.
The base VMCache class changed to the generic_ types with their
introduction in in *2011* (435c43f591),
but these classes were never properly adapted. These functions should not
be called here (they panic() -- but the base class only returns B_ERROR,
so that is a difference at least.)

Found by Clang's -Woverloaded-virtual.
2017-12-02 21:42:50 -05:00
Augustin Cavalier 764c402a69 GraphicsDefs: Revert back to casting structs to integers to compare them.
This reverts commit d3abf525c5.
Clang's warning was a little overzealous; this is not a problem on x86.
2017-12-02 17:36:20 -05:00
Augustin Cavalier 841d719fc8 MediaDefs: May be included as C not C++, so accommodate for that. 2017-12-02 09:32:28 +01:00
Augustin Cavalier 2b1481f0dc Fix a few more miscellaneous (harmless) Clang warnings. 2017-12-02 00:12:51 -05:00
Augustin Cavalier 08ff3a4eea headers/clang: Remove.
Never used, and never will be following previous commit.
2017-12-01 21:16:58 -05:00
Augustin Cavalier 30c9d3c0cc kernel: Correct class/struct mixups.
Almost certainly harmless. Spotted by Clang.
2017-12-01 20:27:15 -05:00
Augustin Cavalier d3abf525c5 GraphicsDefs: Do not cast structs to integers to compare them.
That requires more padding (1 byte vs 4 or 8 depending on integer size),
so just use regular loops and chained ==s.

Caught by Clang. No functional change intended.
2017-12-01 20:26:20 -05:00
Augustin Cavalier be622abddb fluidsynth: Remove from tree.
Not included in the build (or even wired to Jam) since the new package
repo changes merge.
2017-12-01 10:14:45 +01:00
Axel Dörfler e96835a9a4 Added simple test_launch_daemon.
* Expects its config files in /boot/home/test_launch.
* Uses standard I/O, and is always in user mode.
* Also added test_launch_roster command that is able to talk to the test
  server like it does to the real thing.
2017-11-29 17:19:46 +01:00
John Scipione fc23c09758 BDeskbar & Deskbar: export window bool settings to BDeskbar
Add methods to get and set "Always on top", "Auto raise", and "auto hide"
which are all booleans which control aspects of the Deskbar window to
BDeskbar.

Set the bool to the default value initially. Check if sending the
message succeeds, if so check the reply which also fills out the bool.
Don't check to see if reply succeeded because the bool will only be
overwritten if it did.

Follow the BDeskbar convention Is...() for getter, Set...() for setter
e.g IsAlwaysOnTop() is the getter, SetAlwaysOnTop() is the setter.

Define new message constants to call the newly created methods.
Follow BDeskbar convention: 'gtla' is used for getter, 'stla' for setter.
g/s for getter/setter, tla is an all-lowercase code unique to each
getter/setter pair.

Copy/paste these message constants into BarApp.h unchanged. Replace four
letter codes with imported message constants in BarApp.cpp and
BarWindow.cpp. Much nicer than using bare codes.

The new BDeskbar methods are all handled by TBarApp. The getters send
back a reply message containing the bool while the setters fall through
to existing setter cases.
2017-11-27 11:05:22 -08:00
John Scipione f8811591e1 BDeskbar: Style fixes
Update Copyright in cpp, add myself, alphabetize, standardize
Pointer style in cpp
Update some comments
Some 80 char stuff
pragma section headers
whitespace
2017-11-26 20:40:00 -08:00
Jérôme Duval 6ac3a280f4 Add ZstdCompressionAlgorithm.
* kernel lib is decompress only (like zlib).
* expand compression_test for zstd.
2017-11-24 21:35:49 +01:00
Adrien Destugues 8ddec194c6 intel_extreme: backlight control on pre-PCH devices
Thanks to oco for letting me test this on his old laptop.
2017-11-23 23:59:39 +01:00
Adrien Destugues 8903cd4256 Bump MAX_SHADOW_PWD_PASSWORD_LEN
Fixes #13733.

Unlike written in the ticket, the string length is 136 (not 135),
and the code checks for rejects anything greater or equal to the max
value. So set the constant to 137.
2017-11-23 13:00:48 +01:00
Augustin Cavalier 164e4f8de4 intel_extreme: Beginnings of Broadwell support.
At present, does not work (it fails to properly set up interrupts,
resulting in thousands of unhandled ones which all but grinds the system
to a halt) but this at least is some progress.
2017-11-21 23:37:18 +00:00
Adrien Destugues b140a1c340 NetworkAddressResolver: cache needs to be locked
It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.
2017-11-21 22:15:32 +01:00
François Revol aef94baf32 ISA: fix ram_address() to use phys_addr_t for completeness
I don't know of any driver actually making use of it, but some weird
architecture might want to emulate an ISA bus to reuse a driver maybe...
2017-11-21 21:44:02 +01:00
François Revol 16bb99fdac PCI: fix ram_address() to use phys_addr_t
Since it handles physical address it should really be this.

It's not like many drivers actually used it anyway. It shouldn't harm
compatibility, drivers calling it with only 32bit would leave garbage in
the higher bits but since on x86 it's a noop anyway, it would end up in
the MSB register tha's ignored because it expects a 32bit result.
2017-11-21 21:44:01 +01:00
Augustin Cavalier 3b3688c7a5 fs_shell: Change {set_}real_time_clock to match the new definitions. 2017-11-21 15:18:11 +01:00
Adrien Destugues 24e63de5d3 Style fix: parameters should have a name. 2017-11-21 12:19:56 +01:00
Adrien Destugues 3a2b67b5ae Support for configuring screen backlight
Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.

App_server:
Forward brightness things between BScreen and the accelerant.

intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.

Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.
2017-11-21 09:12:18 +01:00
Alexander von Gluck IV a42249db2d arm: Add 8250 omap variant uart driver
* Untested, someone with an omap3,4,5 could though.
2017-11-20 09:16:58 -06:00
Alexander von Gluck IV 1d3d336a97 libbsd: Move lutimes to bsd compat
* Rework be149e8ccf since lutimes isn't posix
2017-11-17 14:27:26 -06:00
Augustin Cavalier 7d8eb4d7f9 time: Address review comments.
* Use ENOSYS not B_DONT_DO_THAT (thanks korli)
 * Use unsigned long not uint64 (thanks axeld)
2017-11-16 20:53:14 +01:00
Alexander von Gluck IV be149e8ccf libroot/posix: Add lutimes for better posix compatibility
* Didn't exist on BeOS, but exists most other places.
* Update times of a file, not following symbolic links.
2017-11-16 00:38:54 -06:00
Augustin Cavalier 9a50e01ea6 set_real_time_clock: Change parameter from uint32 to uint64.
This should have been done along with the time_t change, but I forgot
to check this then.

Technically this breaks ABI against BeOS, but:
  1. BeOS used an int32, so we'd already slightly broken ABI here
  2. Only one thing at HaikuArchives (VMwareAddons) and one recipe at HaikuPorts
     (samba) uses this function at all.

If it turns out some critical BeOS app uses this, then I guess we can enclose
GCC2 guards around it, but since I can't find any evidence of that, I'm
pushing it without them for now.
2017-11-15 18:28:04 +01:00
Augustin Cavalier 581cd2a22d Nuke COMPILE_FOR_R5.
Not used in $long_time, almost certainly broken, so it's just cruft.
2017-11-15 17:52:27 +01:00
Andreas Faerber ce6fdd33ef Detach UDP sockets on cleanup
The UDP service does not own the UDP sockets. When shutting down,
inform the bound sockets that the service is no longer available.
This allows subsequent method calls to error out cleanly.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:48:09 +01:00
Andreas Faerber 74077e46e1 Add net_stack_cleanup()
Add a cleanup function net_stack_cleanup() that calls a new NetStack::ShutDown() method.
Make sure this method works even if the network stack was never initialized.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:47:27 +01:00
John Scipione 6f6c9e0069 BDurationFormat::Format docs, update method params
Also a tiny style fix in the header, put const qualifier
on same line
2017-11-10 14:59:33 -08:00
Jérôme Duval a295d3f46e wait4(): retrieve dead team entries usage information.
* This adds a parameter to the wait_for_child syscall. I extended the test case
to show the actual retrieved information.
* fix #13546
2017-10-10 17:20:46 +02:00
Augustin Cavalier 6aff37d1c7 Move SHA256 class to libroot instead of linking libshared into libroot.
Discussed with PulkoMandy and on the haiku-commits mailing list.

Thanks to @jessicah for compile-testing and fixing 2 small issues I missed.
2017-10-03 20:18:26 -04:00
Augustin Cavalier 9d8a58ea46 nvidia_gpgpu: Remove from tree.
Was nothing but a slightly-stripped version of the nvidia driver,
not touched substantially in nearly 10 years, and the cards it was
originally going to support (but never got anywhere near so) have long since
been deprecated.
2017-09-30 21:27:47 -04:00
Augustin Cavalier db68ff23c6 Interface Kit: Make BControlLook a proper pure-virtual base class.
All of its prior functionality has been moved into HaikuControlLook.
This paves the way for customizeable control looks, which I intend to implement
in the future as part of decorators.

This is being pushed now because libbe ABI was already broken due to the
Notifications changes, so this is riding that so we only have to do a mass
rebuild once.
2017-09-30 21:12:33 -04:00
Augustin Cavalier d52572b31b BControlLook: Make all public methods virtual.
Solves a "TODO before R1". Breaks ABI, but almost nothing outside the
tree uses it.
2017-09-30 21:12:02 -04:00
Alexander von Gluck IV 2da9ebb7f3 radeon_hd: Drop dp config array from dp_info
* Caching these values could result in missed
  state changes.
* We may want to re-implement later.
* Highlights that all DP AUX communication is broken
  during my testing.
2017-09-29 11:10:56 -05:00
Brian Hill 8856b51897 BNotification ABI padding
Add reserved functions and data to avoid future ABI breakage
2017-09-28 22:19:05 -04:00
Brian Hill 6aa0587222 Notifications preflet and notification_server
Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
	should be muted
-Remove history list (to be implemented later)

BNotification class:
-BNotification records the signature and name of application that
	created it
-New functions to get source application signature and name

Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
	cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
	message which is not reliable
2017-09-23 11:41:33 -04:00
Alexander von Gluck IV 4bcba8a84f radeon_hd: Add missing FirePro, Add vega, cleanup names.
* Vega is 100% untested.
* I think AMD is doing away with the DCE version numbers.
2017-09-22 15:58:49 -05:00
Akshay Agarwal 42745b94f8 BDateFormat: Properly map day values to ICU day-of-week.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-09-16 17:42:54 +02:00
Jérôme Duval 2976cf85a4 libroot.so: make first parameter of dladdr() const.
This follows up on a mail from 2011:
https://www.freelists.org/post/haiku-development/Changing-dladdr-to-take-const-void-for-first-parameter
2017-09-15 23:09:24 +02:00
Jérôme Duval ccd42320c4 libroot: add posix_spawn(). 2017-09-12 19:42:57 +02:00
Jessica Hamilton c5e77784a8 compatibility/bsd: add endian.h for BSD extensions. 2017-09-11 07:06:52 +12:00