Commit Graph

62663 Commits

Author SHA1 Message Date
Murai Takashi
761714b3f6 kernel/util: Fix Null pointer passed as 1st argument to memset()
Pointed out by Clang Static Analyzer.

Change-Id: I8ee4c5d6adac129fc7f3d4117081e0ac26dd2ea0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3759
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-03-02 11:42:59 +00:00
Leorize
78b1442051 libbnetapi: BUrlRequest now outputs to BDataIO
Previously, BUrlRequest returns data received via a callback that can't
return any value. This approach have several issues:

- It's not possible to signify failures to the request.
- Users have to implement custom listeners just to handle the common
  case of outputting to a buffer/file/etc.
- The received data has to be serialized into BMessage when
  BUrlProtocolDispatchingListener is employed. This can cause a
  noticible slowdown in real-world scenarios as evident by #10748.

With this change, BUrlRequest will output directly into a BDataIO, which
exposes a richer API for request handlers to work with (for example a
BitTorrent client can request a BPositionIO for non-linear data
delivery), as well as simplifying common cases for users.

The adaptation only requires one additional API:
BHttpRequest::SetStopOnError(). This API simply instructs the HTTP
request handler to cancel the request if an HTTP error is occurred.

Change-Id: I4160884d77bff0e7678e0a623e2587987704443a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3084
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 20:39:31 +00:00
Leorize
3e27f8d5a7 libbnetservices: BUrlResult is no longer a BArchivable
The switch to make BUrlResult serializable was debuted in
f9e1854f19 with the rationale is that
BHttpRequest auto-redirection might cause the headers to become
obsolete by the time a client process the BMessage received from
BUrlProtocolDispatchingListener.

With the change to BHttpRequest to not notify listeners when
auto-redirection is enabled, this is no longer the case and the
serialization code can go away now. This simplifies BUrlResult and its
subclasses, and gain us some performance for clients using
BUrlProtocolDispatchingListener as the result object no longer has to be
serialized.

This also change the ABI of BUrlProtocolListener::HeadersReceived to no
longer passing a BUrlResult.

Additionally, BUrlResult and BHttpResult now express the size of the content
as an off_t, thus allowing results larger than 4 GB.

Change-Id: I9dd29a8b26fdd9aa8e5bbad8d1728084f136312d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3082
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 20:39:31 +00:00
Leorize
8e3c76b3d2 HttpRequest: Don't trigger listener on auto redirect
When the user enable auto-redirection, what they meant is that they do
not want to handle redirections, thus we should take total control of this
step and hide it from the user. In fact, a majority of in-tree users
write code to disable their listener when a redirection happen.

This should also allow us to simplify BUrlResult, which has been turned
into a BArchivable for the sole reason of "preserving" headers when
auto redirect is enabled when used with BUrlDispatchingListener, which
has been shown to have little (if any) practical usage.

Change-Id: I9b10b81de0a13edbaec25f6b48ed7a4335ea691a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3081
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 20:39:31 +00:00
Andrew Lindesay
3d2fd2acaf HaikuDepot: Remove Custom List
Further removal of the use of custom list class;
this time part of the test engine inside HD.

Relates To #15534

Change-Id: Ia1f1d7c2577f92bba96da392fd48949a13b5a169
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3745
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 11:17:30 +00:00
Máximo Castañeda
6c04dd4898 Fix subpixel scanline size for fonts with bitmaps
Fixes #16788

Change-Id: If4c5a6e37ab5950c2426286d5afab59652a2a61b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3743
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 11:16:22 +00:00
Autocomitter
1eac17132d Update translations from Pootle 2021-02-27 08:39:35 +00:00
Andrew Lindesay
64a0ec2d3e HaikuDepot: Add HTTP Header for JSON-RPC
Change-Id: Ibdc112378870cb29770b7938bc8d80631009c03e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3750
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-02-26 19:04:34 +00:00
Murai Takashi
e5b7c9e313 processcontroller: Fix memory leak
When getting icon is failed, get_team_name_and_icon()
does not return false, so bitmap allocated to
infoPack.team_icon can be leaked.

* Delete bitmap in get_team_name_and_icon(), not in caller.
* Return false when getiing icon is failed.

Change-Id: Ib65065b59b70cd839e6deda4e1142bd104072d84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3744
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-02-24 05:52:05 +00:00
Jérôme Duval
c1e6e51a05 libroot: implement timegm calling the ICU backend
Change-Id: Ib4de4288e061670acbc2edea3671cee029305d33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3748
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-02-24 05:51:44 +00:00
Andrew Lindesay
02ccdc6fa1 HaikuDepot: Drop Caches on Version Change
To avoid having to upgrade cache-data formats,
drop the caches when the application starts with
a different version from last time the
application launches.

