Commit Graph

8687 Commits

Author SHA1 Message Date
Fredrik Holmqvist
0ef0a587b6 Postfix/prefix increment evaluation order is not changed by parantheses. Use '+ 1' for readability instead. CID 2983.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 20:40:30 +00:00
Fredrik Holmqvist
e4fbd1171c Removing get_parent_node call from acpi_enumerate_child_devices.
Afaict it looks like it results in unbalanced Acquire calls on the parent. CID 10393.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 17:11:40 +00:00
Fredrik Holmqvist
b44c75c5eb Modified acpi namespace driver to match ring_buffer functions.
A bit confused about the signedness handling in ring_buffer internals though, int32 to size_t.

Unnested the acpi_namespace_read function a bit and removed dead check for negative lengths from read. CID 4093.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 16:17:54 +00:00
Michael Lotz
dcea2eba12 CID 2196: The sanity check did check the pointer size instead of the type size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 23:22:43 +00:00
Michael Lotz
79dd7e57fa Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 23:16:04 +00:00
Michael Lotz
6b81e70656 * CID 2195: sizeof() was used on the buffer pointer instead of the type.
* Use strlcpy() instead of memcpy() to ensure that the dirent is properly
  terminated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 23:07:18 +00:00
Michael Lotz
4462c768e6 CID 8076 and 2191 (both pointing out the same): Only the first sizeof(pointer)
bytes were initialized to 0 due to wrong use of sizeof().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 22:42:28 +00:00
Jérôme Duval
141e1aad27 Added blockgroup Flags()/SetFlags() and flag definitions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 19:57:48 +00:00
David McPaul
51d9b4fe14 correct yuv422 planar conversion. Seperate sse, sse2 and ssse3 asm code. Add packed convertor
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 07:25:40 +00:00
Michael Lotz
88cbc0dbc5 Remove unused member. Fixes CID 9579.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 01:09:15 +00:00
Michael Lotz
d10320e0e0 It's a HIDReportItem * array not a HIDReportItem ** one. Fixes CID 8078.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 01:04:13 +00:00
Michael Lotz
beaabe98d1 Fix CID 9580 although it is harmless as the _Reset() call before parsing does
initialize the member.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 01:01:28 +00:00
Michael Lotz
13486cf531 Fix dereference after free. CID 10543.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 00:49:49 +00:00
Michael Lotz
b950cc6532 * Enlarge the device name buffer a bit as with a deep enough hierarchy we might
actually hit this limit.
* Use snprintf() instead of sprintf() as suggested by CID 6447 (even though the
  USB module isn't supposed to return such a malformed string).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 00:42:21 +00:00
Michael Lotz
bf905cfe0c * Fix another non-problematic hidden parameter CID 5218.
* Check the length of the incoming buffer before accessing it through the union.
  It's necessary to do this dependent on the operation at hand, since the caller
  doesn't need to provide the full union size and the size may differ between
  (still compatible) protocol versions.
* Replace memcpy() by user_memcpy() where data is exchanged with userland.
* Small style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 00:36:23 +00:00
Michael Lotz
3d7bd2dc23 Cosmetical change only: don't shadow the "buffer" parameter with the local
variable. Didn't matter, as the parameter is only accessed through the
usb_raw_command variable that it is casted to early in the function. CID 5219.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-21 00:06:16 +00:00
Michael Lotz
1579900f55 Fix uninitialized fAllocator member. In the error case the destructor could
crash trying to delete the not created allocator. CID 9562.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-20 23:32:39 +00:00
Michael Lotz
0153c18eed That the members aren't initialized in the constructor as pointed out by
Coverity was intentional (as explained by the comment). That the fInterval
member was somehow totally forgotten though, wasn't. This should only affect
EHCI and OHCI as they take the interval into account. Might fix some strange
behaviour, but most likely won't, as the interval range is rather narrow and
shouldn't be too noticeable if set incorrectly. CID 9558.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-20 23:24:38 +00:00
Jérôme Duval
230b9a69d3 resource leaks CID 5711, 5712, 5713, 5714
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-20 21:41:49 +00:00
Jérôme Duval
0c79e77c75 Missing va_end call. CID 10604 and 10603
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-20 19:59:46 +00:00
Jérôme Duval
5bb7d60a94 Missing va_end call. CID 10605
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-20 19:54:50 +00:00
François Revol
1828f3d72c Add a function to register media codec descriptions for the usual format families using the tag lists from libavformat itself. Untested. the plugin will also have to use av_codec_get_id() to get the codec ID from the tag.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-19 04:26:46 +00:00
Jérôme Duval
45af882d06 * added fsblock_t and fileblock_t definitions, used them when needed.
* validate fBlockShift in superblock.
* Volume::AllocateBlocks() now uses an absolute fsblock instead of a blockgroup related fsblock.
* AllocationBlockGroup now provides absolute fsblock values.
* added support for extents feature: ExtentStream class is the equivalent for DataStream class for extent operations.
  The extent tree implementation is very basic, should work for normal growing/shrinking
  operations, but not for sparse files. When enlarging a file and extent tree is full,
  the root is moved in a new block and a new level is added on top. Extents can usually
  be extended when adjacent blocks are allocated. Shrinking happens by removing leafs 
  one after another.
* removed empty IndexedDirectoryIterator.*


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-18 16:26:39 +00:00
Marcus Overhagen
699dc0e367 Very ugly hack to make DVB addon find the MPEG and AC3 codecs.
Something appeards to be very wrong with codec registration.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-17 23:17:21 +00:00
Marcus Overhagen
4da4784afa added come debugging code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-17 22:35:44 +00:00
Marcus Overhagen
bcdc4db3e5 adjust file path to channel setting files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-17 21:54:53 +00:00
Stephan Aßmus
b6ec842de4 Patch by x-ist from ticket #6115:
* A lot of HID definitions got extracted from USB_hid.h into their
   own files. Many more definitions have been added from the specs.
 * The names have been moved into the proper B_* namspace.
 * The USB hid driver has been adapted for the changes.

Thanks a lot and sorry for the delay!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 20:23:56 +00:00
Jérôme Duval
b6e7a070e7 * checks file name length in FindEntry()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 18:26:06 +00:00
Ingo Weinhold
756b64fd83 * Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
  {Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 16:35:42 +00:00
Ingo Weinhold
88e38c178a Replace uses of obsolescent BReference[able] API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 14:29:37 +00:00
Marcus Overhagen
1719e941ff Fixed build for ATA_DMA_TRACING enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-15 22:30:12 +00:00
Clemens Zeidler
f108cdbfab Merge all linear programming types in one file an rename them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-13 19:23:33 +00:00
Clemens Zeidler
5440f6fee3 Refactor the linear programming class to use a minimal solver interface class and implement the interface for lp_solve. As a result lp_solve is not visible to the outside any more. This interface could be used to use other solvers as well. Rename operator constants to no clash with lp_solve constants.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-13 18:41:58 +00:00
Jérôme Duval
9637baae5b moved FindBlock() from Inode to DataStream
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-12 11:18:59 +00:00
Michael Pfeiffer
b12b2a60a7 * Bug fix: The configuration dialog was never opened, because it could
read the attribute "transport_address" created and set to an empty
  string by the print_server when the printer was created. 
  fEndpoint used an empty host name to connect to and then failed.
  Not sure why this caused a crash after closing the error dialog.
  Maybe something went wrong in the destructor using an invalid fEndpoint?
  Cures the symptoms of ticket #6973.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-12 08:06:19 +00:00
Rene Gollent
73fd617531 Since sdl_e_type is now stored in network byte order, device_consumer_thread()
needed a corresponding adjustment to convert it back to host order before
working with it. Fixes #6972.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-10 23:57:26 +00:00
Jérôme Duval
5a3eee3350 * Keyboard input device addon: fix deadkey string leak.
* consoled: CID 1696, the found deadkey string is unused.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-10 20:38:22 +00:00
Jérôme Duval
f7218c2187 * HTree::Lookup() was trying to find the entry .. through indexed search instead of linear search. Should fix #6305
* DirectoryIterator::FindEntry() now takes name length in account for name comparison.
* cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-10 20:02:53 +00:00
Michael Pfeiffer
331c922016 * Renamed method PrinterCap::IsSupport() to Supports().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-10 07:26:14 +00:00
François Revol
5f5d09f948 Port pc_serial to the new tty module.
Builds but won't work because the tty module lacks essential calls to read and write data :^)
Lots of ifdef since I need the R5 code around for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-09 16:47:49 +00:00
Philippe Houdoin
6f14f6ac33 Fix gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-09 07:17:54 +00:00
François Revol
b77aa0155d Fix gcc4 build:
- use new(std::nothrow) from <new> since we dropped kernel_cpp.h,
- fix "declared 'extern' and later 'static'" warning,
- fix "deprecated conversion from string constant to 'char*'" warning in tracing code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-09 00:40:25 +00:00
Axel Dörfler
54490bbd50 * sockaddr_dl::sdl_e_type is now always stored in network order.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 23:42:34 +00:00
Axel Dörfler
2cae3e8847 * SIOCGIFMEDIA now also works on the AF_LINK level.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 23:35:45 +00:00
Clemens Zeidler
6f61f09f4d Move S&T group switching shortcut to cmd + option + arrow up/down.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 22:25:44 +00:00
Michael Pfeiffer
4410ee1269 * Code style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 19:09:44 +00:00
Michael Pfeiffer
fefd3ba588 * Code style changed in class GraphicsDriver and and
child classes
* Removed namespace handling for Metrowerks compiler
* Initialize all fields in constructor


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 10:22:40 +00:00
Michael Lotz
9028c687fb That one slipped by in the last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 00:49:22 +00:00
Michael Lotz
95fe58a78d Clean out backwards compatibility cruft, local copy of USB header, packageing
rules and support files that don't really apply anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 00:44:10 +00:00
Michael Lotz
b994a18508 Port of usb_serial to the generic tty module. I don't remember exactly if or how
well this was working, but since it was non-functional on Haiku anyway this
shouldn't hurt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 00:32:24 +00:00