Commit Graph

62316 Commits

Author SHA1 Message Date
Stephan Aßmus
60c165a53c BSecureSocket: Treat SSL-zero-return as B_IO_ERROR
Somehow B_CANCELED doesn't seem to convey the correct
meaning. Using B_IO_ERROR will also fit to the recent
changes in the Package Kit and will trigger a re-try of
package downloads.

Change-Id: I58c4d4faa705e6519e0ff9ec7c4654a6151e5486
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3635
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-16 16:32:32 +00:00
Autocomitter
648fdf2310 Update translations from Pootle 2021-01-16 08:51:22 +00:00
Jérôme Duval
837f4f48db kernel/thread: restore signal mask just before returning to userland
* otherwise the signal to be handled might be blocked. fixes #15193
* also remove automatic syscall restart on _kern_select, to match Linux and
BSDs behavior: this fixes parallel build with newer gnu make, which happens
to use pselect.
* also remove automatic syscall restart on _kern_poll.

from https://man7.org/linux/man-pages/man7/signal.7.html
"The following interfaces are never restarted after being
       interrupted by a signal handler, regardless of the use of
       SA_RESTART; they always fail with the error EINTR when
       interrupted by a signal handler: ...
	select(2), and pselect(2)."
from https://notes.shichao.io/unp/ch6/
"Berkeley-derived kernels never automatically restart select."

Change-Id: I7f86d221eae1ad93d8a308a75581d2c30a369c9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3627
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-15 17:41:33 +00:00
Alexander von Gluck IV
4d0b11bd22 efi/riscv64: Fix missing PE32+ sections, fix characteristics
Change-Id: I13726e7b0ca7500edbb6f182d2c2e7caaddfb72e
2021-01-14 18:19:04 -06:00
Murai Takashi
d271659f96 audio/ac97: Fix DEBUG build
- Fix VERSION macro in auich.h / auvia.h, used for log_create()
  in debug.c.
- Add string.h to debug.c for strlen().

Change-Id: Iff4878763f49fe5b7e317c47e96ebd79f90725c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3629
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-14 20:47:49 +00:00
X512
111df1707b Tracker: add more string types to attributes view
Used in MIME database.

Change-Id: Ieaff506ea8be0fe7d57bfe76fd63439ef4952116
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3625
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-14 18:31:10 +00:00
Adrien Destugues
c2e78713f8 ProcessController: reintroduce the static scaling mode.
There is a very good reason to have this: for low number of cores, the
default computation makes stupidly large bars.

I had tested my changes with various number of cores (1, 2, 3, 4, 8, 16)
in QEMU to make sure it looked correct in all cases. I don't understand
why kallisti5 reintroduced broken code.

This reverts commit b18298348a.
This reverts commit b1b6769b6f.
2021-01-13 13:06:01 +01:00
Adrien Destugues
0e061f0903 FindDirectory docs: clarify where the functions are located
Only the C++ interface is in libbe. The C functions as well as the new
find_path functions are all in libroot.

Fixes #16749
2021-01-13 12:57:00 +01:00
Adrien Destugues
2aa5a0353d mmc_disk: disable currently non working code
Switching to 4 bit mode requires some more coordination as the host
controller must also be switched, right after sending this command.

I will revisit this, but the previous commit was accidentally pushed to
master.

At least we get the 25MHz clock instead of 400kHz, that should already
be quite a performance improvement.
2021-01-12 22:50:00 +01:00
Alexander von Gluck IV
f8650bc2db jam/ArchitectureRules: Bump SDIMAGE_BEGIN to 2KiB
* If we start at 0 we overwrite the partition table
  with the EFI boot filesystem

Change-Id: I7d1d5d65cdaf78f3bd3b87672e1e8e161f78ce75
2021-01-12 15:03:40 -06:00
Adrien Destugues
522c141d53 [WIP] sd/mmc: enable high speed transfers
- Switch to 25MHz clock
- Switch to 4bit transfers mode (the default is 1bit)

