Commit Graph
1794 Commits
Author SHA1 Message Date
Kyle Ambroff-Kao 2a0d1eb890 makeudfimage: Remove this tool completely
The AllocatorTest suite fails, and when investigating why it was
broken I realized that it was testing code that has been dead and
unused for quite some time. makeudfimage hasn't been touched since
2004 (5f2185ea0), and was removed from the build in 2006 (5adca30a1).

The only changes that have been made to it since then are build fixes
for the tests. Adding it back to the build would require some work
since many things have changed since then.

Since there are many other tools and libraries out there which can
make UDF images (and which have been ported to Haiku), this code
doesn't really seem worth maintaining at this point.

This patch just removes it, as well as the associated tests.

Change-Id: I23da8df83b7f141b3394a022030545d42a287881
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2332
Reviewed-by: Adrien Destugues <[email protected]>
2020-03-09 12:18:06 +00:00
Jérôme Duval 3fded0b515 desklink: watch media_server quit event to disconnect itself.
StartWatching() must be called for each notification type.

Change-Id: I34957af526a0af557a86eef0c3de5722f3503ca5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2244
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-15 13:31:17 +00:00
Jérôme Duval e79dc1ff93 desklink: recycle MixerControl and correctly release media nodes.
Change-Id: Id00a7fdb3bfd995bf6891bac85d21931f527606c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2237
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Stephan Aßmus <[email protected]>
2020-02-11 18:59:37 +00:00
Murai Takashi d029e65f6f mkdos: Add missing 'else'
Fix PVS V646

Change-Id: Iddf45b1383ec8d272fb733970ba52390d3072ef2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2229
Reviewed-by: Jérôme Duval <[email protected]>
2020-02-08 12:39:29 +00:00
Ryan Leavengood 246caab548 Fix build: missing semi-colon in fortune 2020-02-05 21:34:53 -05:00
Rob Gill 40ee778c63 Fix memory leaks
* Delete/free as appropriate

   Most cases involve not freeing memory after encountering error or
   unexpected situation (identified via cppcheck static analysis)

Change-Id: I90ba2fca518b00d2dfa9ec1ddbcebe1920a34b7c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1038
Reviewed-by: waddlesplash <[email protected]>
2020-02-06 00:45:11 +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 <[email protected]>
Reviewed-by: Alex von Gluck IV <[email protected]>
2019-12-13 23:53:07 +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 <[email protected]>
2019-12-07 16:06:50 +00: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
CodeforEvolution 89fc6d6aa2 [hey] - Fix overflow issue found by LGTM
LGTM issue: "gets does not guard against buffer overflow"

Change-Id: I502428f167865ac81301aa72d20c91b4480fb3dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1926
Reviewed-by: Adrien Destugues <[email protected]>
2019-11-14 16:57:06 +00:00
CodeforEvolution 9e54316c52 Fix the build of test_app_server on 64bit
So many Jamfiles to search through...runs also, but there
are lots of graphical glitches

Change-Id: Ibf9e64566a5b8c5742792ac9b1b0f9ccc6693c8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1753
Reviewed-by: waddlesplash <[email protected]>
2019-09-01 03:04:52 +00:00
Augustin Cavalier 47a21c5c89 s/Haiku License/MIT License/g.
They are the same thing.
2019-08-30 18:16:02 -04:00
Adrien Destugues a8d1f93424 resizefs: fix build 2019-08-20 20:40:15 +02:00
ahenriksson 03867a467e Add resizefs utility
Change-Id: I5f503cf07216df64dcc33081f24cd083d003e581
Reviewed-on: https://review.haiku-os.org/c/haiku/+/943
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2019-08-20 09:48:51 +00:00
Alexander G. M. Smith 31d70c106b package kit: Skip over future package attributes.
Ignore unknown fields (also called attributes) which are from a package
file with a different minor version number.  Previously it would halt
with an error when encountering such a field, even though it can safely
be skipped over (if it was unsafe, we would have incremented the major
version number).

The use case is a future package attribute for pre-uninstall scripts.
If they're not run, that just leaves some debris after uninstalling
(like symbolic link desktop icons).

* Use the B_NOT_SUPPORTED error code when reading unknown package
  attributes.  Don't treat it as an error if the package is a
  different minor version, just skip it.
