Commit Graph

61193 Commits

Author SHA1 Message Date
Jessica Hamilton 51429f0417 kernel/efi: Drop device_set_path_end. Fixes booting Haiku with EFI under qemu
Change-Id: Iafa6cf064675d5f2beb134a6c6a906d137c70dc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2040
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-12-22 10:59:34 +00:00
Alexander von Gluck IV 485b5cf8bc efi: Refactor our EFI code to use fuchsia's cleaner EFI headers.
* Drop gnu-efi

Change-Id: Ib601fc8ced49b18281b6b98cf861a5aef1b9c065
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2026
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-22 10:59:34 +00:00
Jérôme Duval 571148258b hmulti_audio.media_addon: stop the output thread on BTimedEventQueue::B_STOP
fix #15263

Change-Id: Icd305668365067a89f3f952465bfe2aef84e8d0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2045
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-21 20:33:11 +00:00
Jérôme Duval b073975e18 media: fix 64-bit debug build
Change-Id: Ie8c19fc5f067da9973cc52ec4c787a4ad36e390c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2044
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-21 20:33:11 +00:00
Jérôme Duval 0749734769 launch_daemon: don't relaunch when a shutdown is in progress
Change-Id: Ice0dd504f65f592eb64ec0e2192ef42b88486daa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2043
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-21 20:32:31 +00:00
Jérôme Duval feeb4b5d93 RosterPrivate: add IsShutDownInProgress()
enable to check whether a shutdown process is in progress.

Change-Id: I8efdddb3caa80e9fd188f202b6e92a888a7608e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-21 20:32:31 +00:00
Zotyamester a02f7c7bae Terminal: Fix double-freed memory
The base problem was, that every time I opened KeyMap while a Terminal
was opened too, it eventually crashed. I followed along the trace and
found that the code first frees the keymap and keymapchars in the
_UpdateKeymap() and then calls SetKeymap for every tab opened which
also tries to free the old keymap and keymapchars.

TermWindow's _UpdateKeymap() method first frees the old keymap and keymapchars:

delete fKeymap;
delete[] fKeymapChars;

and then calls SetKeyMap for every tab which tries to free the old keymap and keymapchars again:

for (int32 i = 0; i < fTabView->CountTabs(); i++) {
	TermView* view = _TermViewAt(i);
	view->SetKeymap(fKeymap, fKeymapChars);
}

So TermView simply is not responsible for the memory, it merily has a pointer.

Fixes #15502.

Change-Id: Id08c863d811fbb72cce9be4c8fff2d3eb5f0064f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2037
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-12-21 16:49:45 +00:00
Autocomitter eeb89ccd8b Update translations from Pootle 2019-12-21 08:48:38 +00:00
Michael Lotz ca93f8fbc2 Fix leaking the IO context buffer when opening input fails.
The context buffer needs to be freed manually. This was already done
correctly in the destructor, but was missing from the error case.
This lead to a leak of at least 32K for the initial allocation or
potentially a lot more, depending on how much avformat_open_input
extended it for probing.

Change-Id: Ib4c751c7de9430926ae82b397803ac93ecfffe5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2038
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-12-20 21:04:04 +00:00
Panagiotis Vasilopoulos 1ae464b9cf PVS 583: removed unnecessary ternary operator
Change-Id: I8f2b93863e6379e998b974c86980b712a8c1b12e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2022
Reviewed-by: François Revol <revol@free.fr>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-17 07:49:21 +00:00
Augustin Cavalier 6302cfeda2 sis19x: Replace native driver with the one from FreeBSD 12.
As per #15550, it seems the native driver does not work and causes
the system to lock up. Hopefully the FreeBSD driver will fare better.
2019-12-16 18:43:10 -05:00
X512 bb501d4c74 BTextView and BListView: fix scripting
fix #15539

Change-Id: I5139b91214e19b35af1ead203c070837b7a15bd9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2017
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-12-16 09:51:16 +00:00
Autocomitter 2b2bfa3f27 Update translations from Pootle 2019-12-14 08:42:48 +00:00
Alexander von Gluck IV ed7204fad2 gpt: Correct naming. efi_* also conflicts with some efi headers
Change-Id: I19b5b2c4609da8474b26588ae8d7d4caf72a826b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2018
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-12-13 23:53:07 +00:00
Jérôme Duval 418e068de3 Terminal: fix TermView scripting
fix #15532.