Reading and writing SD cards do not seem to work anymore with these
changes. I get invalid data on read, and on write, an interrupt is never
called in some cases.
2021-01-12 22:01:43 +01:00
Adrien Destugues
cf15598562 sdhci_pci: style fix. 2021-01-12 22:01:39 +01:00
Murai Takashi
68ff03664f mail_utils/mail: Fix -Wwrite-strings
Change-Id: I57f231cca2137daee8f1f2f3caa6cd9f282be0ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3626
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-12 16:27:24 +00:00
Murai Takashi
acada5ef55 spamdbm: Fix -Wmisleading-indentation
Change-Id: I0f7d5a10e2068f2359f93afff35f44db81b66a53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3624
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-12 07:44:40 +00:00
Adrien Destugues
2413679304 sdhci_pci: support for inserting cards after boot.
Change-Id: Ic67ea38bb80b35528ebb1a150d1a916a56184e69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3617
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-01-11 08:11:37 +00:00
Alexander von Gluck IV
b18298348a ProcessController: Just toss static scaling mode all together
* It was making things confusing and honestly the dynamic
  calculation code does a pretty good job.
* Just make sure we scale the scale the CPU bars with a
  multipler that makes sense for a minimum width.
* This should give us a good baseline. Tested 1 to 32 cpus

Change-Id: If41c73e68b2de2b39196013af13e6c0ffdbe6489
2021-01-10 19:06:36 -06:00
Alexander von Gluck IV
b1b6769b6f ProcessController: Fix static scaling mode after hrev54874
* We saw a "big" cpu bar on 1 core.
* This was because adding 8 to the static "15" width
  resulted in the static CPU sizing code getting disabled
* Converting this to 4 just completely disabled the static
  scaling code and made dynamic always enabled

Change-Id: Ida8c718c0d0a2fcf72aedbf525daad040d5b3678
2021-01-10 18:12:53 -06:00
Adrien Destugues
b181ea960c xsi_semget: fix possible way to crash the kernel
I don't know if the behavior makes sense, but anything is better than a
kernel crash. The ticket is an example calling the syscall directly,
so there is no user-oriented guarantee on how we behave here.

Fixes #16741.

Change-Id: I803596004d005c8c0e058c5422c4b0f7c78cfad8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3623
Reviewed-by: Rene Gollent <rene@gollent.com>
2021-01-10 22:08:33 +00:00
Máximo Castañeda
7f9c675629 MediaExtractor: access chunk cache only when we have it
Change-Id: I533bb2e25b0756acaaa227cdd06c4067d4120066
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3622
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-10 22:07:16 +00:00
Jérôme Duval
f9b26e4c30 xhci: SubmitNormalRequest: divide exception on zero trbSize
workaround for #16586

Change-Id: Id9d538f46b62585f4a12c3796781ae1207ed2454
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3611
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-10 21:58:02 +00:00
Adrien Destugues
b8d6e720ba DriveSetup: allow formatting a mounted partition
It is automatically unmounted, if possible.

