Commit Graph

61856 Commits

Author SHA1 Message Date
Augustin Cavalier
657f041aee fnmatch: Replace BSD implementation with musl one.
The BSD implementation was under the Advertising Clause,
so we might as well take the opportunity to replace the
implementation entirely with musl's.

Header also rewritten to be a Haiku one; the constants
are left unchanged of course.
2020-07-03 15:09:33 -04:00
Augustin Cavalier
6996e5b271 headers: More removal of the BSD Advertising Clause.
Taken from FreeBSD; some minor cleanup elsewhere.

udp.h rewritten entirely as it contained no copyrightable
material and bears little resemblance to BSD's.
2020-07-03 15:00:37 -04:00
Augustin Cavalier
ebffd73fc5 arpa/nameser.h: Cleanup.
* Remove functions not even FreeBSD defines.
 * Remove dependency on unnecessary headers.
 * Update copyright headers to match FreeBSD's; includes
   removal of the advertising clause.
 * Move some private structs to netresolv port_before.

Unfortunately, it seems musl implements very little of this file,
so we may wind up sticking with netresolv for its implementation.
2020-07-03 14:27:17 -04:00
Kacper Kasper
2899294cf1 app_server: Fix assert in DrawStringDry
Change-Id: I58b86860367df86b77bbdffadeff9843c9c8ab11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2958
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 08:15:17 +00:00
CruxBox
7e1b5cf809 xfs: An attempt at reading shortform dir
This patch gets read_dir, lookup and few others to work. Entries cannot
be listed yet except the root.

Change-Id: Ic4b7b61a794a1b75849e45777a383b3315b15aa8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2915
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 08:13:27 +00:00
waddlesplash
66f0993a1b Revert "BMenu: fix memory leak in scripting"
This reverts commit fb44a1cd72.

Reason for revert: may cause UAFs

Change-Id: I315ce4fc5cd1706ca07e7062fc0461b7fff7c831
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2980
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-03 03:02:12 +00:00
Augustin Cavalier
1eabd14811 Network: Update DNSSettingsView after previous API deprecation.
Create a res_state on the stack and initialize it instead of using
the private API.
2020-07-02 19:35:07 -04:00
Augustin Cavalier
1a3518cf75 Add missing includes after previous commit. 2020-07-02 19:34:54 -04:00
Augustin Cavalier
2ed1a36d4b resolv.h & netdb.h: Clean up and simplify.
* Remove all functions and a number of constants that neither
   glibc nor musl define or support (and even FreeBSD does not
   declare a good number of these anymore.)
 * Redeclare the primary flags in terms of (1 << X) instead
   of raw 0x... for readability (the constants at the end
   do NOT match up to their definitions in glibc, musl, and BSDs!)
 * Remove usage of unneeded headers, and __BEGIN/END_DECLS.
 * Replace non-Haiku license headers with the ones from FreeBSD,
   which notably contain a removal of the advertising clause.

ABIs remain unchanged, but a small set of applications that
use these esoteric APIs may not compile anymore (are there
any remaining?)
2020-07-02 19:33:51 -04:00
Augustin Cavalier
d91d9fe552 netresolv: Use a copy of resolv.h internally.
The next commits will remove libbind-isms from the public resolv.h,
which netresolv still uses, so it will need its own copy to continue
building.
2020-07-02 18:52:38 -04:00
Augustin Cavalier
22a5213517 padblocker: Remove unneeded SetSubDirSupportedPlatforms... 2020-07-02 18:52:01 -04:00
X512
fb44a1cd72 BMenu: fix memory leak in scripting
Change-Id: Ia283594a622f758189cc8280683a4e068ae1f3af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2978
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-02 19:26:49 +00:00
Alexander von Gluck IV
b4e10d71e6 arm64: Attempt to build efi bootloader
Change-Id: I90a9440898994459f8d6de922a3f363fbeddaaf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2974
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-01 13:47:07 +00:00
Humdinger
a4462d205d ShowImage: Reset slide show delay if a user interferes
This change resets the delay when the user moves to next/previous image or
page within an image (e.g. TIFF) or deletes an image while a slide show is
running.

