Commit Graph

59742 Commits

Author SHA1 Message Date
Augustin Cavalier
d6f3954f39 XHCI: Tweak copyright header.
* List authors in alphabetical order.
 * Add myself.
 * Make first copyright year the actual year the file was created.
2019-02-19 16:41:47 -05:00
Andrew Lindesay
784aba8e2d HaikuDepot: Fix Code-Generation Jam Logic
The Jam build logic for HaikuDepot was potentially creating
a dummy file that was newer than the generated .cpp/.h files.
This then, in turn, caused the dependent .o files to be
considered needing to be re-built.  This change will ensure
that the dummy file is touched first so it is not newer than
the generated sources and also if the dummy does end up
being newer then the generated sources will be touched.

trac #14853

Change-Id: Ieefb0b2aa14bf43b7cbbdfee4228c215cad5b6fa
Reviewed-on: https://review.haiku-os.org/c/1070
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 21:34:23 +00:00
Fabiano Fidêncio
768957dca1 ImageRules: Ensure nightly builds will have a stable volume-id
Let's make the nightly builds consistent in a way that they would always
be recognized by libosinfo (and, consequently, by GNOME Boxes,
 virt-manager, virt-install, ...) by explictly using "nightly" instead
of the $(HAIKU_VERSION) when generating nightly builds.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>

Change-Id: I6fc4f15be1e8e9244abf14e75308fc825f37b2e8
Reviewed-on: https://review.haiku-os.org/c/1053
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-02-19 19:03:25 +00:00
ahenriksson
aa7750382a bfs: split checkfs code into FileSystemVisitor and CheckVisitor
Another FileSystemVisitor implementation will be used for resizing

Change-Id: I2d5f47dcbefb4c76834487b194a99c6f5ae7de50
Reviewed-on: https://review.haiku-os.org/c/923
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-02-19 18:44:43 +00:00
ahenriksson
8497a2cc28 vfs: functions to change a vnode busy status and ID
The kernel version is only partially tested.

Change-Id: I9a2f6c78087154ab137eadbced99062a8a2dd688
Reviewed-on: https://review.haiku-os.org/c/918
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-19 18:44:43 +00:00
Adrien Destugues
518af33f33 mmc/sd: support for SD v2.0 cards
Older cards did not implement CMD8, so handle the command stalling, and
proceed with initialization (not querying about SDHC support in that
case, as per the spec).

Change-Id: Ie842effc2f99e1adf1990b3215be79db493138b5
Reviewed-on: https://review.haiku-os.org/c/1056
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-19 18:34:03 +00:00
Adrien Destugues
ff76d2df8e sdhci and mmc implementation
sdhci:
- Add semaphore for interrupt management
- Add basic operations (setting clock, executing a command)
- Add early initialization (clocks and power up)
- Wrap the bus in a C++ class to ease usage
- Expose API to MMC bus manager
- TODO: manage card insertion and removal interrupts
- TODO: use MSI when available

mmc_bus:
- Implements SD card management independant of the way we access the bus
  (later on different drivers can provide the same API as SDHCI)
- Worker thread to do the initialization
- Implement card initialization process up until getting an RCA from the
  card. This is the generic part to assign an ID to the card, after this
  point commands can be targetted at the specific card so it can be
  handed over to the mmc_disk driver.
- TODO: initialization for non-SDHC cards which do not reply to CMD8.

Change-Id: I71950ca3ce206378a68fa7f97c19f638183d6cdd
Reviewed-on: https://review.haiku-os.org/c/1032
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-19 18:33:25 +00:00
Rob Gill
1f93ed9936 Avoid use of sprintf/snprintf on same source/destination (undefined
result)

 * Altered to avoid use of sprintf/snprintf to copy between the same
   source and destination. (This is an undefined result since c99)

 * (consequential trailing whitespace removal & line length adjustment)
Change-Id: I43976af43fe99d15b6c2677c5ab05db46fd6a8c0
Reviewed-on: https://review.haiku-os.org/c/1036
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 18:32:20 +00:00
Murai Takashi
a31244d098 mail: Fix potential memory leak
Fix memory leak when realloc() failed.
Pointed out by Clang Static Analyzer.

Change-Id: I13f758c4d89275651e22785652d0880a6d5b1a8e
Reviewed-on: https://review.haiku-os.org/c/1064
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 18:31:44 +00:00
Murai Takashi
d938c7118f userlandfs/server/fuse: Fix potential memory leak
* Fix potential leak of 'cookie' at line 2206, which is allocated
  at line 2203. Pointed out by Clang Static Analyzer.
* Add NULL check to 'cookie'.

Change-Id: Ibfdbe3a52ceb0d29adf1acca51fb7b27d2c532f3
Reviewed-on: https://review.haiku-os.org/c/1065
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 18:31:44 +00:00
Murai Takashi
b7223dc11f accelerants/radeon: Fix potential memory leak
* Fix potential leak of 'node' at line 147, which is allocated
  at line 123. Pointed out by Clang Static Analyzer.