Part of #16304.
2021-01-10 21:32:30 +01:00
Adrien Destugues
7de9578142 ProcessController: fix huge bar for low CPU systems 2021-01-10 20:46:59 +01:00
Adrien Destugues
7b661b559e BSecureSocket: fix read error handling
The current documentation
(https://www.openssl.org/docs/man1.1.1/man3/SSL_read.html) says that
SSL_read returning 0 should be handled as an error. So, let's do that.

Change-Id: I6781826ea700b6e597fd2d444fd96a1a5270c6cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3620
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2021-01-10 17:34:44 +00:00
Alexander von Gluck IV
1ccfdb2bd5 system/boot: Fix u-boot build under arm
Change-Id: Ie10acfd10e8feab71660f99938cbb5bbab565772
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3618
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-10 16:56:23 +00:00
Adrien Destugues
f377a91a31 ProcessController: gcc2 build fix 2021-01-10 16:20:06 +01:00
Adrien Destugues
98791e6d67 intel_cstates: provide more info in panic
This should help understanding the problem in #16546, which we don't
understand how it can happen.
2021-01-10 15:52:14 +01:00
Adrien Destugues
d9848639c6 DriveSetup: clarify partition state
DriveSetup does not make it clear when there is empty space or when a
partition is not formatted. Reword things a bit to make this easier to
understand.

This was a common source of confusion in various video reviews of Haiku,
with people trying to install Haiku to a partition that had not been
formatted.

Part of #16304
2021-01-10 15:12:46 +01:00
Alexander von Gluck IV
c38dea9e37 processcontroller: Scale up width on high core counts
* 4 cores or less, use static table. More make view larger.
* 16 cores or less, 2px CPU bars
* More than 16 cores, 1px CPU bars
* Tested through 128 cores in qemu

Change-Id: I5fb460e7ee5848d0395b109acc602e86f4d5bbd7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3616
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-10 13:47:08 +00:00
Adrien Destugues
61282f9574 Tracker: fix invisible selection text in disabled windows
Regression introduced in hrev54742 which used DeskTextColor() on a
non-desktop view. The view color isn't set anywhere in that case and
does not match the background color, which led to drawing white text on
a white background.

Moreover, a second bug was stacked on that: the selection is drawn in
"reverse video" (using the document color for the text and document text
color for the background) only for active windows. For inactive ones, it
is drawn normally, and then a middle-grey rectangle is alpha blended on
top. Add a comment to clarify that and reintroduce the ckeck that had
been removed.

Also replace the hardcoded black for the selection background, so it
will be more easily visible for people using dark mode.

Fixes #16627.
2021-01-10 13:49:17 +01:00
Adrien Destugues
e3927d6ad4 Haiku control look: bring back the tab seams
They were accidentally removed in hrev54634 in an attempt to clean up
the code.

Reintroduce the old logic with some cleanup and improvements:
- There was a mixup of "tab side" vs "border". The constant values for
  the two are the same, so it still worked as designed, but it made the
  code harder to follow since it deals with both borders and tab sides.
- Define an isVertical boolean to decide if the tab view is vertical,
  avoiding repeated tests for specific tabview sides.

Fixes #16640.
2021-01-10 13:01:05 +01:00
Adrien Destugues
c37693ddac KeyboardLayoutView: remove B_FLAT button flag for drawing keys
We do not want flat buttons here. This was introduced to get the Be
control look to draw inverted color labels on the buttons, but there
must be another way to do this.

Fixes #16660.
2021-01-10 12:17:57 +01:00
Humdinger
8ff235aa28 Sentence casing
+ avoid spaces at the end of a translatable string, as those can
easily be missed by the translators.

Change-Id: Ic41e613b44e4248529d1f68f6bab13a048e66f3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3612
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-10 07:00:28 +00:00
Jérôme Duval
d12e6085a0 kernel/thread: handle invalid user_thread pointer in user_[un]block_thread
should help with #16736

Change-Id: I103488679b8c352855fbd19405bb30c978cf4457
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3613
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-09 18:12:18 +00:00
Jérôme Duval
62826a0665 strace: continue_thread can fail when the origin team is gone
Change-Id: I2de8aaaf90ef987d3871dbbbef73c49240d99a89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3615
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-09 18:10:39 +00:00
Stephan Aßmus
8c812f2d63 BHttpRequest: Fix the cast and therefor GCC2 build
Change-Id: Ia0729a20d143721d395d5d50719e87b99b76bb05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3614
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2021-01-09 15:56:08 +00:00
Adrien Destugues
f15516ff92 Package Kit: re-use downloads from unfinished transactions
There are three parts to this change:
- In FetchFileJob, if the request fails with a timeout or IO error
  (probably because of unstable connection) attempt to resume the
  download with a range request. No limit on number of retries
  currently, maybe we should add one.
- In PackageManager, before downloading a file, look around in other
  transaction directories in case it's already there. Partial and
  complete downloads are differentiated by an attribute which the
  fetch file job maintains. For complete downloads, no fetch job is
  scheduled, for partial downloads, the fetch job will request the
  remainder of the file.
- In BHttpRequest, the implementation of SetRangeStart() and
  SetRangeEnd() have been added, along with some refactoring to
  handle listener notifications consistently. This also fixed a
  bug where the final notification for download progress was not
  emitted for compressed data.

Fixes #12414.

Change-Id: I3e285741ed0e5651594a7c2e1c7170644a9d297d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3404
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-01-09 15:20:09 +00:00
Autocomitter
096687ba71 Update translations from Pootle 2021-01-09 09:15:16 +00:00
Adrien Destugues
d753645e3f MediaExtractor: fix cache size computation for audio
Untested. If audio is not decoding well, try increasing the constant.

Change-Id: I151764e6bb3e69088904d33bfeb683bf0569bd23
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3605
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-01-08 14:28:41 +00:00
Adrien Destugues
437df0a3fb x86_64: fix build
This code was accidentally removed but is still needed.
2021-01-08 13:38:29 +01:00
Adrien Destugues
a736630c63 Fix ppc build
Remaining uses of PAGE_SIZE that I didn't notice.
2021-01-08 13:26:02 +01:00
Adrien Destugues
68d37cfb3a Fix definition of PAGESIZE and B_PAGE_SIZE
On sparc, the minimal page size we can use is 8K. Since B_PAGE_SIZE and
PAGESIZE defines were hardcoded to 4K, this resulted in a lot of
confusion in all code trying to manipulate pages.

- Remove cpu.h from headers/private/kernel/arch/*. It dates back from
  NewOS and was not used anymore since our kernel uses B_PAGE_SIZE
  (PAGE_SIZE was the only thing defined in this header).
- Add posix/arch/*/limits.h with the arch specific page size and include
  it from the main limits.h.
- Adjust bios_ia32/debug.cpp which was the only place using the
  PAGE_SIZE constant from the deleted headers.
- Change OS.h to define B_PAGE_SIZE to be the same as POSIX PAGESIZE.
- Define PAGESIZE in the build header if the host OS doesn't.

Change-Id: I8c3732cf952ea3c2f088aa16d216678fbf198b96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3558
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-08 12:02:16 +00:00
X512
c46f51fb45 BReference: add IsSet method
Change-Id: Ibc34dbde3b81faecdc7fe66a2c07fc33d7871ce2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3487
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-08 09:56:38 +00:00
X512
d1ca0fcc6a AutoDeleter: add IsSet method
Change-Id: I70eb43a288ec9c02471aa21ce5618f0fa2399bd7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3486
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-08 09:56:38 +00:00
Alexander von Gluck IV
0b10216c7c build/mmc: Add host libraries for fat_shell. Drop unused var
Change-Id: I16a93fd4161569eb756ec244f3f5c1b768247089
2021-01-07 16:05:46 -06:00
Alexander von Gluck IV
58332722cd build/mmc: Drop usage of mtools, use internal tooling
* Fixes the ARM image to actually include Haiku within
  a partition on the SD card.
* Drops the mtools requirement
* Drops the C/H/S requirements

Change-Id: Ie2776a09399ac181daab7a503e96e27ab7093af4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3608
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-07 21:34:00 +00:00
Adrien Destugues
fa1f5839be sdhci_pci: fix quirk and interrupt handling for Ricoh device
- The quirk was not properly applied due to misuse of the device API
- The interrupts could run out of sync, leading to not properly waiting
  for commands to terminate before reading their result. Add panic to
  check for that (at the start of the next command) and fix the code.

Change-Id: If83b7bbb3c3446d374115ed22c09b91020028578
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3609
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-07 20:37:34 +00:00
Jérôme Duval
0db785d66c features.h: undef before define
Change-Id: Iba98e3a8352801345acefe963917471992f70281
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3606
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-07 09:14:57 +00:00
Alexander von Gluck IV
e9a5037fba tools/mbrtool: A simple tool to create MBR partitions
Change-Id: I0f04b257ad49d07c03d630df47c4891c1fd7a954
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3570
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2021-01-06 23:40:29 +00:00
Jérôme Duval
242adb20f3 Terminal: implement ECMA-48 "REP"
fix #16724

Change-Id: Ie9f8252393a65a0101a6d78db2360f48bb52bc73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3607
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-06 20:31:51 +00:00
Adrien Destugues
b9e03b90a5 sd/mmc: Update the documentation to reflect the current state 2021-01-06 20:06:17 +01:00