if found = 3 at line 200, gFirewire_softc[] index is out of bounds
at line 193, and may be at line 243.
Pointed out by cppcheck.
Change-Id: I0568c503e6edea8f78e0da402271b669ba786def
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3502
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Introduce DrawTransaction that automatically hide/show floating overlays
and flush back buffer.
Fixes#15574.
Change-Id: I30088b74fc66cfcd5b2b433b34141e7d496f68a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3496
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
It allow to use arbitrary handle type, null value and destructor function.
Change-Id: I87c444cb7ef1b08d1dbed7fe4171700171d651d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2977
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
First implementation of reading sectors from an SD card.
This is not the best performance for many reasons:
- No DMA
- Reads only one sector at a time
- Cannot read more than 512 bytes per syscall
Also there are major limitations:
- Cannot read less than 512 bytes. The hardware of course works in full
sectors. The mmc_disk driver should go through the io scheduler to
make sure requests have a reasonable size and offset, and nothing
tries to read just a few bytes in the middle of a sector.
- SD cards only (no SDHC, no MMC)
Architecture problems:
I think too much of the implementation is done in sdhci_pci and should
be moved to the upper layers. However it is difficult to say without
having implemented DMA (which indeed will be at the low level of the
sdhci controller). It doesn't help that the order of operations is a
bit different depending on wether there is DMA or not. In DMA mode you
first prepare the buffer, then run the command. In non-DMA mode you
first send the command, then read the data into the buffer. We need an
API at the mmc_bus level that doesn't care about that low-level detail.
There are other things that the MMC bus should be doing however, such
as switching to different clock speeds depending on which card is
activated and how fast it can go.
At least the following should be done:
- The read method for mmc_bus and sdhci_pci should use a scatter-gather
structure as a parameter instead of a single buffer
- See if can be integrated into ExecuteCommand at sdhci level (it's
essentially a command with an additional data phase)
Change-Id: I688b6c694561074535c9c0c2545f06dc04b06e7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3466
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reading registers can change the state of the device, so we can't do
this as a generic debug function. We'll have to more carefully decide
which registers to dump in which case.
Change-Id: I4a706b749a0dd2f4f0e29b602b90354fbf6d66f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3465
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
- add info about qemu debugging features
- update qemu command line to current syntax
- add some extra options to make things easier
- remove list of files (directories are enough) and instead add a short description of each module.
Change-Id: Ie9980d8143c33655147f161b248c45689ba82476
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3463
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
No read and write support for now. But we implement getting SD card
capacity. SDHC is not supported yet (it uses a different layout for the
CSD register which will be rejected by this version of the code)
Change-Id: Ife844a62f3846c0a780259e9a3a08195e2fd965e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1068
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
If length == BPLUSTREE_MAX_KEY_LENGTH at line 237,
buffer[] index may be out of bounds at line 245.
Pointed out by cppcheck.
Change-Id: Ib86abeaa72526b327af85ca9a26b050834f5a2c9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3501
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Fix same expression (imageTypeInfo.iconWidth) is used in consecutive
assignments of 'iconWidth' and 'iconHeight' at line 191, 192.
Pointed out by cppcheck.
Change-Id: I251a4b8e6c83f86aad4fa0030ebc362f3b97fb0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3499
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Fix possible null pointer dereference at line 350-354
when 'device' is NULL at line 347.
Pointed out by cppcheck.
Change-Id: I25a090172a0d17ef3cb1fe607f70a31e579d13b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3498
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Fix possible null pointer dereference at line 314
when 'submenu' is NULL at line 297.
Pointed out by cppcheck.
Change-Id: I054f63d574f4a9608df49d48ee74b87cd0116f69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3492
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Fix value stored to 'maxWidth' or 'maxHeight' is never read
when maxWidth > fMaxWidth or maxHeight > fMaxHeight.
Pointed out by Clang Static Analyzer.
Change-Id: I2bd0b8712d47e64298c0f915f24f7f1c87f4362e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3474
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
C++ don't allow zero size class fields. If field with empty class field
is used, it's size will be 1 byte.
Create DeleteFunc instance as local variable at each use instead.
Fixes#16638.
Change-Id: Ifb76c45ea02e9fed014751542ee5f16f41e11d15
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3458
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The same as CObjectDeleter.
Change-Id: I85c4cb3635f01f13e529ca087324cc2fcb42cfc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3456
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
It allows to make typedef of pointer types and declaring pointers in headers.
Store of destructor function pointer in CObjectDeleter is no longer needed.
Change-Id: Ic629fd10b28b09f4190edf8ba6b911ca3108ab0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3455
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
All other functions that support these handle them specifically,
so vm_create_anonymous_area must do so as well.
Change-Id: I7233770926b718936baeff10ef73668ac15c5201
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3477
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fix value stored to 'status' is never read.
Pointed out by Clang Static Analyzer.
Change-Id: I0bbeafb74168d566128b53f8ad40e71218c78c45
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3473
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Also use the correct symbol for the return key (we were using another
similar arrow because this one was not available in DejaVu Sans).
Fixes#14034.
Note that build/jam/repositories/HaikuPorts ships an old version of the
Noto package that does not include the Symbols2 font. It should be
updated. Adding this to the pile of lagging behind packages, alongside
icu, mawk/gawk, and tnftp. Can anyone take care of it?
Fix leak of memory allocated to 'app'.
Pointed out by Clang Static Analyzer.
Change-Id: I59d39b76a18893bd284db1d75e40620bb1aee9e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3480
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Fix value stored to 'flags' is never read.
Pointed out by Clang Static Analyzer.
Change-Id: Ia154fbdd4dd5fb10716cf9079625ca65e2f58122
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3472
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
U8 sound has a nonzero value as its zero amplitude, so it needs to be
special-cased when mixing, applying gains and other transformations.
Change-Id: I5ad96b5f39d454bffad2449ac9f27b2ae61e2ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3470
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Can't call InfoView() with an unlocked BGLView.
* If unable to obtain to glGetString, show some "unknown" messages
Change-Id: I17d8ff84feed166644d54b0e19e0ef1fce202a74
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3476
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>