1992 Commits

Author SHA1 Message Date
Zachary Hall
1047530b8f screenmode: Allow retrieving screen brightness via CLI
* Add a new flag (-B, or --get-brightness), that changes the output
   from screen mode to screen output
 * This new flag is affected by the -s (short output) option for use
   in scripts
 * The wording for -s is changed to reflect the fact that it now
   affects the new flag

Change-Id: I81145f401952fc026673e05a5fc03d4e3352fd3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8865
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-27 17:24:03 +00:00
Augustin Cavalier
cc389ab314 strace: Drop reference to wait_for_thread syscall. 2025-01-15 14:55:17 -05:00
Augustin Cavalier
43b96dabf2 kernel/user_debugger: Add some padding/flexibility to debug_nub_message.
* Reorder a few messages, and add base numbers so that messages
   can be added in the future to all "sections" without breaking
   previous ABI.

 * Rename some messages for consistency.
2025-01-13 14:50:03 -05:00
Augustin Cavalier
2c9560581b Debug Kit: Restore support for symbol lookup by remote memory access.
It's been broken since clone_area was changed to block cloning of
areas without B_CLONEABLE_AREA set on them. We here introduce a
B_DEBUG_MESSAGE_CLONE_AREA debug nub message, which clones the areas
of the debugged team for the debugger.

Also fix some bugs in SymbolLookup::_FindLoadedImageAt methods:
they didn't work properly when *next was NULL, so they would
always fail when iterating over the full list.

Note that this technically breaks libdebug.so and the debugger
protocol ABI. However, nothing out-of-tree that I know of uses
the private libdebug.so, and while GDB does use the debugger
protocol, it doesn't actually use any of the messages past
the first block, so it should still work after this.

Fixes #15251.

Change-Id: I71ccbee4afd17dae30d5dacbc7590d1e2175a90e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8821
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-13 18:03:52 +00:00
Chris Roberts
8738012f43 rc: fix app_version handling during decompile
The length of the BeOS resource is twice as long because it contains
additional system info. For resources compiled with the Haiku version of
rc we can compare the length with a single sizeof(version_info)

Change-Id: Ia0c243434a5dd5792d0b97e7baecdfaf6b4027be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8827
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-12 04:55:15 +00:00
Augustin Cavalier
8ecc31ca7b Errors.h: Add ESOCKTNOSUPPORT.
It's in POSIX.1-2024, see
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html

Fixes #19347.
2025-01-08 11:35:35 -05:00
Alexander von Gluck
796bd00681 network/route: accept an empty network address as the destination.
* linux + BSD accept 0.0.0.0 or :: as the default route identifier
* openvpn passes 0.0.0.0 as the default route
* our own route command shows "0.0.0.0" for the default route

Lets not be special here, and do what everyone else does. default
still works for backwards compat.

This uncovered a potental bug in BNetworkAddress. See #19296

Change-Id: I3aea99cae4cf9c52142cb97e2a06b8432de294b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8592
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alexander von Gluck <alex@terarocket.io>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-12-23 09:38:36 +00:00
Augustin Cavalier
ae96a596c1 pkgman: Drop unused ResolvableExpressionComparator. 2024-12-18 21:12:16 -05:00
Augustin Cavalier
aaa81469a5 pkgman: Add "search --not-required".
List only the packages that are not required by any other package.

Most useful then used as "pkgman search --installed-only --non-required",
but works for non-installed packages too.

Based on OscarL's initial version, rewritten by me to use the real
dependency resolution system instead. One tweak from madmax to get
it to actually work properly.

Co-authored-by: Oscar Lesta <oscar.lesta@gmail.com>
2024-12-18 17:08:23 -05:00
PulkoMandy
fd7bde29e9 listusb: decode color format descriptors in usb_video devices
Change-Id: I3de3b1a893ec02d32f1b10f80653d433ac4526ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8582
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-18 16:44:46 +00:00
PulkoMandy
d05ff048a2 uvc_webcam: use shared USB_video.h
The driver had its own header file with definitions from the USB video
specification. Use the system ones already in place for use in listusb.

