Commit Graph

62407 Commits

Author SHA1 Message Date
Pascal Abresch
ff21b4c370 HaikuControlLook: don't modify menu color before applying it
Change-Id: I31838d4c17d4616c2c166197596a93bf51785677
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3410
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-26 07:35:33 +00:00
John Scipione
1897036191 BTextView: ensure text rect width and height is > 0
Helps wth #16476 #16568

Change-Id: Idc8d399cf69776d26e492f568c9ef83bcd7a6686
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3413
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-26 07:27:19 +00:00
Alexander von Gluck IV
49e2b1f420 platform/efi: Fix 'narrowing width' error under clang
Change-Id: I84d7fea03868aadd50ff03a79d7769bff56c84be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3416
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2020-11-25 19:33:53 +00:00
Alexander von Gluck IV
f566cf181a file_systems/nfs: Fix SMAP violations
* Try to return relevant errors when we can.
* The style on these needs cleaned up badly.
* I don't want the fix to be lost in style changes.

Change-Id: I8a1661385fbeb8eec86a2c15828b449980050a78
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3386
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-25 19:32:33 +00:00
Humdinger
9d84226fcd Installer: Improved alert text, consistent use of "Haiku User Guide"
Point specifically to the SoftwareUpdater topic of the Haiku User Guide
to make the hint more useful.

Always use consistent spelling: "Haiku User Guide"

Translated the German User Guide package info.

Change-Id: I8f3b2a5a3f27caf9b5eea41a1a7a86c2e91e668a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3412
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2020-11-25 18:14:29 +00:00
Máximo Castañeda
8c78892580 BFileGameSound: don't copy garbage after track end
Check for the end of track, as the stream is repositioned on the first
frame, the start of which we were copying to the buffer if there was
space left, whether we were looping or not.

Solves #16592

Change-Id: Ic49d1776577b71a4451775876597b9c9003e1d35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3411
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-24 14:02:30 +00:00
Jérôme Duval
15b8d49dba ipv4: have IP_MULTICAST_TTL accept 1-byte buffers
this is a common length for this socket option. also denies values greater als 255.

Change-Id: I3d480444d655c41e76d3bbc6625f72c1c4eb3808
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3409
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-23 08:07:29 +00:00
Adrien Destugues
bc8445142d BSecureSocket: use openssl's default paths for certificates.
It is confusing to use different sets of certificates for BSecureSocket
based apps and ones using openssl directly. So, use the defaults in
BSecureSocket.

OpenSSL was modified to keep the user certificates in non-packaged so
this does not change the behavior for native apps (needs openssl 1.1.1g-3)

Change-Id: Ic398eec5efa9d036c3b810b7a3bb7142bdeb2d46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3394
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-22 19:19:20 +00:00
Jérôme Duval
c5ff1f14c6 syslog.h: add LOG_PRIMASK and LOG_PRI macros
Change-Id: I9ae0c3165cea831e329e49211ff738cbb89a65de
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3408
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-22 09:28:57 +00:00
Autocomitter
8ef2ce074c Update translations from Pootle 2020-11-21 08:47:36 +00:00
X512
be3fde6d02 app_server: perform NULL check before use
Fixes #16610.

Change-Id: Ic377a2faef7279f607298b3b80bc44bc1c6aae36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3401
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-11-20 18:24:48 +00:00
Jérôme Duval
2982d9819f fcntl.h: define O_DIRECT directly
coreutils wants to undefine O_NOCACHE, this shouldn't affect O_DIRECT though.

Change-Id: Id00316a78eb91b2c7f692bb46eca65b3a7983c6f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3398
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-20 18:23:35 +00:00
Fredrik Holmqvist
e6e0db9ef4 Rewrite allocated regions, remove mmu_free
mmu_free was only used for ACPI and only set a released flag
in the region. This released flag was never checked anywhere.

platform_free_region removes region from linked list now.
There are a lot of calls to it, so it should save some mem and make
memory layout cleaner.