* Print unknown package attribute index numbers rather than stopping,
  since they may be from future package file formats and can be safely
  skipped otherwise.  Mention the relevant enum so you can find it in
  the source code.  It's a pity that the previous abstraction layer
  isn't present, since it tells us what data type the attribute is
  (string, number, etc), so we could have printed its value too.

First step of two for enhancement #13427

See https://review.haiku-os.org/c/haiku/+/1504 to generate packages
with a different minor version number (second step of the enhancement).

Change-Id: I6db1897824a1713b3d5fab6fdfb990ee5923cd52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1714
Reviewed-by: waddlesplash <[email protected]>
2019-08-14 02:08:35 +00:00
Axel Dörfler 20a31c45b9 netstat: Added family, protocol, and state filter options
* Uses the same option names as net-tools's netstat.

Change-Id: I3363a091dfa1bcf09065f77d3fdc9c9bf27cbcaf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1701
Reviewed-by: Adrien Destugues <[email protected]>
2019-08-12 22:09:34 +00:00
Augustin Cavalier 2c588b031f kernel: Properly separate and handle THREAD_BLOCK_TYPE_USER.
Consider this scenario:
 * A userland thread puts its ID into some structure so that it
   can be woken up later, sets its wait_status to initiate the
   begin of the wait, and then calls _user_block_thread.
 * A second thread finishes whatever task the first thread
   intended to wait for, reads the ID almost immediately
   after it was written, and calls _user_unblock_thread.
 * _user_unblock_thread was called so soon that the first
   thread is not yet blocked on the _user_block_thread block,
   but is instead blocked on e.g. the thread's main mutex.
 * The first thread's thread_block() call returns B_OK.
   As in this example it was inside mutex_lock, it thinks
   that it now owns the mutex.
 * But it doesn't own the mutex, and so (until yesterday)
   all sorts of mayhem and then a random crash occurs, or
   (after yesterday) an assert-failure is tripped that
   the thread does not own the mutex it expected to.

The above scenario is not a hypothetical, but is in fact the
exact scenario behind the strange panics in #15211.

The solution is to only have _user_unblock_thread actually
unblock threads that were blocked by _user_block_thread,
so I've introduced a new BLOCK_TYPE to differentiate these.
While I'm at it, remove the BLOCK_TYPE_USER_BASE, which was
never used (and now never will be.) If we want to differentiate
different consumers of _user_block_thread for debugging
purposes, we should use the currently-unused "object"
argument to thread_block, instead of cluttering the
relatively-clean block type debugging code with special
types.

One final note: The race condition which was the case of
this bug does not, in fact, imply a deadlock on the part
of the rw_lock here. The wait_status is protected by the
thread's mutex, which is acquired by both _user_block_thread
and _user_unblock_thread, and so if _user_unblock_thread
succeeds faster than _user_block_thread can initiate
the block, it will just see that wait_status is already
<= 0 and return immediately.

Fixes #15211.
2019-08-05 22:31:02 -04:00
Adrien Destugues 4950607607 Add a features.h to auto enable _DEFAULT_SOURCE
Unless __STRICT_ANSI__ is defined (as it is when running the compiler in
--std=c89 or --std=c99, but not when running it without any specific
args), we can enable these by default and behave like most other
systems. I don't know why no one has done this yet despite suggesting it
multiple times and people prefer to #define _BSD_SOURCE manually
everywhere.

Remove all places in our Jamfiles and sources where it had been defined.
_DEFAULT_SOURCE is now enabled by default for all sources of Haiku, since we
let the compiler use GNU extensions (no strict C standard specified on
command line)

Use _DEFAULT_SOURCE as the define name to match current versions of
glibc. Enable it if _BSD_SOURCE is #defined in compiler flags, for
backward compatibility.

Change-Id: I6db04da5f6db437723cdfba3478f5094a69d7727
Reviewed-on: https://review.haiku-os.org/c/1633
Reviewed-by: Jérôme Duval <[email protected]>
2019-07-29 20:26:46 +00:00
Adrien Destugues b70baf6c5e PVS V501: redundant check
The wewant macro already checks this.