Also recognize devices which advertise themselves as "miscellaneous" in
the device descriptor, this is the recommended way in the specification
as the usb_video interface may be only part of a device, with other
interfaces and endpoints used for audio or for HID for example.

Change-Id: I7e2e45328dcc1e81c407937e8dd3d77209c5c52a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8581
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-18 16:44:46 +00:00
Jérôme Duval
6beff0d163 kernel/libnetwork: add accept4() from POSIX.1/2024
* add SOCK_NONBLOCK and SOCK_CLOEXEC
* also extends the type parameter on socketpair() and socket()

Change-Id: I73570d5bfb57c2da00c1086149c9f07547ba61ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8515
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-04 17:55:40 +00:00
Jérôme Duval
966076b273 kernel/libroot: add dup3() from POSIX.1-2024
this adds a parameter to the dup2 syscall. Adjust strace.

Change-Id: Icc2d0e054365865d38e5d596843a47c95100ca59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8514
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-04 17:55:40 +00:00
Jérôme Duval
11cd4af6e1 kernel/libroot: add pipe2() from POSIX.1-2024
this adds a parameter to the create_pipe syscall. Adjust strace.

Change-Id: I83e9f039eb28c862458654b66c03e2e21a258822
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8513
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-04 17:55:40 +00:00
CodeforEvolution
c3c6ee24b0 package_repo: Remove B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT definition
All other uses of this definition was removed many years ago...
In addition, I'm certain this aspect of POSIX support is complete now.

Change-Id: I309779d8e895efeb6b2b7c107bf2ef038d0a6612
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8458
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-10-15 19:39:32 +00:00
Greg Crain
8251b2c8f6 usb_audio: add missing descriptors for USB Audio 2.0 and update listusb.
Change-Id: Ic294ca78aaf9bd5ac8476595af5e4e223b07e25e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8372
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-10-14 18:16:10 +00:00
Niklas Poslovski
baf30547f7 ScreenSaver: Use B_PANEL_TEXT_COLOR for text in the PasswordWindow
Change-Id: Id4f1cc65b15b74c6a8e2cf551f7fdfc7fe481cca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8389
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-10-12 15:56:14 +00:00
Augustin Cavalier
b47e8b0cad build: Unify BeOS ABI compatibility ifdefs around __HAIKU_BEOS_COMPATIBLE.
_BEOS_R5_COMPATIBLE_ was defined in ArchitectureRules while
__HAIKU_BEOS_COMPATIBLE is defined in HaikuConfig.h (which is
in the include path for sys/types, SupportDefs, and other
base headers.)
2024-09-24 12:09:33 -04:00
Augustin Cavalier
5a8a2b5066 package_repo: Add -f argument to "list" mode to print filenames.
This way, users of package_repo don't have to reassemble the
canonical filenames themselves.
2024-09-17 10:53:21 -04:00
Augustin Cavalier
2eb83002c5 strace: Add FlagsTypeHandler for the mutex option flags.
So that MUTEX_SHARED etc. are displayed in strace output.
Also fix indentation, and the name of the "toFlags" parameter
in syscall definitions.
2024-09-16 15:36:12 -04:00
Augustin Cavalier
e1d0a30ed4 bin: Link launch_roster against libshared. 2024-09-16 14:48:54 -04:00
Alexander von Gluck IV
ece6263825 launch_roster: Spice up launch_roster, add color and details to job list
Change-Id: Iae907da336209bcbe39d37bfa35f090b46e783d2

Amended by waddlesplash to use TextTable.
2024-09-16 14:38:04 -04:00
Augustin Cavalier
e9254dd79c Package Kit, WebPositive: Standardize string hashes.
Use either HashString or BString::HashValue (both of which currently
use the "modified hashpjw".)
2024-09-09 13:39:28 -04:00
Augustin Cavalier
788da26bbc kernel: Let user_debugger take care of tracking syscall runtime.
If we just use the kernel entry time, then the pre-syscall tracing
routine (with a debugger message send) will be counted in the syscall's
runtime.

Makes the output of timing in strace and strace -c much more accurate,
however it won't include the "syscall overhead" (time spent in the
syscall entry routines, etc.) But we already can't account for time
spent in the userland-to-kernel transition, so that should probably
be measured some other way if knowing it is desired.

