Commit Graph

59990 Commits

Author SHA1 Message Date
Augustin Cavalier
f95a6bc18a HaikuPorts: Synchronize packages; add libpsl and gutenprint8. 2019-05-14 19:03:02 -04:00
Augustin Cavalier
e661fdd17d repositories: Move the README into the appropriate docs/develop directory. 2019-05-14 19:00:18 -04:00
Jérôme Duval
df0ba1eca1 vfs: _user_ioctl: any buffer value is allowed for some ops.
some ops want an integer value instead of a pointer as arg parameter ( #15058 ).

http://pubs.opengroup.org/onlinepubs/9699919799/functions/ioctl.html clearly specifies that:
"The type of arg depends upon the particular control request, but it shall be either an
integer or a pointer to a device-specific data structure."

add a test for functions which should return ENOTTY as errno.

Change-Id: I4a98af73b17c79c3460123d3794ee866f8719898
Reviewed-on: https://review.haiku-os.org/c/1447
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-14 16:12:31 +00:00
Augustin Cavalier
32cbf55317 freebsd_network: Fix logic inversion introduced in the last change.
Thanks to Stephan for noticing!
2019-05-14 12:03:00 -04:00
Jeroen Oortwijn
72f7f7d976 USB_hid.h: Add Report Type constants
From "Device Class Definition for Human Interface Devices (HID)
Ver. 1.11", par. 7.2.1, page 51.

Change-Id: I4628f8ca940758aaf4a09290e9fa407d30374e7a
Reviewed-on: https://review.haiku-os.org/c/1450
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-14 07:24:09 +00:00
Jeroen Oortwijn
419190fdc2 usb_hid: Use In Range data instead of state
According to the HID Usage Tables document (Hut1_12.pdf), the In Range
usage is a Momentary Control (MC) (par. 16.3.1). A MC has a Logical
Minimum of 0 and a Logical Maximum of 1 (par. 3.4.1.3).

As the In Range usage is a bit quantity, the value can't be outside
the Logical Minimum and Maximum and therefore can't be in an invalid
state.

Now the inRange boolean value properly changes.
The pointer still moves to the upper left corner when the pen is out
of range, though. Maybe the input_server add-on doesn't use this value?

Change-Id: Idf511ac237158e90eb2e8f01422757655a7eea3a
Reviewed-on: https://review.haiku-os.org/c/1449
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-05-14 07:24:09 +00:00
Jeroen Oortwijn
7625dca0e9 input_server/tablet: Only send event messages when pen is in range.
When the pen is moved out of range, the Wacom tablet sends one last
message with all values set to 0 and the In Range value set to false.
Don't send mouse event messages in this case.

Change-Id: I419d57cede47a6ef40a160322f3025ef372ecaa3
Reviewed-on: https://review.haiku-os.org/c/1448
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-05-14 07:24:09 +00:00
Augustin Cavalier
45c3eb3a3c pkgman: Split "interactive" and "show progress" logic.
Previously we didn't show progress in non-interactive mode. Now
we do, so long as stdout is a TTY.

Fixes #14603.
2019-05-13 19:32:30 -04:00
Augustin Cavalier
7115cef989 Jamrules: Include the UserBuildConfig before processing repositories.
Repository processing triggers HAIKU_REVISION computation, and it
is intended that the UserBuildConfig can override or set HAIKU_REVISION.

Fixes #14834.
2019-05-13 19:21:48 -04:00
François Revol
733f097b97 Appearance: Add a ControlLook MenuField
Change-Id: If815fa6a864d2a916eb1ae878400d342f666e3d2
Reviewed-on: https://review.haiku-os.org/c/1434
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-13 22:15:30 +00:00
François Revol
e88c3d58bd Add setcontrollook minimal CLI tool
Just does what the name says

Change-Id: I6cf23f997ce544df83d4ef2f73a3b130dea8825c
Reviewed-on: https://review.haiku-os.org/c/1432
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-05-13 22:15:30 +00:00
François Revol
26b5a18eb0 Add a BeControlLook addon
Very simple for now, just reuses the Haiku one with some gradients
removed.

Add it to the haiku_extras package.

Change-Id: I41729ed65b147fed72bf56e7c5c89367b75563bb
Reviewed-on: https://review.haiku-os.org/c/1431
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-13 22:15:30 +00:00
François Revol
629397f222 Add basic support for loading ControlLook add-ons
app_server just passes the add-on path around.

Maybe we should make sure the add-on can be loaded when setting it.

Change-Id: I3acd3299782a22c1666bd5435dbf3d8053e359fa
Reviewed-on: https://review.haiku-os.org/c/1430
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-13 22:15:30 +00:00
Augustin Cavalier
da452ce2bc strace: Print syscall names without the "_kern_".
This makes the output much easier to read (e.g. "write(...)" vs.
"_kern_write(...)") and similar to strace/dtrace/etc. output
on other platforms.

Change-Id: Iac8e32aae0dcf3731a348c6192203f8d5b54da7a
Reviewed-on: https://review.haiku-os.org/c/1451
Reviewed-by: Bruno Albuquerque <bga@bug-br.org.br>
2019-05-13 22:11:33 +00:00
Bruno Albuquerque
9888752db1 freebsd_network: Style fixes pointed out by Korli.
- Did not see his comments before pushing my previous change.
- clear owning flag when passed value is NULL.

Change-Id: I493973aff2b107785c3734847c85a52f0f9da360
Reviewed-on: https://review.haiku-os.org/c/1443
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-13 18:58:04 +00:00
Jérôme Duval
858e5775ab vfs: fail only truncate on file descriptors opened read-only.
chmod is allowed.

Change-Id: Idcac38bdd7f0d614538421a41dfd30066a0c316f
Reviewed-on: https://review.haiku-os.org/c/1444
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-05-12 07:23:16 +00:00
PulkoMandy
00b283c042 Fix long double support for ARM.
Fixes #15056.

Change-Id: I48c00b955346971aa88b731ccad1953a4044983d
Reviewed-on: https://review.haiku-os.org/c/1442
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-05-08 20:14:25 +00:00
Bruno Albuquerque
7f6254d1e9 Prevent a double softc free.
- Keep track if the softc was allocated externally or not.
- Only try to deallocate it if it was allocated internally.

Do not try to free the softc if we were not the ones allocating it.

- Avoid a double free on consecutive calls to device_set_softc.

Change-Id: Ibb38e54e9dfd2a80dbb53920970bead626da8ba1
Reviewed-on: https://review.haiku-os.org/c/1441
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-05-08 15:31:31 +00:00
Les De Ridder
1712a3c957 btrfs: add initial disk system add-on
Change-Id: I8f26a78770e679527a99b49a04557c1aa4334b53
Reviewed-on: https://review.haiku-os.org/c/1396
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-05-08 10:20:53 +00:00
François Revol
25de7c1b12 loader: VESA: make nvidia scaling fixup a driver setting
Since not everyone likes the default, make it an option in the vesa
settings file. Note setting a mode with the Screen prefs overwrites
the file so it will discard the option.

Also move the code to get_mode_from_settings() since we can't load driver
settings as early as vesa_init().

Change-Id: I93080bd1fbc064dab053624ad37935268b1ed17d
2019-05-08 04:42:33 +02:00
François Revol
0bed4dedc9 haiku utils rdef: bump Copyright year and fix indentation
Change-Id: Ib33df34029d0ab0189754024dd07beef3a2864bc
2019-05-08 02:00:04 +02:00
Murai Takashi
0ecfc6f3e3 Added some support for GCC 9.
Change-Id: I6b6cd53e00601592b44e1f2aa2804c8c9c9593d9
Reviewed-on: https://review.haiku-os.org/c/1438
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-05-07 23:07:17 +00:00
François Revol
547b5497e3 googlefs: fix warnings
Someone should rewrite this.

Change-Id: I08ddd10ac39c025f2ea1c28213a744bc2ada8516
2019-05-03 19:37:46 +02:00
François Revol
7409049765 Fix warning
Change-Id: I83250cc76a709404c52b91c992abb64f162e259b
2019-05-03 19:22:38 +02:00
François Revol
1b48852e84 Fix doxygen + whitespace
Change-Id: Ief0b2646e95841604a0396f15a054ff2086db198
2019-05-03 19:22:38 +02:00
Augustin Cavalier
02079c66f3 debug_server: Remove the "Write core file" button.
It is very, very rarely used, and is extremely wide on some locales
(i.e. almost 2x the width of the other buttons combined), making it
appear out of place. Now that it can be done from Debugger, having
it here does not seem to make a lot of sense.

As requested and discussed in #14777.
2019-05-02 16:59:39 -04:00
Augustin Cavalier
5ef0649658 Debugger: Add a "Write core file" menu item alongside "Save debug report". 2019-05-02 16:35:25 -04:00
Augustin Cavalier
c2cbf95810 kernel: Add and fix ownership checks in mutex_destroy and mutex_transfer.
* mutex_destroy() only checked wether or not there were waiters,
   not if the lock itself was presently held by another thread.
   Now we do, which should make #15015 panic much earlier instead
   of trying to use freed memory.
 * mutex_transfer_lock() and recursive_lock_transfer_lock() did
   not check that the calling thread actually owned the lock.
   Now it does, which should trigger asserts if anyone tries
   to do this.
2019-05-02 16:07:39 -04:00
Augustin Cavalier
c190864083 bus_managers/pci: Properly handle 64-bit BAR addresses.
We need to call pci_ram_address() on the whole address, not just the
lower 32 bits, and then store both components inside the PCI info
(previously we were leaving the high bits unset.)

Very few drivers bother to check if the address is 64-bit or not,
and for the most part they don't need to care, since the PCI bus
is at 0x0 physically and will pretty much never get anywhere near
4GB in size. But the XHCI driver read these, and so would get
bogus values for the high 32 bits, as we were never setting those.

Probably fixes #15040.
2019-05-01 15:43:27 -04:00
Adrien Destugues
a92e224f9a listusb: add some standard subclass codes
From https://www.usb.org/defined-class-codes

Change-Id: Icd029ff2078650fad3c2fa90f1d82cf80b0662b0
Reviewed-on: https://review.haiku-os.org/c/1423
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-04-30 17:20:13 +00:00
Jérôme Duval
62740a49ce tty: add posix open_pt test.
Change-Id: I9a4d927ee693198b8c978f1cb51cf4cc50ca6557
Reviewed-on: https://review.haiku-os.org/c/1417
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-04-29 20:26:27 +00:00
Jérôme Duval
e892b55b25 tty: fix TRACE build on x86_64.
Change-Id: Idcfa9bca4a5b450f7a7d2a060809999ee3e3ceaa
Reviewed-on: https://review.haiku-os.org/c/1416
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-04-29 20:26:27 +00:00
Augustin Cavalier
097bbc7fd2 file_systems: Remove now-redundant bounds checks before file_cache_read().
Change-Id: Iafb7d188c7e7cb4406d924eb3354a7ede40c6641
Reviewed-on: https://review.haiku-os.org/c/1421
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Michael Lotz <mmlr@mlotz.ch>
2019-04-29 20:21:05 +00:00
Augustin Cavalier
728b515e1c kernel: Bounds-check the parameters passed to file_cache_read().
cache_io() did some bounds checking, but for uncached reads it was
entirely on the filesystem. Now we are more consistent: do all the
bounds checking for reads in the file cache, and do all bounds
checking for writes in the filesystems.

This makes sense as nearly all file systems were doing the exact
same logic for read() but of course all have different logic
for write(), due to block allocation, etc.

This potentially fixes #14993.

Change-Id: Iaf3e549001344cf375c7b8de549fc169d77bdbb2
Reviewed-on: https://review.haiku-os.org/c/1420
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-04-29 20:21:05 +00:00
Augustin Cavalier
1e4109cdb4 h2generic: Use a bounce buffer only when necessary.
This fixes two ioctls that were broken when adding the bounce
buffer.
2019-04-28 15:17:35 -04:00
Adrien Destugues
088cebb96f BFileGameSound: remove annoying printf.
Change-Id: If12c4031e7ec245a79cca51fe1304f6cc21f28e4
Reviewed-on: https://review.haiku-os.org/c/1415
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
2019-04-28 07:32:42 +00:00
Jérôme Duval
35fa85dba5 runtime_loader: load "LD_PRELOAD" libraries after the executable.
This makes the behavior more standard, is still to be used with libroot_debug.so
for instance.

The old behavior is obtained with "LD_PRELOAD_ADDONS"; in fact a runtime_loader add-on
needs to be entirely loaded before the executable to be effective. To be used with
libltrace_stub.so for instance.

Change-Id: I8536c5b8873f975405bea9eb4e2b92febabfc78a
Reviewed-on: https://review.haiku-os.org/c/1409
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-04-27 08:59:08 +00:00
Jérôme Duval
888652929c runtime_loader: treat weak symbols as strong symbols definitions.
http://www.sourceware.org/ml/libc-hacker/2000-06/msg00029.html
Change-Id: I15bf1f48dda32942e2a93610d62dabe0cabdc9a1
Reviewed-on: https://review.haiku-os.org/c/1191
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-04-27 08:58:11 +00:00
Jérôme Duval
471e44c962 <driver>mem: use user_memcpy instead of memcpy.
Change-Id: Id37e0e48a936de2e9fcfc5b9e16aad22b6dd0901
Reviewed-on: https://review.haiku-os.org/c/1414
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-04-26 15:48:40 +00:00
Jessica Hamilton
785877e9c0 loader: remove unused function.
No longer required due to bab060e.

Change-Id: I5d931ecfa615d2982a22256ba7d1f8aa1679a576
2019-04-26 04:27:11 +00:00
Jessica Hamilton
bab060e9dd loader: load all available file/partitioning system modules.
* This fixes booting on virtualbox with UEFI, where it
  fails to identify CDs as BOOT_METHOD_CD, such that the
  write_overlay driver doesn't get loaded, causing a
  panic in the kernel trying to mount the boot device.

Change-Id: I1f23b4c4195668752357735368f4668b73f75980
2019-04-25 05:08:22 +00:00
Jessica Hamilton
0f00993773 Revert "loader: load all available file/partitioning system modules."
This reverts commit ce624c696f.
2019-04-25 05:05:19 +00:00
Jérôme Duval
0e4b529df5 pthread: pthread_getattr_np must call pthread_attr_init().
Fix #15025

Change-Id: Ie0b91714d375d75170b54e81cb31cf18b106ecc1
Reviewed-on: https://review.haiku-os.org/c/1413
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-04-24 18:43:37 +00:00
Zoltán Mizsei
c9ac7e4a9e Add audio/x-mptm to the mime db
Change-Id: Ib529b18eeedd9b1d0de0f254fb96e97d9d04df44
Reviewed-on: https://review.haiku-os.org/c/1412
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-04-23 02:44:24 +00:00
Zoltán Mizsei
66e077c644 Add MPTM to the MediaPlayer known mediatype list
Change-Id: I44140272a6cc8515f5583680cd4d182064192ca8
Reviewed-on: https://review.haiku-os.org/c/1411
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-04-23 02:44:24 +00:00
Augustin Cavalier
1cb376132e bootloader packagefs: Implement PrintErrorVarArgs.
The package kit calls this function to print errors it hits
when reading packages. We should never hit this in "normal
operation", but it should help with debugging #14993.
2019-04-22 19:41:04 -04:00
Augustin Cavalier
5c1e072463 bootloader packagefs: Remove unused classes from the build. 2019-04-22 19:31:47 -04:00
Augustin Cavalier
f62a92ae05 network/stack: Fix a race condition in device interface teardown.
Inside the device_consumer thread, the sequence of operations was this:
  1. Call fifo_dequeue_buffer()
  2. If it returned B_INTERRUPTED, exit the thread. Otherwise, process
     the buffer it returned as normal.
  3. Loop.

Thus, if the FIFO was destroyed not during a call to
fifo_dequeue_buffer, the next loop, fifo_dequeue_buffer would
be called on a destroyed FIFO. It would then try to lock the mutex
in the FIFO which had been destroyed, causing an assertion failure
and thus a panic.

Now, we check the ref_count on every loop, and set it to 0 before
calling uninit_fifo(). Thus, even if we are in the middle of a loop
inside the FIFO thread, the loop iteration condition will fail
and thus the thread will exit, avoiding the race.

Probably this was not an issue before because the timing required
to hit this is incredibly unlikely. With the new ipro1000 driver
(or kallisti5's WIP TUN/TAP driver), the timing makes this much
more likely.

Should fix #15024.
2019-04-22 18:41:25 -04:00
Alexander von Gluck IV
d117379205 posix/if_types.h: Remove IFT_IEEE1394, breaks build
* Sneaky ifdef in libnetwork/netresolv/irs
* Sorry for spam.

Change-Id: I241d65b63d0bb8b281e3db0adcad2814b1476c7e
2019-04-22 13:21:50 -05:00
Alexander von Gluck IV
db3b4a3caf posix/if_types.h: Fix tun id, add a few more
* Oops, there's a standard for these. Stick to the standard.
* Add a few that could be useful someday.
* Mention iana spec.

Change-Id: I4cf75e8c1e4b25f65d10921c7075fbd53f44e14e
2019-04-22 13:06:04 -05:00