Change-Id: I342d72c8de7a4e352329adb0510e3c7341702ef7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2016
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-12-13 13:12:36 +00:00
bitigchi 07161b817b Fix qt mark/Add TR Lira Symbol/Add non-break space
On Turkish F layout Shift+2 produces single quote, although it
should return double quotation mark. Probably this is a result
of an error whilst copying from Turkish Q layout.

Turkish Lira Symbol has been added to the both layouts,
produceable with ALT GR+T, as this is the standard combination
on Turkish layouts.

I've also noticed that most of the keys produce a whitespace with
the ALT+GR modifier, fixed that one as well.

This commit also adds non-breaking space to ALT GR+Space modifier

Change-Id: I9eb47ae70449c75b15b551f081f8767b1ab03cc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2004
Reviewed-by: John Scipione <jscipione@gmail.com>
2019-12-12 07:57:40 +00:00
Adrien Destugues baa739985b FileGameSound: remove superfluous parentheses.
Pointed out by Axel on haiku-commits.
2019-12-11 13:24:39 +01:00
Alexander von Gluck IV f2ad50f6a2 repo/ppc: Sync up repo to fix build.
* This doesn't make sense.. I know. See #15498

Change-Id: I280224ec9b7a4f8d91c9031f51073af8112f2d67
2019-12-10 13:43:34 -06:00
Alexander von Gluck IV 6f9861ccf7 docker/bootstrap: Add missing autopoint tools
Change-Id: I3dd3de1611f55d92b1f3c1edde28d4807a5aec8a
2019-12-09 13:45:14 -06:00
Alexander von Gluck IV 5c9ee5d028 docker/bootstrap: rename init to prep to be consistent
Change-Id: Ie6dc9061b13b23997f84a1ffe886d7e09c242cf0
2019-12-09 13:45:14 -06:00
Naba7 a8edaa2b21 Add some documentation for BUrl.
Change-Id: I9db68f77d80c246fce5011247471972c3f1bf68a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1419
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2019-12-09 19:00:20 +00:00
Alexander von Gluck IV b84574958d 3rdparty/docker/bootstrap: Fix a few potential mis-steps during the bootstrap init
Change-Id: I381fd7c00957e9d6797b0a79beacdef981593d3f
2019-12-09 10:28:45 -06:00
Kacper Kasper c67dde0f2c app_server: Add tiled bitmap drawing routines
Change-Id: I9a7bd967f2cc95d815a66707b764cf5e33b3f8ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1962
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-09 12:22:28 +00:00
John Scipione 4dcc9761a7 Screen prefs: Center Workspaces Columns and Rows
... limiting spinner textbox width instead of growing arbitrarily.

Change-Id: I8eaff4e8c43116a7fff51f21e4713b9b71efefb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1982
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-09 12:21:48 +00:00
Adrien Destugues 69f814cded BFileGameSound: allow initializing from a BDataIO
There is no reason to not allow this, and it makes it possible to load
data from eg. a BResource instead of a file, which is very useful.

Remove some unused members in the class and dead code, and fix style
issues.

Change-Id: I94cbd0c13c469ea80f55028cf33dfde2de4365ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2001
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-12-09 12:00:17 +00:00
Andrew Lindesay 041bbff9b0 HaikuDepot: Better Logging of Cache File Creation
A user has reported having some problems around
initial use of HaikuDepot and this seems to be
related to setup of the directories etc... at
start time.  This change should improve the
logging so that it is easier to identify the
cause.  Also some additional locking has been
introduced as there might be a problem where two
threads are creating the same directory at the
same time.

Relates to #15493

Change-Id: I4cbfda7c2ce87b8509ceb78788b7995ee3185050
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1980
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-08 09:43:20 +00:00
Murai Takashi 4de612c9b5 bin/debug/profile: Fix -Wformat=
Change-Id: I94f9e4e68b75a7b84883d1bb7fe3f4e0aa7c6b8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1563
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-07 16:06:50 +00:00
Murai Takashi 7f58661749 userlandfs/server/beos : Fix -Wformat=
Change-Id: Ic39bf1cc28a94ef8d338c90ea357091e63e7c6e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1561
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-07 16:06:33 +00:00
Adrien Destugues 16fca25e27 runtime_loader: fix crash because of missing initialization
The "versions" table is populated from two sources: the elf
"needed_version" and "version_definitions" tables. Both populate
specific index in the version table. Each index has an hash, and one or
two strings.