In fact, on architectures which used the generic syscall dispatcher
(e.g. RISC-V), this is the behavior that already existed. So this just
makes x86 consistent with them.

Change-Id: I8cef6111e478ab49b0584e15575172eea77a8760
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8240
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-09-07 15:31:15 +00:00
Michael Lotz
a272ee798f package_repo: Add "-t" argument to update command.
When set, the package names provided in the file list are assumed to be
in their canonical form and the package files are not accessed to build
canonical names from their package info.

This allows for delta updates where package files are only listed in the
file list but are not present or valid in the packages directory.

This does not fundamentally change the risks of such updates as the
checksum of packages was already not revalidated and replaced packages
were therefore already not detected.

Change-Id: I3a10794858384fe17374eb0469dd4bd4e024253a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8138
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-08-27 15:29:53 +00:00
X512
2141d2fe3a input: fix KEY_power key code conflict with japanese \_ key
- This key code is inherited from BeOS, where it was used for the power
  key on Apple ADB keyboards
- Since then, we have introduced a new system for "multimedia" keys,
  that uses HID key codes directly instead of defining our own mappings
- The PS2 driver was using the HID keycode, but the USB driver was still
  using the BeOS defined one
- Japanese keyboards, which have a few more keys than US and European
  ones, reused the same keycode for something else

Since the power key does not need to be mapped by the keymap, move it
out of the way by using the HID keycode (key codes larger than 0x7f
cannot be mapped to UTF8 symbols). Remove all mentions of the use of
0x6b as a keycode for the power key, but add a note in the documentation
that BeOS did this.

To avoid further confusions, complete the documentation of extra
keycodes, and remove some definitions from keyboard_mouse_driver.h that
should have been in InterfaceDefs.h.