* Remove trailing tabs.

Change-Id: I2289dfb5a9d0ada1fd7fc3854906d66a730b5bcb
Reviewed-on: https://review.haiku-os.org/c/1058
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 18:31:44 +00:00
John Scipione
4512141632 BeDecorator Draw outer left close button bevel to the edge
... just like BeOS R5 did.

In 3123432674 (hrev52122) I wrote:

"Undraw the bottom left and top right corners of bitmaps in the
unpressed state. BeOS did not do this (usually), but it should
have as it closes the ring."

This was a bad idea, draw like BeOS R5 instead.

Change-Id: I4eba7566bb31d3e208bc30439b0221b70eeb2bbe
Reviewed-on: https://review.haiku-os.org/c/1066
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 18:29:44 +00:00
Yatendra Singh
e680a439bf Launchbox: autostart on boot
Use launch daemon to autostart Launchbox if enabled in settings.

Change-Id: Id0aaf454cfbc0cc42db2dbb54d6788c79dae6949
Reviewed-on: https://review.haiku-os.org/c/917
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 18:29:17 +00:00
Augustin Cavalier
c62142a72b kernel: Add missing NULL check to _user_xsi_semget.
Private semaphores will have a key of -1, but IPC_PRIVATE is 0,
meaning it is possible to wind up here and get a NULL semaphoreSet
if someone passes us an argument of -1.

Reported on Twitter.
2019-02-18 23:24:28 -05:00
Barrett17
1efb85decc Add initial DVD support implementation
* This is an initial implementation of the DVD streamer.
It needs various development to actually work, so can be
considered as a begin.
* Navigation is not implemented, this needs some work to
add hooks in the BMediaStreamer to allow mouse tracking.
2019-02-18 23:40:09 +01:00
Barrett17
a92a085d1d BuildFeatures: Add libdvdnav and libdvdcss deps 2019-02-18 23:40:08 +01:00
Barrett17
2e53ae46b4 media_server: Use portable printf codes 2019-02-18 23:40:08 +01:00
Augustin Cavalier
d47cf79f7c XHCI: Rework endpoint-for-pipe setup and initialization.
* Stop/Reset/Set was commented out because it caused invalid context
   states. This was because we cannot run those commands until after
   we have configured the endpoint. Moving them to after that
   makes it work properly.
 * Add the endpoint to the context after configuring it, not before.
 * After configuration, we need to issue either an EvaluateContext
   or a ConfigureEndpoint, but not both, depending on whether
   this is endpoint number 1 (Control) or not.

All cross-checked against FreeBSD (the last change in particular comes
directly from a change of theirs.)

Tested with usb_disk and usb_hid on already-working hardware, no
obvious regressions. Possibly helps with #13834, among other
initialization problems.
2019-02-18 17:04:12 -05:00
Alexander von Gluck IV
371809b601 x86_64: Update build_package to include missing llvm7 for mesa_swpipe
Change-Id: Iaa381e1dcb5fa486a655a09e032cf780c5d14759
2019-02-18 13:44:56 -06:00
Augustin Cavalier
0ca15910c4 XHCI: Check return value of _LinkDescriptorForPipe. 2019-02-18 11:53:05 -05:00
Augustin Cavalier
db360a2064 XHCI: Make sure we have at least one TRB in CreateDescriptorChain.
Linux seems to do the same thing. Confirmed as correct by korli
in #12929.
2019-02-18 11:53:05 -05:00
Alexander von Gluck IV
b5ded9cc1a x86_64: Update build_packages for new libbluray,libdvdnav,libdvdread
* Purposely excluded was libdvdcss, libaacs

Change-Id: I83514e301eb3ee2c8f7d90ff6225ccd9a64314ad
2019-02-18 10:24:10 -06:00
Alexander von Gluck IV
4ec9f32bc2 HaikuPorts: Update README.md for build-package updates
Change-Id: I5845db702da506eaaa5e179d8470fdaa72470874
2019-02-18 10:19:57 -06:00
Augustin Cavalier
eae896c7ae XHCI: Print command code in "unsuccessful command" log message.
This should help with debugging #13772.
2019-02-18 10:15:55 -05:00
Augustin Cavalier
a881209f38 XHCI: Minor tweaks and other changes.
* Cap fSlotCount at the hardware level, not just at the software
   level.
 * Clear interrupts in init routine.
 * Write high DMA address of DCBAAP.

Found by cross-comparing with DragonFlyBSD and OpenBSD.
2019-02-18 10:05:04 -05:00
Augustin Cavalier
6554cc220f XHCI: Fix the build of tracing code. 2019-02-18 10:03:47 -05:00
Murai Takashi
29dcf8568b drivers/bus/usb: Fix potential memory leak
* Fix potential leak of 'controlData' at line 701, which is allocated
  at line 695. Pointed out by Clang Static Analyzer.