The algorithm to find data in this table is to compare by hash, and then
do an strcmp on the strings when the hash matches.

However, nothing guarantees that all the indices in the version array
will be used. Indeed, libavutil does not use the first two. These were
left uninitialized.

It could happen that one of these would accidentally have its hash equal
to one of the actual hashes we need to lookup, and invalid string
pointers. This would of course lead to a crash. This was reproductible
easily with WebKit when loading the fmpeg add-on. I guess that hit just
the right allocation/deallocation pattern to make the runtime_loader
reuse memory from a block where it had previously stored the same hash.

Anyway, just clear the whole version table after allocating, so that
unused entries have an hash of 0 and NULL string pointers, this way they
can't accidentally trigger a hash collision and crash everything.
2019-12-07 16:05:11 +01:00
Murai Takashi 2a49e094a6 Tracker kit: Fix memory leak
Like moveList and copyList, duplicateList could be deleted here.
Pointed out by Clang static analyzer.

Change-Id: Ic80181af960bc8eb759449ea5719e9a439a877a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1996
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-07 09:32:09 +00:00
Autocomitter d30c60446a Update translations from Pootle 2019-12-07 08:47:19 +00:00
Adrien Destugues 74db79d587 intel_extreme: Fix swapping of p2 values for 9xx cards
This would lead to no valid PLL combination being found, and
uninitialized stack memory eventually used to set the PLL. Add a memset
and a debugger() call to make this easier to notice.

Should fix #14368

Change-Id: Iff307439dc82a8b81bb46c1b73b63c21ee1c8279
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1898
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-05 19:55:57 +00:00
Adrien Destugues af3d90a597 Attempt to fix gcc8 build. 2019-12-05 20:14:08 +01:00
Adrien Destugues b819569ef4 usb_video.h: build fixes
- Remove duplicate and otherwise unused lendian_bitfield.h
- Adjust listusb jamfile to use lendian_bitfield.h
- Fix various typos in usb_video.h and restore some fields to make
  listusb happy
2019-12-05 18:28:12 +01:00
brjhaiku f57d609e9b USB_Video.h: add more definitions from the spec.
fixes #5940

Change-Id: Idb9ae8dfdaa9f0fab43be3767bf97e1c87245940
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1022
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-05 10:55:29 +00:00
Ynoga 09b40d1634 ppc: Minor tweaks to get the arch compile again (WIP)
- Factor in types changes (introduction of intptr_t)
- Align JamFiles syntax with in progress architectures (arm/sparc)
- Xorriso doesn't support much of the mkisofs options (anymore ?)
- (After a correct bootstrap) one should be able to build @minimum-raw and haiku-boot-cd again
Change-Id: I4f779ad8f2210389fa9b7f7c0a98c3652a64c257
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1983
Reviewed-by: François Revol <revol@free.fr>
2019-12-04 18:34:31 +00:00
Adrien Destugues 4236826da6 BGeolocation: build fix 2019-12-04 17:42:53 +01:00
Augustin Cavalier caef66c2cd freebsd_network: Return to allocating the segments in dmamap_load.
It seems some drivers do not create dmamaps for all their bustags,
so we can't allocate the segments there. And of course, some also
do not go through dmamem_alloc, so the only option then is to revert
to where FreeBSD allocates them, inside dmamap_load.
2019-12-03 17:52:23 -05:00
Adrien Destugues edc5a2174e BGeolocation: add position to country mapping
Using the geonames.org API, so we will need an API key for it (similar
to the one used for MLS, deployed by the buildbot)

The unit tests uses the "demo" user, which is restricted to 20000 API
call credits and often expired. But we cannot use our secret key here as
it would need to be available to anyone running the test. If we ever get
to automate running the tests on a buildserver we could probably make it
use the secret username known by our buildbot instead.