While researching this, I also found that some keys specific to Korean
keyboards were declared in the wrong place, as mapped codes instead of
unmapped ones (checked that by looking at the HID driver, which emits
these raw keycodes, and confirming that the mapped ones are not used in
any keymaps. Also added a note about the mapping of the extra modifier
keys in Japanese keyboards, which I think may be a problem since these
map to invalid UTF-8 byte sequences, but this is what the existing
keymap does, so leaving it as is for now until we can determine if this
can be changed or if we have to keep it that way.

Change-Id: I6a198a0840cba7739bdc78e0c65e5d8fd23956c9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8047
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-08-19 16:00:25 +00:00
Augustin Cavalier
686e891cd2 system_profiler: Add a mode for scheduling_recorder -r like profile -r.
And add the necessary logic in scheduling_recorder. This way we can
track scheduling profiling during the boot process.

Also remove B_SYSTEM_PROFILER_IO_SCHEDULING_EVENTS as it can't be
activated this early in the boot process.

Change-Id: If32f9b5d61c8cd2b3b36a4e6f8065301abd46149
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7963
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-09 00:42:25 +00:00
Augustin Cavalier
fe5fc031dd profile: Report dropped events from the system profiler.
Otherwise there is no indication how many were dropped.
2024-08-07 14:51:38 -04:00
Augustin Cavalier
58d9ba9035 profile: Emit paths only in the callgrind output.
The callgrind information should contain a path to an ELF file,
not an identifier. We thus only add the identifer when we don't
have something that looks like a path (or is the commpage.)

This allows applications that analyze callgrind output to merge
images with the same ELF file.
2024-07-17 13:31:54 -04:00
Augustin Cavalier
ed79e85ae0 profile: Don't try to be clever in SharedImage::ContainsAddress().
The data section could theoretically be before the text section,
but it also may not exist and have a size of 0. The commpage
image is one such image with those qualities, and so we
would thus always find it as having a hit when encountering it
in the list.

And since data_size might be 0, just do < instead of <= and -1.

This massively fixes the profiler's output.
2024-07-17 12:47:07 -04:00
Augustin Cavalier
43f2492813 profile: Drop some unused code.
Commented out and not needed.
2024-07-17 12:44:57 -04:00
Augustin Cavalier
1b6cac3521 profile: Use BStackOrHeapArray to store the result arrays.
Otherwise with very large profile results we can overflow the stack.
2024-07-17 12:43:24 -04:00
Augustin Cavalier
421a5795ae profile: Stop new threads and resume them with the debugger API.
If we don't stop new threads, then they can run before we
have a chance to start profiling them.
2024-07-17 11:10:13 -04:00
Augustin Cavalier
189a9bbf63 strace: Resume target threads with the debugger API not resume_thread().
This way, the thread will be resumed only after the kernel
has finished processing our debugger change requests written
to the same port.
2024-07-17 11:07:32 -04:00
Augustin Cavalier
8a30142841 profile: Unset image in ExclusiveProfileResult if we didn't find a symbol.
Fixes unknown hit counters.
2024-07-17 00:25:06 -04:00
Augustin Cavalier
7eb6aafc30 profiler: Actually support profiling user stack frames only.
The "-k" argument (which never did anything before) is now inverted
compared to what it used to be, i.e. now specifying it will profile
kernel frames, too, whereas by default only user frames will be
sampled.
2024-07-16 20:37:40 -04:00
Augustin Cavalier
e21aac37e7 strace: wait_for_thread status argument is an Out parameter. 2024-07-16 19:06:13 -04:00
Augustin Cavalier
9e7e161599 strace: Add tracing for wait_for_objects and event_queue syscalls. 2024-07-16 19:03:02 -04:00
Augustin Cavalier
96fb940571 strace: Move poll/select syscall handling to an "event" file.
Also bring along the type handlers, and use FlagsTypeHandler.
2024-07-16 18:43:50 -04:00
Augustin Cavalier
ef62eb6117 strace: Only print the first 8 iovecs.
Same limit as other array printers in this file.
2024-07-16 18:43:50 -04:00
Augustin Cavalier
0fbd5c96af strace: vsnprintf returns total possible characters, not number written.
Thus we have to clamp it. Fixes crashes with very long syscall arguments.
2024-07-16 18:43:50 -04:00
Augustin Cavalier
6c4e414fe6 strace: Move TypeHandler for iovec back to NetworkTypes.
Takes advantage of some of its macros.
2024-07-16 18:43:50 -04:00
Augustin Cavalier
2813fd13ca profiler: Report CPU times and use them to compute "missed" ticks.
This shows that the profiler is still pretty broken, because we
are missing quite a lot of ticks on average. One run of
"profile pkgman search" here produced an output with 66 total ticks
and 423 (!) missed ticks. A brief run of WebPositive was not quite
as bad (main thread: 1078 total ticks, 157 missed ticks.)

Change-Id: Idfc34534e66eff0fe7e948fcc3576be09db879a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7820
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-07-08 17:13:30 +00:00
Augustin Cavalier
d1c8e2fe7c strace: Don't print the starting "_kern_" in the stats view.
Same change that was made for the non-stats printing a long
time ago.
2024-06-25 22:10:49 -04:00
Augustin Cavalier
32c59a45e1 strace: TypeHandler for iovec*.
Useful for readv, writev, and writev_port_etc.
2024-06-25 20:20:15 -04:00
Oscar Lesta
9e2c51c22f package: adjust help text spacing to be less cramped.
Using 4 spaces, instead of two, makes it easier to find
the available commands at a glance.

Change-Id: I2bbfaa323b89ebce490e34a39c4dfd163c23fd06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7784
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-06-20 16:18:53 +00:00
Augustin Cavalier
6b99b20692 telnet: Synchronize with FreeBSD 13.3. 2024-05-28 16:23:27 -04:00
Augustin Cavalier
0c84b78dd3 ftpd: Synchronize with FreeBSD 13.3. 2024-05-28 16:08:22 -04:00
Augustin Cavalier
560f1681fa listattr: Needs <time.h>.
Seems to be implicitly included on Haiku, but for <build>listattr
on Linux, it's needed.
2024-05-28 14:55:32 -04:00
Adrien Destugues
9f3bdf3d03 rc: migrate documentation to Haiku internals pages 2024-04-29 13:58:59 +02:00