Change-Id: I2f5b831b6a4fc570457bc633fd440a9021648b02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3749
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-02-23 18:19:52 +00:00
Autocomitter
00fda04592 Update translations from Pootle 2021-02-20 08:45:21 +00:00
Murai Takashi
08f49f01e3 mediaplayer: Fix new[] / delete mismatch
fItems are allocated by new[] at line 31, but deallocated by delete.
Pointed out by Clang Static Analyzer.

Change-Id: I1d8ae0b2214290155612d4b5c6d1ce56676cc892
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3746
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-02-18 14:35:32 +00:00
Adrien Destugues
c05253c64e virtio RNG: fix SMAP violation
Change-Id: I82fadcef6d3f402b10273b6f378d5357f3c835c3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3716
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-02-16 11:36:51 +00:00
Jaidyn Ann
e248c98eb8 DNSSettingsView: Disable list buttons when nothing selected
Change-Id: I2ff2ab1b3e29b1a8b217506ae620926f0f51787f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3742
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-13 19:30:53 +00:00
Autocomitter
91b9cbbbb0 Update translations from Pootle 2021-02-13 08:41:51 +00:00
Adrien Destugues
6e1e87a3c3 Locale Kit: do not unload catalog add-ons
Follow-up to #16670.

I have previously changed the locale kit to load all add-ons once at
start, but did not notice that it would unload them later on. This can
also create race conditions if the locale kit is used from inside
load_add_on (as is the case in translation kit add-ons for example).

Should fix the remaining problems in #16670

Change-Id: I0e22f8e146abe4fc85d8357ebe178db948fec1cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3734
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-12 07:35:05 +00:00
Andrew Lindesay
1403313c7f HaikuDepot: Remove Custom List
Further removal of the use of custom list class;
this time with the generic undo functionality.

Relates To #15534

Change-Id: I804a31abc07f42f4f1695562b6f948feb465db0c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3739
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-10 08:22:34 +00:00
Jérôme Duval
99bd3b947f SupportDefs.h: remove the unichar type
irssi uses the unichar typename with a different type.

Change-Id: I2ee9dcf685f4832dd1b3c7d68f4686d69de50fb7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3656
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-02-09 16:47:55 +00:00
beaglejoe
6df09499e6 Implement reboot for x86_64 efi menu
Fixes #15050

Change-Id: I9b0d8dab9cc0eba85f6d242e946d0291c59580eb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3740
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-02-08 22:00:38 +00:00
kerwizzy
a7cda27731 Mandelbrot: Implement fullscreen and saving
* Fullscreen view without window border or deskbar
 * Save current view as .png

Change-Id: I8abbc7c5dc0af06ee26aa29afdef79a41944438c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/867
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2021-02-08 19:37:10 +00:00
Fredrik Holmqvist
a2def606ed ARM64 packageinfo and haikuports
Change-Id: Id5ad7682ecb7b4bda364f839b106b016ca4f4b0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3738
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-07 12:17:21 +00:00
Fredrik Holmqvist
d81df6ce84 Add byteorder.S for ARM64
Change-Id: I346e83683ad2318948914c5027123f84d4038451
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3737
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-07 12:17:21 +00:00
Fredrik Holmqvist
fecc9c1295 HaikuPortsCross/arm64 minor version update
Change-Id: I2dc46e5c99aae6ac372857c8065741e56847bddc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3736
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-07 12:17:21 +00:00
Andrew Lindesay
6f07fead0c HaikuDepot: Remove Custom List
Further removal of the use of custom list class;
this time with the package action lists.

Also resolve an error created by a last minute
change in the last pull request for this ticket.

Relates To #15534

Change-Id: I85dd40b7ef664f93b24ca5041fa58cca17d72299
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3735
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-07 08:54:48 +00:00
Andrew Lindesay
d75b4d610d HaikuDepot: Remove Custom List
Further removal of the use of custom list class;
this time with the package lists.

Relates To #15534
Change-Id: I1f01ed9d5ddbd7754097ce0adbf505d6ba17fd2f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3732
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-06 19:45:53 +00:00
Autocomitter
f01bc2121f Update translations from Pootle 2021-02-06 08:44:58 +00:00
Alexander von Gluck IV
0cbad7f3a3 boot/platform/efi: Fill out riscv64 kernel entry assembly
Change-Id: I18867f2c1188b43d5c663a7ceb3aab4a4dedb454
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3731
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-02-05 21:55:53 +00:00
Fredrik Holmqvist
9e4c5cf124 Add -std=c++14 to build_cross_tools_gcc4
CLang fails to build ISL otherwise, and if you are setting up
cross compiling, you should have a modern enough compiler

Fixes #16434

Change-Id: Ieb4a33015899896ea3bb2d1abc59b10fe0b4b3f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3730
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-02-02 17:44:47 +00:00
X512
0dcedf62b9 HaikuDepot: remove unneeded .Get() calls
Dereference operator is defined in BReference.