Change-Id: I9a92c8acb4e1a0cc2ef4b520383160d640a2bd94
Reviewed-on: https://review.haiku-os.org/c/1656
Reviewed-by: Jérôme Duval <[email protected]>
2019-07-28 10:52:20 +00:00
Murai Takashi 122d4ef7e9 PVS V595: Pointer was utilized before it was verified against nullptr.
Change-Id: Iba8b7e6160dc237f45080fa7c101fa72e4d8c753
Reviewed-on: https://review.haiku-os.org/c/1643
Reviewed-by: waddlesplash <[email protected]>
2019-07-27 15:22:15 +00:00
Adrien Destugues c0daed76e1 ftp: remove from sources.
Now provided in the tnftp package.

Change-Id: I862b1ff98586aa0e5a9418cf26e30b7136140249
Reviewed-on: https://review.haiku-os.org/c/1641
Reviewed-by: waddlesplash <[email protected]>
2019-07-22 23:43:04 +00:00
Adrien Destugues 91ec679f17 PVS V1010: access before start of buffer after fgets
Change-Id: I8cfa1e8a3c8dd8c2837e51756ac3eeaea1e756f0
Reviewed-on: https://review.haiku-os.org/c/1639
Reviewed-by: waddlesplash <[email protected]>
2019-07-21 20:05:08 +00:00
Murai Takashi 319c399d61 PVS V739: EOF compared with a value of the char type.
Change-Id: Icfaff590359381fbdd3bbd7993dab92111da3ed1
Reviewed-on: https://review.haiku-os.org/c/1618
Reviewed-by: waddlesplash <[email protected]>
2019-07-21 15:47:48 +00:00
Adrien Destugues 72bfb14432 PVS V1028: cast result of operation instead of operands
If an overflow occurs before the cast, we can't fix it. If we cast
first, we can rely on integer promotion to make the result use the
appropriate size.

Change-Id: I7462e28422456c07f179f94d39c10c408d9bec36
Reviewed-on: https://review.haiku-os.org/c/1623
Reviewed-by: waddlesplash <[email protected]>
2019-07-17 22:17:22 +00:00
Adrien Destugues 4a1d8b1afb PVS V575: strange values passed to well known functions
Change-Id: Id6008d93777f860d0b341bcd012fe6f86c99cf35
Reviewed-on: https://review.haiku-os.org/c/1610
Reviewed-by: Stephan Aßmus <[email protected]>
2019-07-17 01:57:50 +00:00
Adrien Destugues a6dcaa68a9 PVS V507: pointer to stack leaked to global variable
Change-Id: I56740f4b847c0b99a44e7db830bcccb20bf51cbc
Reviewed-on: https://review.haiku-os.org/c/1601
Reviewed-by: Stephan Aßmus <[email protected]>
2019-07-16 20:36:48 +00:00
Augustin Cavalier d5a29ba97c listusb: Do not try to print the port speed.
The USB3 specification changed the meaning of this field, and
it means different things depending on whether a USB 2 or 3
device is attached, so just don't print it.