Fixes #16321
Change-Id: If0b8f4caef9c6aa4c0ad5bbb01d65bf43c1f831f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2967
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-01 12:35:51 +00:00
François Revol
4bfd65a2b7 system/boot: Fix relocations in ARM EFI loader
The .rel.* sections were forgotten in the PE binary, so we just put them in a single .rel

Change-Id: I7bc564e18ec8dd64410b43106272ee74696c2883
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2973
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-06-30 16:25:07 +00:00
Kacper Kasper
009df98c86 app_server: Fix gcc2 build 2020-06-29 19:44:57 +02:00
Humdinger
72fcffef9d Installer: GUI change initialize -> format
DriveSetup terminology was changed a while ago. Disks get 'initialized'
with a partition map. Partitions are 'formatted'.

Change-Id: I600145cdd1ed622378d364aa66a6146aae4a9a87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2968
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-29 17:20:21 +00:00
Alexander von Gluck IV
595b4d406e efi: Ensure MultiBootSubDirSetup runs in arch directories
* Otherwise, important HAIKU_BOOT_* flags don't make it into
  the build commands.
* Ensure any external sources used by EFI get recompiled
  vs reused due to potential differences in wchar length
  (EFI dictates short-wchar, but no wchar's in our code)

Change-Id: I7a4a0347d39239c73fa510378e048f51be1cd360
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2965
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-29 16:20:37 +00:00
Alexander von Gluck IV
9f739dd2e8 u-boot/arm: Break script out of Jamfile. Add EFI support.
* boot.scr was growing past Jam MAXLINE and was causing segfaults
* Break out to tree, data/boot could be used for other arches
* boot.scr is getting a bit complex, but supports the old
  u-boot haiku_loader, as well as u-boot starting our EFI loader.

Change-Id: I93a3167ab0bc78747c1d70fedd08595e9ac89662
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2963
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-29 16:18:32 +00:00
Kacper Kasper
97bd6fe8d4 app_server: Implement more composition modes
* Use agg::comp_op classes to blend pixels.
* Subpixel path not implemented.
* Needed by WebKit.
* Implements #10274.

Change-Id: I07b0002196fd0a05fc100bd9f6d703c33cadc85b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2932
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-29 14:07:42 +00:00
X512
cc30c791bd TV: fix scripting
Change-Id: I84e8f87ff7f84d0624bfea72c2e12d148a5a2562
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2959
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:42:52 +00:00
X512
213e62a7a0 Input: fix MouseView drawing
BeginPicture/EndPicture do not save state so origin should be restored
after recording picture. BView::Draw use PushState internally so origin
is added and cause problem.

hrev54347 fixed behavior when recording picture so state change is
affected. It revealed #16317 bug.

Fixes #16317.

Change-Id: Iee69631ce83fea5ea73c99b492b8cf67d1b148c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2960
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:39:42 +00:00
Adrien Destugues
445f9c6c92 IPP: Accept replies without content-type
My printer doesn't include a content-type in its replies.
If a content-type is present, it should be the expected one. But if the
printer doesn't specify it, we can try to parse the reply and see if it
makes sense. Since the reauest has a content-type, it's reasonably safe
to assume the reply will match the requested content type.

Change-Id: I0fce7edd7cc40d2761b683d3e4c7b5316436e298
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2962
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:37:30 +00:00
Adrien Destugues
33984e7b7d IPP: remove custom URL implemenation.
Use BUrl.

Change-Id: I40ce72fc34b2ba4f5980eee3cc81cba58c74a43a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2961
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:37:30 +00:00
Heinrich Schuchardt
35323f65d5 efi: create map file
When debugging the EFI bootloader it is helpful to have a map file
available.

Write file efi.map when linking.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Change-Id: I6d566df50fb2713f53375970f6645353bac54042
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2964
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-06-28 21:04:29 +00:00
Andrew Lindesay
dc8d6e73f8 HaikuDepot: Custom List Removal
Remove use of custom list class in the python-
generated model classes for interaction with
HDS; use STL container classes instead.

Relates To #15534

Change-Id: Ib8f4942b55859c1af38da816591e911174ba52ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2957
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-28 08:39:20 +00:00
X512
43def5e333 Fix source code encoding
Make it correctly readable as UTF-8 encoding.

Change-Id: Ifef77aa988b8d45c485927b698526e234711425c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2955
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-27 16:58:05 +00:00
Murai Takashi
c23cd33c75 file_systems/fat: Fix usage of sizeof()
Fix suspicious usage of 'sizeof' with a numeric constant
as parameter.
Pointed out by cppcheck.

Change-Id: Icf43843bb92b3db0634c20ddce38e2fe1099c552
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2954
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-27 15:09:04 +00:00
Autocomitter
1a83eab65b Update translations from Pootle 2020-06-27 08:16:31 +00:00
Murai Takashi
6b3cfabfd4 libnetapi: Fix if condition
Fix length[0] != '+' could not be checked.
Pointed out by cppcheck.

Change-Id: Ic4697dc9ffd04afcd92ef3ed65485e1fe3f32e76
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2950
Reviewed-by: leorize <leorize+oss@disroot.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-26 23:50:53 +00:00
Axel Dörfler
1487a24238 lsindex: Fixed wrong errno code to be shown
* When we want to inspect errno after readdir() (or fs_read_index_dir(),
  which is the same), we need to reset errno beforehand as documented
  in the OpenGroup Base.
* Minor coding style, and license header fixes.
* This fixes the wrong error code from #16301, but not the underlying
  issue.
2020-06-25 22:21:23 +02:00
Axel Dörfler
60162d0118 fs_index: Clarified errno setting 2020-06-25 19:11:05 +02:00
Murai Takashi
1e9cdb0bd8 bin/setversion: Fix if condition
Fix str = "gm" could not be checked.
Pointed out by cppcheck.

Change-Id: I433a98cef851e07be0905eee2f5100a02fa6a32b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2949
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-25 14:11:37 +00:00
Murai Takashi
c89d626d0e kernel/arch/x86: Fix PVS V773
Fix choose_link_device_configurations() was exited
without releasing the 'link' pointer.

Change-Id: I1620e63779975305776ffad717cbe2c07f4e022f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2948
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-25 14:11:37 +00:00
Murai Takashi
69d1697649 userlandfs/server/fuse: Fix PVS V773
Fix FUSEVolume::OpenAttr() was exited
without releasing the 'cookie' pointer.

Change-Id: I8bf08268c77e1c9704227b1d4c7c94ddcc8b09a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2947
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-25 14:11:37 +00:00
Murai Takashi
ece405c749 add-ons/kernel/busses/i2c: Fix Memory leak
Fix init_device() was exited without releasing the 'bus' pointer.
Pointed out by cppcheck.

Change-Id: I0ec1a78caa83d7d34a3d88fee64716dcbbc82dd2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2951
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-25 14:09:30 +00:00
X512
9bc51ee07c BLooper: implement scripting
Change-Id: I73dd301ca7109675a4b629464ba7275a8095c77b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2940
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-24 14:08:28 +00:00
X512
079e9eef15 BListView: complete scripting support
Change-Id: Iff4b5cb775d1c0b0e588459429d6df7fb93a760e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2945
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-24 14:08:16 +00:00
X512
8fbce87334 BMenu: implement scripting
Fixes #15540.

Change-Id: I965d04bcbb6db41cc7a744d18fa3c9ffab2a81f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2941
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-24 14:08:16 +00:00
Preetpal Kaur
abbd654ba9 Added 6th button in Mouse GUI
- Correct button size of 4 and 5 buttons in Mouse GUI.
- Button number are in squence now, added the default values.

Change-Id: I915077d11f9212c47c782fd9296b9f5b8909ed09
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2509
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-24 06:28:04 +00:00
Alexander von Gluck IV
398b7899e8 arm: Generate proper mmc image
* Stub out makebootable like on u-boot
* Place haiku_loader.efi at EFI/BOOT/BOOTXXX.EFI
* Generate boot.scr for u-boot + EFI
* haiku-mmc.image now attempts to auto-boot in qemu-system-arm
* Same code paths should roughly apply for arm64,riscv,etc

Change-Id: I563ebd77422d9e5dfcfeeedadcbc60471e8a57f4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2938
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-22 18:48:20 +00:00
Adrien Destugues
90530755d2 Build fix. 2020-06-22 20:08:15 +02:00
Augustin Cavalier
cbf71a819f libnetwork: Replace some basic inet_* functions with the musl versions.
This beings the replacement of the libbind/netresolv-based implementation
with musl's equivalent. The code is less well commented in some places,
but it is well-designed and well-maintained, and the licensing situation
is much cleaner than the multi-BSD-licensed libbind-derivative code,
as well as being actively maintained (supposedly NetBSD has taken over
libbind/netresolv, but have not posted any portable code since 2013.)

The eventual goal is to replace the entirety of NetResolv with code
from musl, which will be an involved process as ABI compatibility
will be a problem. These functions at least are extremely
straightforward to replace.

Change-Id: Icfefaa90cbf56b012e4e42360be5b0f0c16d73bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2943
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-06-22 16:02:31 +00:00
Augustin Cavalier
17dab0d52b inet.h: Remove "cidr" functions.
These are not in the standard and are not declared by glibc at all.
The symbols remain for any applications that are still using them,
for now.\

Change-Id: Ie6b4a6b5ec3231c304e05ce9cb38c67d9ee51ad7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2942
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-22 16:02:31 +00:00
Preetpal Kaur
13b45a2ea3 Integrate PadBlocker in input preferences
- Import padblocker sources
- Add slider to set padblocking time
- Generates PadBlocker settings

Fixes #11673

Change-Id: Ic88416215aabb1ae6aba79ff41cb55a7f0f8008d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1590
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-22 15:08:48 +00:00
X512
1e4192fc86 Magnify: fix scripting
Change-Id: If7f283d35c4af894c0db58ea015b4f3ea278ecdd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2939
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-21 18:08:07 +00:00
Augustin Cavalier
176d0e1041 app_server: Make use of BReferenceable in AlphaMask.
Extracted from https://review.haiku-os.org/c/haiku/+/2695
with a few minor tweaks.

May help with #16246, but I could only reproduce it intermittently.
2020-06-20 20:02:35 -04:00
Augustin Cavalier
67ace0bfab app_server: Use RecursiveLocker in AlphaMask instead of BLocker.
This avoids creaing a semaphore where it is not needed, especially
as most of these locks are never used from another thread (in the
reports in #16246, there are thousands of semaphores from this
with only a small handful having a "last acquirer" != 0.)
2020-06-20 19:46:22 -04:00
Augustin Cavalier
b344d252e9 kernel/file_cache: Move write_zeros_... call out of else.
Style only, no functional change. Requested by axeld.
2020-06-20 17:21:56 -04:00
Augustin Cavalier
be1cc9c890 kernel/vm: Make the page_scrubber wait on a condition.
On an idle system with 1GB RAM and the 100ms timeout, it takes multiple
minutes for all the pages in the system to get cleared after boot, but once
they do, the page scrubber will then remain idle for seconds to even
minutes at a time, so this is clearly worth it.

The "free pages condition" was unused before this commit, so I have
repurposed it (and unpublished it.)

Change-Id: I7034677a1e51c97c2baf11b772db3a31c0e1adfa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1699
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-20 21:18:57 +00:00