Change-Id: Ia16880db82555ce85505ad28e1c623f692f46be0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1873
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-12-03 08:01:14 +00:00
waddlesplash 7100b1e1f5 freebsd_network: Move segment array allocation in bus_dma to dmamap_create().
It seems that some drivers (e.g. broadcom43xx) create a parent DMA tag
with nsegments set to BUS_SPACE_UNRESTRICTED, i.e. MAX_INT, which of
course fails allocation, expecting to never allocate memory for this
tag, only for child tags. So in order to handle this, we have to
delay allocating the segment array until we are certain that the nsegments
value is the "real deal".

Doing it in dmamap_load would be fine, but as there is more than one
entry point to that, we would have to allocate this in multiple places.
dmamap_create() must be called and there is only one way through it,
so put the allocation there.

Fixes #15500 (i.e. both the KDL and the underlying problem that
led to it; it only crashed because the wrong pointer was passed
to kernel_free, whoops.)
2019-12-02 20:37:52 -05:00
Adrien Destugues 70cdd7d4f5 BCountry: add SetTo and InitCheck.
Change-Id: I5fbc2a1c0e735d6edeb23672017bb64d1b3f4390
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1872
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-02 12:32:15 +00:00
Joachim Mairböck b4c187b004 hda: add necessary quirk for SiS Azalia Audio Controller
Fixes #15499.

Change-Id: I8bc6df5770f902b6b43e54d80bcfee4afc42f0bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1981
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-11-30 17:26:42 +00:00
Autocomitter e1d1ce10bd Update translations from Pootle 2019-11-30 08:47:21 +00:00
Andrej Antunovikj e41c35ae56 kernel/elf: Replace sprintf with snprintf
In two places in elf.cpp, sprintf is used which does not check for buffer overflows. This could potentially lead to malicious executables trying to reach memory
they are not supposed to. Instead, it's possible to use snprintf with a sizeof() call.
I'm not very well-versed into C/C++, so this is just based on what I've learned. Please do provide feedback, I would like to get into more useful contributions :)

Change-Id: I9c36a9938f9c99b3849e77aa9cd2eab313f5bb95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1975
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-11-28 07:44:28 +00:00
Alexander von Gluck IV 1f8acf0862 HaikuPorts: Bump gnu_efi_kernel build-package for arm
Change-Id: I0e0791ebf06a2455896196d1cf0ed41979822619
2019-11-27 13:57:54 -06:00
Alexander von Gluck IV b482adb1bc kernel/boot/efi: Continue breaking apart arch-specific code; hpet
* Move x86 hpet behind timer interface.
  * Add a few if x86,x86_64 macros to start.cpp.

Change-Id: I583ec1b064785182e6d48dfbcd91b1bb2ead4b44
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1929
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-11-26 21:34:43 +00:00
Humdinger 9e15c9f153 Adding the Quick Tour
* Add a link to the Quick Tour to the desktop.
* Remove the Welcome page from desktop. We don't want to clutter
  the user's desktop more than necessary. As "Home" page of
  WebPositive, it's still very visible.
* Mention the Quick Tour in the Welcome package description.
* Add a "quicktour" script similar to the welcome/userguide
  that opens the online version if it's not installed locally.
* Add icons to the userguide and quicktour scripts. Fixes #14706.
* Add bookmark and launcher for the Quick Tour.

Adjust the AddFileDataAttributeRule to create its temporary file in
the "common" architecture, the file is not architecture specific.

Add a rule PrepareScriptWithIcon in src/data/bin/Jamfile to assign
an icon and make the script executable.

Change-Id: Ia7604ff4715a5aaf9a645c1b3333a954d6a4dafc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1924
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-11-26 06:39:58 +00:00
Andrej Antunovikj edfd1a7b68 Fixed minor typo in ProfileMessageSupport
Change-Id: I3ce60d4a9a1bb43bdec73ee2baebe8348a1de9b1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1974
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-11-24 19:15:27 +00:00
Adrien Destugues cf1a78566c netresolv: enable weak symbols
It's simpler to have these around, they allow autotools to find the
functions the regular way (using AC_SEARCH_LIBS) as the autotools don't
use the include file and can't see the #define we are putting there to
redirect to the __ prefixed version of the methods.

Change-Id: I6a9743e88503fbdcba98e276375bc11f73a64411
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1889
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-11-24 15:08:18 +00:00
Adrien Destugues 1f391e37ea Switch back to hoard2 for now.
We'll reconsider rpmalloc when it has less overhead.
2019-11-24 15:35:51 +01:00