Fixes listusb saying "Fullspeed" for USB3 devices. The per-device
information already prints what USB version and protocol the
device is operating on, so this was redundant anyway.
2019-07-13 19:37:19 -04:00
Augustin Cavalier 9d06690ede userland: Pass more sizes with ioctls where we can.
No "functional" change intended.
2019-07-11 23:41:52 -04:00
Murai Takashi c91c69752b bin/setdecor: Fix -Wformat=
Change-Id: I8c50ec470098817fb17c626964e6e8158323550e
Reviewed-on: https://review.haiku-os.org/c/1517
Reviewed-by: Jérôme Duval <[email protected]>
2019-07-11 21:36:29 +00:00
Murai Takashi 66fa08aa81 bin/mail_utils/mail2mbox: Fix -Wformat=
Change-Id: I38ebad839c96d4c5ff2c38f678cfa03c58931335
Reviewed-on: https://review.haiku-os.org/c/1545
Reviewed-by: Jérôme Duval <[email protected]>
2019-06-29 10:44:04 +00:00
Murai Takashi a76e1eb3c7 bin/top: Fix -Wformat=
Change-Id: Ie408017684313531f2dc18d9401cd54bb00a7e12
Reviewed-on: https://review.haiku-os.org/c/1515
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2019-06-17 22:34:37 +00:00
Murai Takashi f5fb43c94f bin/vmstat: Fix -Wformat=
Change-Id: Id0a03d868143880d50c685d830b23017293f3e38
Reviewed-on: https://review.haiku-os.org/c/1518
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2019-06-17 22:34:37 +00:00
Murai Takashi fe6e591432 bin/mail_utils/spamdbm: Fix -Wformat=
Change-Id: I912a7eac48e6e0343a59821fb1026ef54e6b0d75
Reviewed-on: https://review.haiku-os.org/c/1521
Reviewed-by: waddlesplash <[email protected]>
2019-06-17 22:34:37 +00:00
Murai Takashi 7d633b87d8 bin/mkdos: Fix -Wformat=
Change-Id: I10b44b2a660fb7db930b7d3ec139c9ada71e8109
Reviewed-on: https://review.haiku-os.org/c/1519
Reviewed-by: waddlesplash <[email protected]>
2019-06-17 22:34:37 +00:00
Murai Takashi e18440dc83 bin/shutdown: Fix -Wformat=
Change-Id: I03d89d576334fbf73134c79f3c6903860a0d447f
Reviewed-on: https://review.haiku-os.org/c/1513
Reviewed-by: waddlesplash <[email protected]>
2019-06-16 22:09:54 +00:00
Murai Takashi 312640b12c bin/version: Fix -Wformat=
Change-Id: I71fd38b6d1bb1782170438b27f66c462dcec0f0b
Reviewed-on: https://review.haiku-os.org/c/1514
Reviewed-by: waddlesplash <[email protected]>
2019-06-16 22:09:37 +00:00
Murai Takashi 6ba31e25d7 bin/screenmode: Fix -Wformat=
Change-Id: Ide67c285a064c8e1111e1522be2946f69a5bcfc6
Reviewed-on: https://review.haiku-os.org/c/1512
Reviewed-by: waddlesplash <[email protected]>
2019-06-16 14:53:11 +00:00
Murai Takashi e98c206263 bin/listres: Fix -Wformat=
Change-Id: Ida7d957c9a1f73dc87b7e0ce488c1c30cb5a95cc
Reviewed-on: https://review.haiku-os.org/c/1511
Reviewed-by: waddlesplash <[email protected]>
2019-06-16 14:53:11 +00:00
Murai Takashi b8a9c31265 bin/listfont: Fix -Wformat=
Change-Id: Ifa451635a6ff3d42b916d7e535b41db347d6d1bf
Reviewed-on: https://review.haiku-os.org/c/1510
Reviewed-by: waddlesplash <[email protected]>
2019-06-16 14:53:11 +00:00
Murai Takashi d8bf363563 bin/listport: Fix -Wformat=
Change-Id: I5d080b7cc176681a2addbb03380bde76bc748173
Reviewed-on: https://review.haiku-os.org/c/1509
Reviewed-by: waddlesplash <[email protected]>
2019-06-16 14:53:11 +00:00
Murai Takashi 74b56a20ee bin/lsindex: Fix -Wformat=
Change-Id: Ib95180d64547f728949efa64aed57f63aee57441
Reviewed-on: https://review.haiku-os.org/c/1508
Reviewed-by: Adrien Destugues <[email protected]>
2019-06-16 14:53:11 +00:00
Augustin Cavalier 63ba21d506 pkgman: Inform the user when a reboot is required to complete installation.
Fixes #14783 following on hrev53005.
2019-06-01 16:19:55 -04:00
Augustin Cavalier 5731cdeb5f media_client: Fix build after previous commit. 2019-05-17 16:03:35 -04:00
Augustin Cavalier 218a8c03cb Revert the Codec Kit.
All of Barrett's individual reverts have been squashed into this
one commit, save a few actual bugfixes.

Change-Id: Ib0a7d0a841d3ac40b1fca7372c58b7f9229bd1f0
2019-05-17 14:43:32 -04: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
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 <[email protected]>
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 <[email protected]>
2019-05-13 22:11:33 +00: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
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 <[email protected]>
2019-04-30 17:20:13 +00:00
Alexander von Gluck IV f8a5dd0828 network/tunconfig: Initial work on a tool to manage tunnels
* Modeled after pppconfig to some degree.
* Normally various VPN and other services will create / manage
  tunnels directly, however this gives us a good way to
  test / play with things initially.
2019-04-17 21:16:21 +00:00