* Add NULL check to 'controlData'.

Change-Id: I96b0244d05d303b4c08ac8969f5ce5fc2e5012f9
Reviewed-on: https://review.haiku-os.org/c/1059
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-02-17 20:48:22 +00:00
Augustin Cavalier
c054900882 kernel: Sanity-check interrupts in snooze().
This didn't trigger any panics on my bare-metal dev install when tested,
but it might explain some easily-reproducible hardlocks (i.e. can't
even drop to KDL via emergency keys) I was seeing on other machines.
2019-02-17 14:36:16 -05:00
Augustin Cavalier
1eededf17f kernel: Only sanity-check interrupts in switch_sem_etc under KDEBUG.
"are_interrupts_enabled()" is a "relatively" expensive function, so avoiding
it makes sense. This is the same way it's done elsewhere in sem.cpp, as well
as for mutexes and condition variables also.
2019-02-17 14:34:36 -05:00
Augustin Cavalier
c61fa718f2 usb_disk: Handle user buffer-to-partial buffer copies correctly.
Discovered by an SMAP violation triggered by running "writembr" on a
USB drive.
2019-02-17 13:10:24 -05:00
Augustin Cavalier
6b0251e1bd syscall_args: Remove R5 compatibility hack. 2019-02-17 13:06:49 -05:00
Barrett17
8670326a9a http_streamer: Remove shared headers dependency 2019-02-17 14:26:43 +01:00
Barrett17
4b35c87cd7 rtsp_streamer: Remove shared headers dependency 2019-02-17 14:26:19 +01:00
Barrett17
784c192df2 AdapterIO: Don't inclue RWLocker header in public file 2019-02-17 14:22:30 +01:00
Barrett17
0b2683b543 rtsp_streamer: Fix Jamfile 2019-02-17 14:15:59 +01:00
Barrett17
303f574120 MediaPlugin: Use three decimals for plugin version
* That allow to manage minor and major versions.
2019-02-17 14:15:08 +01:00
Barrett17
a06d611775 rtsp_streamer: Update to last codec kit API
* Fix build
2019-02-17 14:10:28 +01:00
Barrett17
7928a43a84 media_server: Use portable printf formatting code 2019-02-17 11:54:10 +01:00
Barrett17
9ef48264f0 rtsp_streamer: Fix copyright 2019-02-17 11:54:10 +01:00
Barrett17
eb6626e962 MetaData: Implement copy constructor 2019-02-17 11:54:10 +01:00
Barrett17
d0064da6a5 MetaData: Introduce missing keys 2019-02-17 11:54:09 +01:00
Barrett17
9ad840d86f MetaData: Correct doxygen brief 2019-02-17 11:54:09 +01:00
Alexander von Gluck IV
5ac9b50641 headers/riscv64: Fill out headers needed by buildtools
Change-Id: I131a44fbcf7b4f6471cc737cff40bd2966ec9764
2019-02-16 19:43:27 -06:00
Adrien Destugues
8b6f4cb290 Update SDHCI and device driver docs
Change-Id: Ic64b501b7166dd718aaf12412833f912e23bc6bf
Reviewed-on: https://review.haiku-os.org/c/967
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-16 21:46:56 +00:00
Alexander von Gluck IV
122efe3a12 drivers/vesa: Don't dereference frame_buffer when NULL
* Solves the KDL side of #14905
* We do it quietly since we don't want a log event every blit

Change-Id: I8e9b55fab78bd1742a4282dd0812823f33dd9f32
2019-02-15 15:27:32 -06:00
Augustin Cavalier
50428c35ad btrfs: Fix double-free in Inode::_Read().
extent_data is now held by a MemoryDeleter, so thus with this line
it would have been freed twice.
2019-02-15 14:19:07 -05:00
Alexander von Gluck IV
f4dca556ad bootstrap: Fix PS1 to solve entering chroot via haikuporter
Change-Id: Ida03530aea9ab5075af3a951cf5804d7c5694490
2019-02-15 11:51:11 -06:00
Alexander von Gluck IV
54624bda43 bootstrap: Add some tools to test bootstrap steps
Change-Id: Idac85d5b7c1fadd371efd13fa788a03656e82e66
2019-02-15 11:27:04 -06:00
Rob Gill
efac84e790 btrfs return errors on panic, add memory deleter to ReadAt()
* Additional return BAD_DATA after error conditions encountered
   when attempting to decompress BTRFS extents.

 * MemoryDeleter for extent_data added to ReadAt() preventing
   double-free after error.

Change-Id: Ib9f8e9723d3fb6aaff8e69dbb66cd279e86f226b
Reviewed-on: https://review.haiku-os.org/c/1045
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-15 08:20:09 +00:00
Augustin Cavalier
b6adef8501 media_server: Adapt to new HashMap API. 2019-02-14 20:47:13 -05:00