Commit Graph

7908 Commits

Author SHA1 Message Date
Adrien Destugues
53286932c0 Move IconMenuItem.h to headers/private/tracker.
* This can be useful outside of Tracker, so make it more visible.
2014-04-24 14:33:53 +02:00
Oliver Tappe
94089b909d Revert 6f68e52 and fix the gcc2 build via template.
* Instead of forcing the hash-table to use a copy of the key,
  introduce and use TypeOperation template to avoid taking a
  reference of a reference type (which gcc2 doesn't allow).
2014-04-20 00:26:29 +02:00
Ingo Weinhold
2d91773d2e Adjust packagefs ioctl interface to support old states
* PackageFSVolumeInfo: Add the directories for all relevant states.
* PackageFSPackageInfo: Include the package file's parent directory node
  ref.

Package daemon and package kit still don't support old states yet.
2014-04-18 23:31:40 +02:00
Ingo Weinhold
5c0f8450ac Boot loader: Add support for choosing an old packages state
For potential boot volumes with older packages states the respective
item in the boot volume menu now has a sub menu for selecting a state.
The boot loader functionality for this feature is complete -- i.e. the
respective kernel is loaded and the name of the old state is added to
the kernel args -- but kernel packagefs and package daemon support is
still missing.
2014-04-18 23:31:39 +02:00
Ingo Weinhold
59ae1c816d Boot loader: Add get_stat(), directory_from()
* Add Node::Stat() and simplify Descriptor::Stat().
* Add get_stat() and directory_from().
2014-04-18 23:31:39 +02:00
Ingo Weinhold
2f019bd6ca boot loader: Implement subset of <dirent.h> API
* Add opendir(), closedir(), readdir(), rewinddir().
* Add open_directory(), similar to opendir(), but basing the path off a
  specified directory.
2014-04-18 23:31:39 +02:00
Adrien Destugues
cfc4b62367 Network Kit: Prepare for HTTP range requests
* The DataReceived hook gets a position argument, making it possible for
listeners to handle out-of-order data (from two range requests at
different positions, for example)
* Adjust HaikuDepot (only user of the API in our sources)
* Add a copy constructor to HTTPRequest that copies the relevant
parameters from an existing request. Makes it easy to repeat a request
with a different range. Could be useful for restarting downloads, or
paralellizing them.
* Add SetRangeStart, SetRangeEnd calls to HTTPRequest, no implementation
yet. I'm putting all the API changes in this commit as it needs to be
synced with a matching haikuwebkit release.
* All archs must update to HaikuWebkit 1.3.0. Previous versions are
broken by this.
2014-04-12 08:57:26 +02:00
John Scipione
ebd3bcdb9b exfat: handle 4-byte UTF-16 surrogate pairs
... in filenames. Replace the existing Unicode conversion functions
with UTF conversion functions from js that he relicensed MIT for us.

Put the UTF conversion functions in a private but shared code location
so that they can be accessed throughout the kernel.

Right now we only provide functions to convert between UTF-8 and UTF-16.
At some point we should also add functions to convert between UTF-8 and
UTF-32 and UTF-16 and UTF-32 but these aren't needed by exfat.

Remove the old Unicode conversion functions from exfat as they assumed
UCS-2 characters and don't work with UTF-16 used by exfat.

Rename most variables with the term length with code unit where code units
are intended. The term length, when used, means length in bytes while code
units represent either a full 2-byte UTF-16 character or half a 4-byte
surrogate pair.
2014-04-11 18:46:03 -04:00
Jérôme Duval
6fd00f80e8 scsi_periph: implemented VPD inquiry.
* declared block limits and logical block provisioning structs.
* based on SPC-4 and SBC-4 standards.
2014-04-09 20:40:11 +02:00
John Scipione
e439b00397 Fix button label position, try number 2
Create and use BLayoutUtils::AlignOnRect() to position the button label
in BControlLook::DrawLabel().

AlignOnRect(), unlike AlignInFrame(), provides the possibility to return
a rectangle with dimensions greater than the available size.

Add some comments above the methods in LayoutUtils that indicate such.

Also update copyright headers in LayoutUtils and ControlLook
2014-04-08 14:10:10 -04:00
Adrien Destugues
2feaa37f24 Move media plug-in support to application side.
The media server tried to use node monitoring to dynamically add and
remove plug-ins, but it isn't that useful:
* When a plug-in is added, applications would have to query the media
server to get an up to date list of available formats. For example
MediaConvert populates its format menus on startup.
* When removing a plugin, if an app already had it loaded, there is not
much that can be done to keep it working.
* The list of plugins was not sorted by directories (user vs system
add-ons), so the directories were re-scanned to make sure user add-ons
were returned first, rendering the node monitoring less interesting.

Now, the format handling is done by each application. The node
monitoring is removed, instead the apps will scan the plugin directory
when first using the media kit classes. Restarting the application is
needed to update the media formats list.
2014-04-02 09:56:32 +02:00
John Scipione
18027fff34 Whitespace style fixes only in StorageDefs.h
No functional change intended.
2014-03-31 16:22:06 -04:00
John Scipione
9ce450b9c2 AboutWindow: Move to Interface Kit (still private) 2014-03-25 14:17:19 -04:00
John Scipione
a60e98f4a1 AboutWindow: Make setters virtual 2014-03-25 14:07:47 -04:00
John Scipione
78877e7200 AboutWindow: Add FBC padding 2014-03-25 14:07:46 -04:00
John Scipione
293d80be6f BAboutWindow: style fixes
* mostly whitespace fixes
* reorder methods
2014-03-25 14:07:44 -04:00
Stephan Aßmus
e883b3c9ff Fixed multi-line #ifdef
I definitely compiled last night, but how in the world
was that possible?
2014-03-18 20:40:02 +01:00
Stephan Aßmus
244796701b app_server: store and restore fill rule...
...when sending the whole view state over the link.
Also inherit the fill rule when pushing states (DrawState
copy constructor). A somewhat sloppy oversight, I must add.
2014-03-17 22:55:47 +01:00
Stephan Aßmus
6d19a82f63 Don't define B_SPINLOCK_INITIALIZER for test app_server
* I don't know what I am doing here, but the test app_server only
   ever built for me recently when I disabled the define, so I might
   as well commit this...
2014-03-17 22:54:19 +01:00
Pawel Dziepak
b167307526 kernel: Properly synchronize suspending new thread
After load_image() the child thread is suspended and the parent is
expected to resume it later. However, it is possible that the parent
attempts to resume its child after it has been notified that the image
had been loaded but before the child managed to suspend itself. In such
case the child would suspends itself after that wake up attempt and,
consequently will not be ever resumed.

To mitigate that problem flag Thread::going_to_suspend has been added
which helps synchronizing thread suspension and continuation in a similar
way that "traditional" thread blocking is performed. This means that
the child should behave in a following manner: set its going_to_suspend flag,
notify the parent (i.e. any thread that may want to resume it), acquire
its scheduler_lock and suspend itself if the going_to_suspend flag is set.
The parent should follow pattern: clear going_to_suspend flag of the thread
that is about to be resumed, acquire that thread scheduler_lock and enqueue
it in a run queue if it is suspended.

Thanks Oliver for reporting the bug and identifying what causes it.
2014-03-17 02:40:12 +01:00
Pawel Dziepak
d7e1e3e012 kernel/UserEvent: Make sure UserEvent object is valid during DPC
Most of the actual UserEvent work is done in DPC so that we don't have
to care about the limitations of the context in which UserEvent::Fire()
is invoked. This requires appropriate management of lifetime of UserEvent
instances to make sure that DoDPC() method is always called on a valid
object.
2014-03-17 02:40:12 +01:00
Jonathan Schleifer
88d550e67e histedit.h: Add missing #include <sys/cdefs.h>
This fixes building openssh on the bootstrap image.

The real problem is that it picks up this file instead of the histedit.h
from libedit, though. But since this include was missing anyway, it
makes sense to fix this file, too.
2014-03-15 04:34:46 +01:00
Adrien Destugues
eb43166326 app_server & interface kit: support fill rules.
* BView gets SetFillRule/FillRule methods. The fill rule is part of the
view state.
* The B_NONZERO rule is the default. This is what we implemented before.
* The B_EVEN_ODD rule is the other common possibility for this, and
we need to support it to help WebKit to render properly.
2014-03-11 17:27:42 +01:00
Jonathan Schleifer
92bd26ce8e stdio.h: Add missing *_unlocked declarations
Configure scripts would find the symbols and thus use them and assume
our headers declare them.

This fixes building gcc_bootstrap.
2014-03-09 23:08:51 +01:00
John Scipione
ab5c74422e BView: ScrollWithMouseWheelDelta return status code 2014-03-07 19:11:44 -05:00
John Scipione
5d10a74cfb BSeparatorItem: Style fix, rename archive to data
... missed it in a few places, trying to make variables names consistent.

Update hrev in docs
2014-03-04 14:28:20 -05:00
John Scipione
4479c8fda7 Style fixes to BSeparatorItem class.
Mostly meant for documentation with a few other style corrections as well.

Update copyright header.
2014-03-04 14:15:20 -05:00
John Scipione
fa412b5fd9 BMenuItem: Style fixes related to documentation. 2014-02-28 19:05:34 -05:00
Alexander von Gluck IV
d035469704 ARM: Name beagleboneblk back to beagle
* Pulkomandy pointed out that all Beagle hardware is
  very similar so we could likely get away with a single
  ARM target board.
2014-02-26 15:33:40 -06:00
Alexander von Gluck IV
8cfbbff4df ARM: Fix dmb opcode 2 on ARMv6
* Typo, also fix tabs
* Sorry for the spam, this should be correct now
2014-02-26 13:22:18 -06:00
Alexander von Gluck IV
b6994f96c0 ARM: Break apart ARMv5 and older dsb/dmb
* Add isb just because.
* pdziepak pointed out that ARMv5 and before
  had different barrier support.
* pdziepak also mentioned that dsb was too strong
  for __sync_synchronize
2014-02-26 13:17:21 -06:00
Alexander von Gluck IV
a21611e439 ARM: Add ARMv6 or older __sync_synchronize built-in
* On ARMv6 or older, we do a simulated dsb.
* Move __sync_synchronize into thread.c in libroot
  and use the new arch_atomic.h dsb/dmb defines.
* Gets arm @bootstrap-raw to end of bootstrap.
2014-02-26 12:51:51 -06:00
Alexander von Gluck IV
6d3363214f ARM: Simplify board specification
* Don't assume verdex as it isn't clear this was
  occurring.
* Make an educated guess on HAIKU_BOOT_PLATFORM
  based on provided board (but still allow it to
  be overridden)
* Error out if user doesn't populate
  HAIKU_BOOT_PLATFORM or enters an unknown board
  name.
* You need to add "-sHAIKU_BOOT_BOARD=xxx" to
  your jam to build for the proper ARM device.
* Rename beagle to beagleboneblk as per the
  documentation.
2014-02-26 00:27:18 -06:00
John Scipione
a3dc72e69c ScreenSaverSettings: Silly indentiation fix 2014-02-25 14:58:37 -05:00
Julian Harnath
d10ecc2c41 Style fix: add parameter name
* As pointed out by Axel.
2014-02-22 13:51:55 +00:00
Julian Harnath
dad49763d8 Disallow copy-construction of BCertificate.
* Prevents accidential creation of multiple instances with
  ownership of same fPrivate.
2014-02-22 13:51:52 +00:00
Julian Harnath
c99d7ea45c Fix double-free crash in BSecureSocket when cert. verification fails
* BSecureSocket::CertificateVerificationFailed() took a BCertificate
  instance by value as parameter.
  BCertificate deletes internal data in its destructor. Passing an
  object by value creates a copy, so the copy attempted to delete
  the internal data again during its destruction.
  This caused mail_daemon to crash here when it came across a failed
  certificate.

* Fix: pass BCertificate object as reference.
2014-02-22 02:09:55 +00:00
Alexander von Gluck IV
122d1cddc9 Haiku: Fix posix INT64_C macros on x86_64
* Was causing LLVM to fail to build on x86_64
* Make XINT64 adjust based on architecture like
  config/types.h to ensure these macros match
  uint64 and int64 at all times.
* Resolves #10566
2014-02-21 01:38:54 -06:00
John Scipione
14aa801ae9 Update DecorInfo to scan for decorators
Look in system and user packaged and non-packaged decorator directories.
2014-02-20 19:31:49 -05:00
Ithamar R. Adema
8f4db360bc arm/atomic: round of atomic function changes
* change vint{32,64} to int{32,64} in:
  * kernel implementation
  * syscall definitions
  * libroot prototypes
* update syscall functions with new atomic prototypes.
2014-02-15 11:46:12 +01:00
Ithamar R. Adema
4b47d96a77 arm: fix compiler ARM architecture detection
For determining if to define ATOMIC{,64}_FUNCS_ARE_SYSCALLS, use
the proper macro.
2014-02-15 11:46:11 +01:00
Ithamar R. Adema
5cef6be21f arm/atomic: fixup arch_atomic.h
* Remove _inline functions, since we're not using inlines
* Use compiler barrier instead of GCC builtin
2014-02-15 11:46:11 +01:00
Alexander von Gluck IV
35171b073d arm: Miscellaneous build fixes
* Use atomic_get_and_set for return value
* Atomics are no longer volatile
* Add missing arch_cpu_pause stub
* Move arch_cpu_idle to arch_cpu header to match
  other architectures
2014-02-12 23:37:15 -06:00
Alexander von Gluck IV
8018e8fa91 arm: Rework hrev46863 to use gcc built-in
* Those calls were indeed v7+ only, and our toolchain
  is v6.
2014-02-12 23:34:08 -06:00
Alexander von Gluck IV
92b2e03d0d arm: Add initial memory barrier functions
* These likely need reviewed by someone better
  at arm assembly. (#10537)
2014-02-12 23:11:11 -06:00
Jérôme Duval
7202cfb455 build fix follow up on status_t/ssize_t changes.
* added a TODO in packagefs.
2014-02-11 18:26:41 +01:00
Adrien Destugues
19f3bae071 Fix more issues detected by gcc4 compiler:
More ssize_t/status_t mixup.
2014-02-11 17:51:22 +01:00
Adrien Destugues
6555120f3b ...and also fix a mismatched prototype
gcc2 doesn't seem to notice.
2014-02-11 13:26:32 +01:00
Adrien Destugues
00dfae0bce Fix build.
Sorry, renaming headers isn't detected by Jam and not everything was
rebuilt.
2014-02-11 12:50:27 +01:00
Adrien Destugues
36b1f55a18 DynamicBuffer: implement BDataIO
This makes it possible to use it with the ZlibDecompressor.
2014-02-11 12:06:41 +01:00