Change-Id: Iccba8ad4a29e354aa9cdbf2e1a5ddbc9687af677
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3489
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-02 15:22:23 +00:00
X512
779ab335dd use .IsSet() instead if .Get() != NULL
Change-Id: Ia2b7a719fd398e78cc3b11d4f7b02cb81179f65f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3488
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-02-02 15:17:54 +00:00
Jérôme Duval
89dae40a65 net_server: handle EINTR on select()
Change-Id: I90af101cef72b33ecb6decec911d03f592c1ec7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3729
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-02-01 19:35:02 +00:00
Jérôme Duval
0376026d31 Time: handle EINTR on select()
Change-Id: I8a1adc31541d2174d27729cfcd1bcb26e5d3e4fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3728
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-02-01 19:35:02 +00:00
Jérôme Duval
08b9db66ac poorman: handle EINTR on poll()
Change-Id: I549db55a408063bbddf71d5ce15c0286bf36bc69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3727
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-02-01 19:35:02 +00:00
Jérôme Duval
0ce3a760d3 libnetwork: handle EINTR on select() and poll()
Change-Id: I4e3562bd2564dd0c61142d0b467c81abd393373a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3726
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-02-01 19:35:02 +00:00
Fredrik Holmqvist
f8157a3971 UEFI Console, easier spacebar for bootmenu
Change-Id: Idf68b738168fbb59d000c1f0f0771c8351bc70ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3725
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-02-01 19:29:55 +00:00
Fredrik Holmqvist
b08e283a2e UEFI Console, remove Mac quirk fixes #16753
Keyboard don't work on either my machines without removing it

Change-Id: I52285187cbefa5b2c71bd4c086a269153dfdccec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3724
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-31 21:45:07 +00:00
Fredrik Holmqvist
3f6f7f7420 ACPICA fixes for gcc2.95.3
pswalk has issues in code we don't use for gcc 2.95.3, so just disable
Can we drop gcc2.95.3 soon?

Change-Id: I334b5029f97ad66b46bd0054c05c75062fec27fc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3723
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-01-31 18:15:55 +00:00
Fredrik Holmqvist
fe0910891a ACPICA removed our cast we need for gcc 2.95.3
Change-Id: I2e3f907708a174dbea6a34055e9dbbf4c2b7b1e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3722
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-01-31 18:15:55 +00:00
Fredrik Holmqvist
5e6773d56a ACPICA fixed its spelling of shareable
Change-Id: I430304cb14a5d09808537b8490dea0f2b1e237f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3721
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-01-31 18:15:55 +00:00
Fredrik Holmqvist
c1e4908d9e ACPICA marks AcpiOsPrintf printf-like, fix found warning
Change-Id: I26e3a4ca8654eb3859ef0a8d3f0de83e251b96da
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3720
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-01-31 18:15:55 +00:00
Fredrik Holmqvist
29989979d2 ACPICA semaphore id correction to -1 as usual
Change-Id: I9b84756db7f522c79b9dc4e89b94c65909f27021
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3719
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-01-31 18:15:55 +00:00
Fredrik Holmqvist
0ffed378f1 Upgrade ACPICA to 20210105 from 20181213
Many changes, some problems with sleep fixed
See https://acpica.org/sites/acpica/files/changes_56.txt

Change-Id: I935eca34daac29f37a19c3fd1df5a0595ba4d862
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3718
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-01-31 18:15:55 +00:00
Alexander von Gluck IV
817c6ca445 efi/arm64: Fill in some arm64 arch stuff
Change-Id: I55eeba828f523f7358c25134bd5284eeefcf5ce7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3544
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-31 01:36:56 +00:00
Adrien Destugues
5504fc757c intel_cstates: ignore negative time-delta values
I have no idea why this can happen or if there is a deeper problem.

Should fix #16546.

Change-Id: Ia160e293eabefae636ce4c861864c99b0aaa68db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3717
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-01-30 21:50:41 +00:00
Adrien Destugues
e03da2bd84 Locale Kit: Fix available language enumeration
Regression introduced in hrev54910.
The list of available languages in FirstBootPrompt would be empty.
2021-01-30 17:43:32 +01:00
Niels Sascha Reedijk
85a6d6530a libnetservices.a: fix unit test builds after hrev54923 2021-01-30 14:42:25 +00:00
Autocomitter
522cc4b989 Update translations from Pootle 2021-01-30 08:43:01 +00:00
Jérôme Duval
acdafb571d Debugger: fix build after hrev54931 2021-01-29 21:38:10 +01:00
Alexander von Gluck IV
8c9dc662ee boot/platform/efi: Don't 'enable' graphics mode; solves #16753
* Console-control is non-standard, but is needed on older Apple
  hardware to transition their EFI bioses to text-mode so our
  bootloader menu can be used / seen.
* Console-control seems to exist on some older Intel hardware as
  well. Enabling it breaks our keyboard support. (maybe when enabled
  a different legacy UEFI call needs used to input or something)
* Instead of trying to use a deprecated EFI call in a meaningful
  way, just do the "bare minimum" of disabling it when it exists.

Change-Id: I20c3e026e02996371f632361c6899532c195bbf8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3685
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-29 14:03:55 +00:00