Commit Graph

62086 Commits

Author SHA1 Message Date
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
Mark Barnett
072d3935c2 makefile-engine: Fix driver compilation on x86_64
Remove unnecessary -fno-pic and make sure x64 linker output doesn't
put too much space between program header sections. By default, the
GNU linker will align program headers to page boundaries. In Haiku's
x86_64 builds this is 2MB, which the kernel considers to be too
much wasted space.

Fixes #15702

Change-Id: I2adce69b3de74340b05f7c0e8cda44d1b25b69fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3361
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-30 07:41:17 +00:00
Murai Takashi
ebb21bd148 file_systems/netfs: Fix -Wformat=
Change-Id: I291900a38cedf6b0bf6b61e55256ba60bff7935d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3349
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-30 07:40:15 +00:00
Jérôme Duval
47472aae7b kernel: fix gcc2 build 2020-10-29 22:29:18 +01:00
Jérôme Duval
4a722a65f3 strace: Added a few more types to termios ioctls.
Change-Id: I863a0a9bc6ad7527a56465246acac073f8878809
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3365
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-29 14:31:30 +00:00
Murai Takashi
67f1eabc45 libroot/posix/malloc_hoard2: Fix -Wformat=
Change-Id: I025aece61efabe2e7b32fec2fc9aec8969bd6664
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3358
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-29 11:15:15 +00:00
Murai Takashi
d56df58f3f kernel: Fix -Wformat-security
Change-Id: Ie07933315c055ba1e6896e0bf69b12bb6bec62f9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3343
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-29 11:14:09 +00:00
Murai Takashi
edb4846779 media-add-ons/usb_webcam: Fix -wformat=
Change-Id: Ie726c7b4ef9328e5542d845a1e7276e0509c4682
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3344
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-28 16:30:14 +00:00
Murai Takashi
17904e6253 bin/df: Fix -Wformat-security
Change-Id: Ib8e3000f9b16ef055269728fde3adaf1005a4fba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3353
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-28 16:26:35 +00:00
Murai Takashi
ef2e30aaca boot/loader: Fix -Wformat-security
Change-Id: I760d2c7a99f0d20ae6d81c09f9ba786013c405d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3354
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-28 16:25:26 +00:00
Murai Takashi
4f819c8959 servers/input: Fix debug build.
Change-Id: I74f90906c12284ee8a2aea9d9525a0a39bf16e64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3359
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-27 10:11:28 +00:00
Autocomitter
d88490a505 Update translations from Pootle 2020-10-24 08:48:24 +00:00
Jérôme Duval
7335fb0d5c in6.h: declare in6_addr with a union and extra fields
According to https://tools.ietf.org/html/rfc3493:
3.2 IPv6 Address Structure
"The structure in6_addr above is usually implemented with an embedded
union with extra fields that force the desired alignment level in a
manner similar to BSD implementations of "struct in_addr"."

Change-Id: Ibe0ee685366398c143cdf9573dcb77566a12888b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3348
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-10-23 08:13:03 +00:00
Murai Takashi
fb4fd84f4d packageinstaller: Fix -Wformat-security
Change-Id: I9792b89ed0b59d509f20c43170f806a6168cbf81
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3347
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-23 07:49:53 +00:00
Murai Takashi
f7fbc22a58 servers/app: Fix -Wformat-security
Change-Id: Ia2ad0aac295c7a1ce3aafe571ae71f3aa8a4f433
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3346
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-23 07:11:59 +00:00
Murai Takashi
2613144749 bin/urlwrapper: Fix -Wmisleading-indentation
Fix misleadingly indented printf() at line 142.

Change-Id: I498d171db6a09425901a13d52a8b2eca1413a068
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3342
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-23 07:09:20 +00:00
Murai Takashi
1363e29b52 bin/safemode: Fix -Wimplicit-function-declaration
Fix implicit declaration of strcmp() at line 25.

Change-Id: I1653157b417b8b7da3936405d038150309999226
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3336
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-23 07:08:25 +00:00
Jérôme Duval
d504f219f4 POSIX: add _SC_TTY_NAME_MAX
Change-Id: Ifa24f68535d7a4a4c5fe3f01e63fe2c87adcc429
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3340
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-23 07:08:03 +00:00
Andrew Lindesay
4cd33fec63 HaikuDepot: Fix x86gcc2 Build
Change-Id: I06c94f6c09f9a4fdec3dc22a2da704225a7845c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3345
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-22 20:39:17 +00:00
Kyle Ambroff-Kao
107712bf01 AutoRaise: Properly load tray icon bitmap
AutoRaise needs to load bitmaps stored as resources in the AppRaise
image. The strategy it used before was to store the path to itself in
its settings file.

It stored the entry_ref to the image in the settings, which may not be
stable across reboots with packagefs. In addition, the path could
change at some point for any other reason.

This patch changes AutoRaise to just use the same method as other tray
applets, which is to search the process for the image containing the
AutoRaise code, and then to get the path from the image_info.

Most of the initialization work is performed by TrayView::_init(),
which is called by the constructor. Some of the operations performed
by this method can fail, leaving TrayView partially initialized. Any
error is handled by returning early after telling Deskbar to remove
this item so that it will not continue running in a partially
initialized state. Deskbar will invoke the destructor so even a
partially initialized TrayView will be cleaned up.

Fixes #16473

Change-Id: Id1ac1ef78d410a7d191cfe88f1ba1db30e258adc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3341
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-22 17:52:53 +00:00
Andrew Lindesay
a5e4976d39 HaikuDepot: Lists; Categories + Stabilities
Remove use of custom list class where it is not
really required in the area of Categories.  Also
introduces stabilities relayed over from the
Server and used in the HD user interface instead
of being hard-coded.

Relates To #15534

Change-Id: Ib71141e71cd4a0b4882827e2e59b62072de01b4b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3331
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-22 08:51:25 +00:00
Murai Takashi
380234c5d8 ICNSTranslator: Fix -Wformat-security
Change-Id: Id5b4506b66f43a776b2850c92fd352a7d25ec5a9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3334
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-22 06:10:49 +00:00