Compiles on boots on AMD64
Compiles on ARM and loads kernel, but can't start it, since we havn't
setup the mmap with proper virtual addresses (with some other fixes to
ld-script and ELF32 loader EFI code.

Change-Id: Icfe871fa400b49f19e7ca1dbb9e1561309b21a22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3403
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-11-19 19:09:38 +00:00
Fredrik Holmqvist
7b9ad03e70 Remove mmu allocation and free
EFI should have ACPI regions mapped, and kernel does its own mapping

Change-Id: I12a1ce625740dfe9751f2907ac462ef112b22645
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3402
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-11-19 19:09:38 +00:00
Murai Takashi
cb5156f081 LayoutBuilder.h: Fix use after free
Fix 'item' is used after delete.
Pointed out by Clang Static Analyzer.

Change-Id: I8eca3084c97b37015a2da1b96119a458d4eb9aa7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3392
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-11-19 07:17:29 +00:00
Adrien Destugues
a6c8647e0a Tracker: list item height must be an integer.
The item height is rounded to the nearest integer when drawing, but it
is also used to compute an item position:
position in pixels = item number * height

If the height is not an integer, this leads to a rounding error, and
depending on how the items are drawn, some of them are shifted up by a
pixel because of it.

The fix is to round up the item height when it is first computed, and
then make all computations keeping integer values.

Fixes #16377.
2020-11-18 22:36:49 +01:00
roired
c25b83c23c Include the X-Bows Nature keyboard layout into the Jamfile inside src/data/keyboard_layouts
Change-Id: Id2ae7c44131c447c9d1b99cb6d9f2c1352672d5e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3237
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-17 11:29:45 +00:00
Jérôme Duval
a1999d3b8a POSIX: add tcsetsid()
Change-Id: Ia8f41e417379dcaf4f976933cf91bb2de157bc72
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3376
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-17 07:53:28 +00:00
Jérôme Duval
e04970ad6f POSIX: add utmpx.h and function stubs
OpenJDK 14 assumes symbols and headers are available.

Change-Id: I21038e92afcfd2000ee95712bce874afd29611b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3371
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-17 07:46:30 +00:00
Murai Takashi
e497df64de file_systems/userlandfs: Fix -Wnonnull-compare
In String::SetTo(), strnlen() is called only when *str is not NULL.
This leads to "-Wnonnull-compare" warning at line 12.
So, use system's strnlen() to fix warning.

Change-Id: I55098af4e2c62ebcf3b6105b7b8f186eebf28edf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3363
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-17 07:38:39 +00:00
Murai Takashi
064bd70dcf bin/network/arp: Fix -Wformat-security
Change-Id: Ia9ceb05b555fad32bed66ad232cc1b08a1b4a881
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3369
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-17 07:25:05 +00:00
Murai Takashi
0e1b1021ea bin/multiuser: Fix -Wformat-secrity
Change-Id: Iee07090f57973d8fc687cd7d9974c7ceb4517571
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3368
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-17 07:20:36 +00:00
roired
3216a85694 Move X-Bows keyboard layout file to the correct place
Change-Id: I7ddf11a4a4ae0aa04900f97678430d9330888808
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3238
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-17 07:19:25 +00:00
X512
529fedc75c Interface kit: Resize menu if invalidated.
Change-Id: I45a966b13be6953431a1176378e4ddc10920916b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2325
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
2020-11-16 15:09:34 +00:00
Jérôme Duval
602051e8eb ext2: implement FIOSEEKDATA and FIOSEEKHOLE ioctl commands
Change-Id: I5f267620e904fe7bb294a4864a8ed017d27a7e68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3387
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-16 10:21:55 +00:00
Niels Sascha Reedijk
dfb36b35b9 Installer: fix 'clean install' over existing installation.
Whenever the target of an installation is a partition that is not empty, the
Installer prompts the user whether they would like to continue with a 'clean
installation', i.e. an installation that clears out the system folder,
excluding the settings, and cleanly installs the assets in the source's
system folder. At all other locations the source data is merged, meaning that
the source version is copied in place.

The logic that clears out the existing /system/ directory stopped working. This
change moves that logic from the copying process, to where it is run before any
file is copied. The added advantage is that the system folder is now properly
cleaned up, also stray files under the system folder will be removed.

This change does not change the logic of what constitutes a 'clean install'.
There are arguments to be made that it should potentially also drop the
settings files, as well as clean out the user's home folder for stray
add-ons, but that really is different functionality, and at this points I
think the requirements for that are not yet fleshed out.

The change was manually tested.

Fixes #16092

Change-Id: Ia6781c8d2330ba336b3921f9a980b5e31c48a2ec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3140
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
2020-11-16 09:02:27 +00:00
Andrew Lindesay
027d608682 HaikuDepot: LRU Cache for Icons
Only keep a fixed number of icons in memory at once.

Completes To #15370

Change-Id: I23e3a4fa7559894034f45afb3b536910ea037078
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3367
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-11-15 20:16:14 +00:00
Murai Takashi
55d6d58d9f mail_daemon/inbound_protocols/imap: Fix dynamic exception specifications
Remove dynamic exception specifications from Responce.c,
since Protocol::HandleResponse() handled exception handling
for ResponseParser::NextResponse() and Response::Parse().

Change-Id: I32e5cf976de765df2c8b5ca99eeaa80c57dbf254
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3384
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-11-15 20:08:15 +00:00
Murai Takashi
6c016dc54a libnetapi: Fix use after free
Fix 'fImpl' is used after delete in BNetBuffer::operator=
(GetImpl() returns fImpl), when it is used with self assignment.
Pointed out by Clang Static Analyzer.

Change-Id: Ic80a4ce73879062581b9241f84a4340919d281b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3393
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-15 20:05:58 +00:00
Alexander von Gluck IV
a756a8ad1b kernel/fs: On write, relax address check on 0 length and NULL ptr
* IEEE Std 1003.1-2017, read, write
* golang performs a write of 0 length with a NULL buffer to
  "create" an empty file. We return BAD_ADDRESS for this.
* If condition above occurs, continue as a length of 0 means
  we won't read the passed buffer.

Change-Id: I8718abb92f5865a7b6f4fb7f2b74f803497ebef0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3285
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-15 20:00:55 +00:00
X512
dad52bddc7 drivers/scsi_cd: set device name
Change-Id: I62b0a599ed2451a27069a2149ddc4e58384ed95f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3389
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-15 19:58:40 +00:00
X512
1aef13ad6d bus_managers/pci: set legacy device name to driver name
Change-Id: Idf14da8f105ab7ed6ac78053acb344045d97306a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3388
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-15 19:58:40 +00:00
user
33db0930ac PS/2 Keyboard: fix handling of Pause key.
- There is one single "Puase" key also acting as "Break"
- For historical reasons it sends a complex sequence (control + num lock) instead of having its own key code

Change-Id: I15553c0ff44fe542e3ffffa7ae1f47802d617e52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3228
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-15 19:56:51 +00:00
Autocomitter
85cf104567 Update translations from Pootle 2020-11-14 08:45:54 +00:00
Jérôme Duval
a9c09fcaae POSIX: lseek: support SEEK_DATA and SEEK_HOLE constants
this is queued for issue 8: https://www.austingroupbugs.net/view.php?id=415
this implementation calls the ioctl hook of the filesystem with BSD-like constants
FIOSEEKDATA and FIOSEEKHOLE. if the hook doesn't know the constants, we use the stat size
to return the last hole (as proposed in the draft spec).

Change-Id: I5d052eed87e29b70491a7ff534e244896469d03e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3385
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-12 10:42:11 +00:00
Jérôme Duval
fe357eb9c9 POSIX: add posix_fallocate and a preallocate syscall
the preallocate syscall will call the preallocate filesystem hook, if available.

fix #6285

Change-Id: Ifff4595548610c8e009d4e5ffb64c37e0884e62d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3382
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-12 10:41:21 +00:00
Murai Takashi
1f7ac2962b media-add-ons/opensound: Fix -Wvla-larger-than=
Change-Id: Id98018caf81ce8a2eb1069c52ee80a5ee00bfacb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3378
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-08 11:56:10 +00:00
Autocomitter
66b9faa816 Update translations from Pootle 2020-11-07 08:50:03 +00:00
Jérôme Duval
b05d6f0af0 POSIX: asprintf and vasprintf are BSD/GNU extensions
fix #16259

Change-Id: Ia16bb6e1944b87b25d1a940bbdaaf6e236db1abf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3381
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-07 08:49:34 +00:00
Jérôme Duval
21ba652bab kernel/fs: fix previous commit logic
fix #16598

Change-Id: Ie34c1563bd34dbe9c6cda92e41a2d5a96d20c3b1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3383
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-06 21:14:00 +00:00
Jérôme Duval
2a849a6457 fifo: fsync() returns EINVAL
fix #15288

Change-Id: Ic86bcec662c81cb04b743ec077cc8a2f3941f96e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3379
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-04 22:01:15 +00:00
Jérôme Duval
6878792ae4 C11: add aligned_alloc()
Change-Id: If648c0e27ed946874d393e8e33a4548b70c8ecdb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3377
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-04 21:01:42 +00:00
Jérôme Duval
26ab0d051c kernel/fs: update position when user writing with O_APPEND
when appending, pos is passed unchanged to the write hook.
fix #16506

Change-Id: I102e8e00e635d7a32cf50f09d8bd3d28dc235f9b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3373
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-04 06:19:02 +00:00
Jérôme Duval
b48159dce2 POSIX: add tcgetsid()
Change-Id: If58141b4e56b7fe444460b6808e33abc5ea71f37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3374
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-11-04 06:18:17 +00:00
Jérôme Duval
102bf4b799 kernel/x86_64: fix build 2020-11-02 18:08:58 +01:00
Murai Takashi
aaca5974ec bin/top: Fix -Wformat-security
Change-Id: I40bec25162d03f5af3a12f7b6a51d88be4c6e7b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3370
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-02 07:22:26 +00:00
Murai Takashi
56e857a499 libs/util: Fix -Wformat=
Change-Id: I2ef917da71d4e436c274dfeb13386936e1c9d2d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3362
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-02 07:20:28 +00:00
Jérôme Duval
18112d73b2 kernel/x86_64: use standard xstate length
for sse/avx when found invalid

Change-Id: I1c93e5dd8de80bf155eabb55c77119349a7186ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3372
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-02 07:18:10 +00:00
Autocomitter
5c752d3160 Update translations from Pootle 2020-10-31 08:59:25 +00:00
Jérôme Duval
071d7d3e3f network/stack: assume zero length ioctl requests are valid
posix ioctl calls don't provide a request length. Theorically these length checks
could be removed altogether.

Change-Id: Ie53f10dc8d050dd3bdf2e5a792ed79f139a24d29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3364
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-31 08:15:09 +00:00