* So that you know how much already was, and still has to be downloaded.
* Automatic whitespace cleanup.
* The link in FetchFileJob.h did not fetch the correct header under
Haiku anymore (since the addition of the private headers to the
image).
* drop my fdt tests
* we have to call fdt parsing code *after* cpu_init (why?)
* pass fdt pointer to all FDT support calls to avoid confusion
once we get into the kernel land
* look for PL011 compatible uart and use it
* Add some saftey checks to serial putc code to avoid null*
* fdt_node_check_compatible returns 0 on success not 1
* fdt_get_device_reg needs to add the SOC base to the result
* fdt_get_device_reg might need to add the second range cell
instead of reg?
* And call it from the DNS client -- this is the only add-on that does
not trigger a configuration or settings update, so we have to notify
the changes manually.
* Get{Interface|Network|Service}() methods are now const.
* Added variants of Interface(), and Service() that are const.
* Added new BNetworkServiceSettings::IsRunning() convenience method that
reflects the status quo rather than the settings.
* Added BNetworkInterfaceListItem that can be used by interface protocol
add-ons to represent their functionality in the list view.
* It will automatically update itself on changes, and will show the
specified label, and address, if any, as well as indicate whether or
not the family has been disabled (which doesn't work perfectly yet,
as IFF_AUTO_CONFIGURED is on the interface level).
* Therefore, the interface list item will no longer show the address,
but the type of the device instead.
* Introduced the BNetworkConfigurationListener interface that is used
to broadcast network updates to.
* You can now optionally specify a converter that does the actual
message to settings conversion, and vice versa.
* This allows for more sophisticated and custom conversions.
* Network now monitors all network, and network settings changes, and
will notify all add-ons about those changes.
* Removed the global apply button. Instead, the static IP configuration
now got that button. All other changes will be instant.
* Added (still incomplete) helper classes for the settings messages.
* The net_server now uses these classes for its interfaces, and services.
* Renamed service_address to service_connection, as that better matches
what it is used for.
* As experimental API class BNetworkSettings.
* Added add/remove methods for interfaces, and services, too.
* Moved the conversion of the wireless networks into the settings class,
too, so that it only gives out converted ones (but accepts both
variants).
* The interfaces logic is within the main application, so is the
new interface view.
* Disabling/renegotiating does not work yet.
* Reveals a bug in some interface code; when you click on an ethernet
device first, there is no place for the wireless menu. When you then
press on a wireless device, it crashes in BMenuField code.
In the other direction, there is then an empty space.
* Fixed list item width reporting.
* Added an extra looperName argument to the private BApplication
constructor that BServer is using.
* This is now used to fix the ugliness that gave the registrar
a different looper name, and even saves a string comparison.
* Move more code into fdt_support
* We now can query FDT registers based on name or alias
* Return addr_t where it makes sense
* Copyright change ok'ed by mmu_man
* Called via arm_mailbox_bcm2835 *and* arm_framebuffer_bcm2835
* This is a bit messy. We really should be getting these
chipset-centric bases from the provided FDT / DTB.
* I can't think of a way to redo this without undoing
work towards FDT.
* The Raspberry pi 2 uses a new SoC which differs slightly
from the Raspberry Pi 1.
* Someday these two board targets could go away when we get
FDT support.
* To while there was some compatibility between
BCM2708 and BCM2805, it makes the BCM2806 changes
more confusing. We don't have any valueable BCM2708
targets.
They are effectively the same thing, but int64 is more generic.
I used an off_t because that is what Tracker passed in, yet, this could be
used in other places where an off_t doesn't make as much sense.
Which doubles the maximum width fixing #11809. I wanted to convert this to
a variadic functionbut that would require updating all of the instance that use
MessageFormat or a clever hack to get around the ambiguity of an off_t
argument and an int argument count with 0 arguments. Either way seemed
out of the scope of fixing this bug.
Fixes#11809
Another Beta1 bug down!
Implement the todo in Open Target Folder to select the result by sending
Tracker a message with the refs to select.
Add a new kSelect message constant to tracker_private.h to hook into.
Tracker reads in the message and finds the window that the refs are located in,
activates it, then selects the corresponding poses scrolling the pose view
if necessary.
Bump version of Open Target Folder to 1.0.2
Intel changed the PCH interrupt bits between Sandy Bridge and Ivy Bridge
to make space for the 3rd display pipe. Take this into account and check
for the correct bits on the newer devices.
Fixes#11522.
and remove TExpandoMenuBar as a friend class to BMenu hack.
In Deskbar, call the newly added MenuPrivate::SetLayout() method instead.
This is a much cleaner way to implement this, thanks Stefano Ceccherini
for the tip!
Add private BMenu::_SetMenuLayout() method. Set TExpandoMenuBar
as a friend class in BMenu to call this method. A little hacky,
but, this keeps SetMenuLayout() from being exposed as part of
the public API.
Don't destroy and rebuild the ExpandoMenuBar when switching from
horizontal to vertical mode. Instead build the TExpandoMenuBar
when the application starts and then switch it from B_ITEMS_IN_ROW
to B_ITEMS_IN_COLUMNS by using the newly added _SetMenuLayout()
method.
When we resize from vertical to horizontal, recalc the max
menu item widths, this resizes the application menu items so
that they take up the right amount of space.
Since we no longer destroy the menu bar we no longer have to
save whether menu items are expanded or not in a separate list.
Instead we can store that information in directly in
TExpandoMenuBar. This removes a lot of code.
Fixes#9350
* When RemoveSelf() is called, we do not own our own layout items, so
we must not delete them.
* However, we do own them when we still have layout items left when
we get deleted ourselves.
* This fixes removing/adding a child view to a view without deleting
it inbetween (like the new Network preferences will do).
* Optimized item removal -- not a good idea to always remove item 0.
"BToolBar" matches the current convention ("BStatusBar", "BMenuBar", etc.)
I've no idea what I was thinking when I renamed this before...
Also adjust all users of BToolBar (Tracker and ShowImage).
This reverts commit 31ea76548a.
Adrien, please try again without clobbering the otherwise nice
BNetworkInterface API!
Conflicts:
src/kits/network/getifaddrs.cpp
This is a BReference that allows only const access to the referenced
object. This was not easily possible with the existing BReference for
two reasons:
* BReference<const Type> would not work, as BReference needs to change
the reference count of the referenced object. Adding mutable and casting
where appropriate wouldwork but,
* It is now also possible to assign a BReference to a BConstReference
(to the same type, of course). The reverse is not allowed, making it
more difficult to "const cast" the referenced object (it's still
possible to "get" the object pointer and cast that).
BConstReference can be used to provide shared read-only access to an
object, for example this can be used to cache non-copiable or
expansive to create objects.
* Added new truncation mode B_NO_TRUNCATION.
* The Truncation()/SetTruncation() methods itself are Dano-compatible,
however, there was no B_NO_TRUNCATION.
* BNetworkInterfaceAddress is moved to libnetwork. It is modified to not
use BNetworkAddress (which is in libbnetapi) and instead use sockaddr
and sockaddr_storage directly. All callers are adjusted to this.
* Some support code is shared between BNetworkInterface and
BNetworkInterfaceAddress, move it to libnetwork but in the BPrivate
namespace.
The atomic inlines were not implemented in a C89 safe way:
* Use of "static inline" not allowed, but static __inline__ is
* __inline__ is a GCC extension, but these are already in a __GNUC__
block (other compilers use a non-inline version)
* also fix a C++ style comment
* The default notifier didn't always take the setting into account.
* The mail server was not using the setting from the settings file and
instead waiting for a message that wasn't sent anywhere.
Fixes#10852.
* Use the preferred time source (GetTimeSource) for the node
* Fix node releasing when creating the connection fails
* Add virtual slots and padding
* Refactor _Connect method
* offsetof is not allowed on non-POD types so we need to use
offset_of_member (gcc2 accepts offsetof, and C++11 relaxed the
constraints on where it is allowed so it should work there too)
* we have offset_of_member as a workaround until we switch to C++11,
move it from khash (which is soon to be removed) to list.h which is the
other place where it is used (for this one single call in our whole
codebase)
Also fix a typo in vfs.cpp.
* Changed the way the attributes are written to make sure that everything
that can be written once is in fact written just once.
* The rename code in BMailProtocol::_ProcessFetchedHeader() was broken,
and caused the hang of the last commit.
* BMailFilter::HeaderFetched() now only alters the entry_ref, and returns
B_MOVE_MAIL_ACTION to move a mail.
* Instead of potentially moving the file around several times, the
BMailProtocol now takes care of carrying out the filter action just once,
including trying to make the file name unique.
* This also allows the IMAP add-on to know the final location of the mail,
and thus downloading a message actually works.
* However, with my test inbox, it currently hangs, and a current Debugger does
not work on my older system -- I guess I need to update.
* Replaced the duplicated space mechanism within the "HaikuMailFormatFilter"
that is substantially faster, and handles all whitespace, not just spaces.
It will also replace tabs with spaces.
* Instead of abusing BArchive::Archive() we now use a BMailSettingsView as
a base view for all filter/protocol settings that works with
BMailAddOnSettings.
* Cleanups in E-mail which is now completely layout friendly. But also still
crashes when changing the views.
* The path will now be relativized before storing it.
* On load, the add-on will be tried to load from the user, then common
and finally system add-on directory.
* Not everything compiles; all protocols, and inbound filters do, though.
* Renamed a few classes to give a better idea what they are for; prefixed
public classes with the 'B' prefix.
* Moved ProtocolConfigView's classes into the BPrivate namespace.
* Moved BMailFilter into its own file.
* Added BMailFilter::DescriptiveName(). This is now used by the RuleFilter
in order to give a description of what it's doing (ie. no more dozens of
"Rule filter" entries in the preferences).
* Removed no longer used MailAddon.h.
* Renamed Addon to AddOn where found, since that is more consistent with the
rest of the API.
* Merged the former MailProtocol with the former MailProtocolThread; the
differentiation between those two was pretty messy.
* All configuration views touched so far are now using the layout kit.
* The RuleFilter is currently broken functionality wise; I have not yet decided
how to solve the stuff it uses (TriggerFileMove() does not exist anymore,
for example).
* BMailAddOnSettings (formerly known as AddonSettings) now directly subclass
BMessage; there are no Settings() and EditSettings() method anymore. The
class uses a copy of itself to determine whether or not it has been changed.
* Lots of cleanup.
* Renamed to BMailNotifier, as it's part of the public API.
* Renamed Notifier.{cpp|h} to DefaultNotifier.{cpp|h} as that's the class it
implements.
* Made the mail counts uint32, and the byte counts uint64.
* Renamed imap_config.cpp to ConfigView.cpp, IMAPFolderConfig.(h|cpp)
to FolderConfigWindow.(h|cpp).
* Got the latter to build.
* Added Settings class to simplify and unify the BMessage based
settings access.
* Removed the InboundProtocol[Thread] implementation from the build for now.
* This was never implemented and no one noticed until now.
* A default value for a pointer doesn't make that much sense anyway, so
using the FindPointer method is fine.
int64_t is signed. Although it does not make a difference by itself, because
INT64_MAX is still a valid number for uint64_t (UL), the later INT64_MIN
declaration depends on INT64_MAX, and therefore got implicitly casted to
unsigned type.
This fixes the following program on a x86_64 system:
#include <stdint.h>
int main() {
int64_t test = 5;
if (test < INT64_MIN)
return 1;
return 0;
}
This is a regression since commit 1d13a609 ("stdint.h: define [U]INT64[MAX|MIN]
with [U]L on x86_64").
Signed-off-by: Jerome Duval <jerome.duval@gmail.com>
Created docs for NumberFormat, DateFormat, DateTimeFormat, and TimeFormat
and moved the docs from BLocale to the respective new file. Also
DurationFormat was updated as well.
doxygen once again compiles the docs without warnings.
There doesn't seem to be anything ini the implementation that would
cause a problem, as long as you don't try to change this while the
window is already open.
gcc2 was relying on the c99 functions being there, but they are not in
the std namespace.
* Disable the C99 functions and macros in C++ mode
* Redefine them as inline functions in cmath in the std namespace.
Fixes#7396.
* There is no need to delay this to AllAttached
* Apps may want to override the SetDivider, and doing it as late as
AllAttached can be annoying.
Fixes#10734.
I already made this patch in Heidi's clone of BToolbar. Adding it here
allows me to drop Heidi's version altogether.
I also relicensed the header file at the permission of Stephan. The .cpp
file still lists him as author and copyright holder.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
* Make it possible to extract more useful data from the certificate
* Also get the OpenSSL error message when a certificate can't be
validated. Send it to the verification failure callback so it can be
shown to the user.
CreateThreadEvent::DoDPC() missed a reference release to balance the
acquired reference before queuing the DPC, resulting in the
CreateThreadEvent objects being leaked.
This also removes the destructor that tried to cancel the DPC. Since
the class is reference counted and only destroyed when the DPC has
run and released the last reference, this didn't make much sense.
The signal to the team/thread is only actually sent in a deferred
procedure. To ensure that the team/thread stays valid between the DPC
being queued and it actually running, we need to acquire a reference.
Fixes#11390, where the DPC was run after the team was already
destroyed.
This isn't really a bus_manager yet, but just minimal support so
we can get rid of hardcoded ARM SoC support from the core kernel
code.
Needs lots of work, like proper handling of #address-cells and
the like. Also, generic attribute handling, device_manager
integration, and I could go on for hours ;)
* Partly reverting hrev47655, as the moved declarations are expected
by many ports to be accessable via string.h.
Following standards is a good thing in general, but not if it causes
more problems than it helps ...
* VMArea::AddWaiterIfWired(): Replace the ignoreRange argument by a
flags argument and introduce (currently only) flag
IGNORE_WRITE_WIRED_RANGES. If specified, ranges wired for writing
are ignored. Ignoring just a single specified range doesn't cut it
in vm_soft_fault(), and there aren't any other users of that feature.
* vm_soft_fault(): When having to unmap a page of a lower cache, this
page cannot be wired for writing. So we can safely ignore all
writed-wired ranges, instead of just our own. We even have to do that
in case there's another thread that concurrently tries to write-wire
the same page, since otherwise we'd deadlock waiting for each other.
The thread that is being [un]scheduled already has its time_lock locked
in {stop|continue}_cpu_timers(). When updating the TeamTimeUserTimer,
the team is asked for its cpu time. Team::CPUTime() then iterates the
threads of the team and locks the time_lock of the thread again.
This workaround passes a possibly locked thread through the relevant
functions so Team::CPUTime() can decide whether or not a thread it
iterates needs to be locked or not.
This works around #11032 and its duplicates #11314 and #11344.
when uninitializing a partition or a disk (removing the partition
table), check that all partitions from that table are unmounted, as they
are about to become invalid.
Fixes#8827.
The language and formatting conventions can now only be set when
creating the objects. This removed the needs for locking them when
formatting to avoid some other thread changing the format while it's
being used.
Adjust tests and DeskBar TimeView to the API changes.
Although done with the best intentions, the usage of #warning in the
ARM build makes it hard to see what's going on, or see any "real"
warnings.
Remove at least this particularly often triggered one, so we can
have a relatively "quiet" build again...
* Added VFS helper function check_access_permissions() that combines
several partially correct versions to the one true version (tm).
* All but BFS (since recently) missed the S_IXOTH for root on directories,
and all but packagefs missed proper group handling.
The BOOT_GDT_SEGMENT_COUNT was based on USER_DATA_SEGMENT on both
x86 and x86_64. However, on x86_64 the order of the segments is
different, leading to a too small gBootGDT array. Move the define to
the arch specific headers so they can be setup correctly in either case.
Also add a STATIC_ASSERT() to check that the descriptors fit into the
array.
Pointed out by CID 1210898.
There were 3 setting files, each an archived BMessage. Now there is only
one with all the data inside.
* Rework the SettingsPane class to save and load settings from a
message, rather than having each panel pick a file path on its own
* Move saving the app filters to the preference app, rather than the
server (so it's done at the same place as other settings)
* Rework loading prefs in the server so the settings message is read
from the file once and all settings are loaded from it.
This turns out to be more changes than I anticipated.
Fixes#9424.
* Since DNS are normally restricted to ASCII, the use of UTF-8 in domain
names is implemented using a "punycode" encoding.
* The request to the DNS server must be sent with the ASCII
representation of the domain name, however the Unicode one should be
used for user-visible parts.
* ICU provides an implementation of the conversion, which we use here.
* Conversion is currently done in-place and modifies the BUrl object
(this is similar to UrlEncode/UrlDecode).
* Adjust existing IDN test to make use of these methods. It's passing
now.
* We archive views using "managed" archives, and the children are not
attached in the BView(BMessage*) constructor, but later. So it's not
possible to find the target and scrollbars in the constructor of
BScrollView.
* Make BScrollView override AllUnarchived and find the target and
scrollbars again there. The code is slightly different as there is no
guarantee that the first child will be the target in that case. The
existing code in the constructor is preserved for non-managed archives.
* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)
This can be used to format complex messages properly. It moves the
complexity of handling plural forms, gender, and anything else needed
into the localizable string, rather than hardcoding it in the code.
This moves the difficulty of handling these things properly to people
doing translations, rather than relying on developers to do it.
Fixes#10755, but our localization must now be updated to make use of
the feature.
* ... and adjust all callers
* Remove NumberFormatImpl: we rely on ICU to provide this and it can be
fully wrapped into the C++ file. The class was a stub anyway.
* "Monetary" format is included in NumberFormat for now. There may be a
more generic solution to handle monetary and BTimeUnitFormat (and other
arbitrary units)
* Harmonize API for all B*Format to take an output BString by reference
as the first parameter,
* Move the FormatTime methods from BLocale to BTimeFormat
* Adjust all callers for BTimeFormat, BTimeUnitFormat and
BDurationFormat.
* Move relevant parts up into BFormat so other format classes can use
those
* Adjust BDurationFormat and BTimeUnitFormat for the changes
* Remove the "default" date format, it is better to keep only a default
locale and let applications create B*Formats from it as needed.
* Creating a B*Format without arguments to the constructor now
configures it for the default locale, which allows for easy use in
standard cases (formatting something with the current language and
format)
* Creating a B*Format is potentially an expansive operation, it is
advised to keep the instance around and reuse it whenever possible.
However it must be "refreshed" when the locale changes, for apps which
supports that, since it keeps a copy of the language and formatting
convention, rather than a pointer to the locale as it did before.
* MarkAsInvalid is used to enable or disable the mark
* The B_INVALID BControlLook flag is used
* invalid BTextControls are drawn with a red border.
* You ar encouraged to let the user know more precisely what's wrong, by
showing an helpful error message next to the control or in a tooltip.
* BDate setters don't perform any validation, use with caution.
* BCalendarView setters do perform validation checks, and will adjust
the day so it fits the requested month or year.
* Add tests for the BCalendarView setters.
* Add setters for the language and formatting conventions
* Add shortcut getter and setter for the date format
* Use those in the locale roster to make the BDateFormat actually use
the system preferred language and format.
* Applications can also use this to extract specific information from
the system format (eg. set date format to "LLLL" to extract month
names), or define specific formats more easily (eg. for parsing and
generating e-mail headers or HTTP cookies).
* Use a reference rather than a pointer for the output string, removing
the need for NULL checks (which were missing, anyway)
* Adjust callers to that change
* Add new Format variant taking a BDate argument
* There is a little code duplication. This will be moved to BFormat once
the time and datetime formatting is also moved out of BLocale
* The way to create a BDateFormat from a BLocale is still open for
discussion. I'm undecided between making BDateFormat a member of
BLocale, or adding a BDateFormat(const BLocale&) constructor.
* Adjust all users of the API.
A BGeolocation object can query an online service to get geolocation
and geotagging data:
* LocateSelf() tries to locate the machine it is running on, by using an
online database of wifi access points
* Locate() (not yet implemented) searches a BString and converts it to
lat/lon coordinates (reverse geotagging)
* Name() (not yet implemented) finds a suitable name for the given
coordinates (address, building name, or anything fitting).
The default service used is openbmap.org, which is freely available but
not very accurate. A request has been sent to Mozilla to use MLS
(Mozilla Location Services), which is a bit more accurate but needs an
API key. MLS is used for geolocation on FirefoxOS, for mobile phones
which don't have a GPS, and the data can be contributed by Firefox for
Android or the dedicated MozStumbler app.
Alternatively, Google Maps also provide the service, but wants
people to pay for it. Google Maps data is more accurate as all Android
devices contribute data to it.
All 3 services use the same JSON-based API: we send a list of reachable
Wifi APs (mac address and signal strength), and we get lattitude and
longitude information, and possibly extra data which will currently be
unused.
This can be used to implement HTML5 geolocation with reasonably accurate
results, but it can also be used in other places. For example
FirstBootPrompt could try to guess a list of most likely languages and
keyboard layouts from it (if wifi is working at install time, that is).
* Move default context management to BUrlRequest since some code
(including the testsuite) bypass the BUrlProtocolRoster.
* Introduce proxy host and port in BUrlContext
* Have BHttpRequest use the proxy when making requests
Comments to #9672 agree that there's really no need to
expose the dev_t handle, thus simplifying the API.
The dev_t handle, if required, can be retrieved via
BPartition::GetVolume() instead.
This patch adds user_access() which can be used to gracefully handle
page faults that may happen when accessing user memory. It is used
by arch_cpu_user{memcpy, memset, strlcpy}() to allow using optimized
functions from the standard library.
Currently only x64 uses this, but nothing really is arch specific here.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
The kernel is allowed to use fpu anywhere so we must make sure that
user state is not clobbered by saving fpu state at interrupt entry.
There is no need to do that in case of system calls since all fpu
data registers are caller saved.
We do not need, though, to save the whole fpu state at task swich
(again, thanks to calling convention). Only status and control
registers are preserved. This patch actually adds xmm0-15 register
to clobber list of task swich code, but the only reason of that is
to make sure that nothing bad happens inside the function that
executes that task swich. Inspection of the generated code shows
that no xmm registers are actually saved.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Enable SSE as a part of the "preparation of the environment to run any
C or C++ code" in the entry points of stage2 bootloader.
SSE2 is going to be used by memset() and memcpy().
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
There is absolutely no reason for these functions to be in commpage,
they don't do anything that involves the kernel in any way.
Additionaly, this patch rewrites memset and memcpy to C++, current
implementation is quite simple (though it may perform surprisingly
well when dealing with large buffers on cpus with ermsb). Better
versions are coming soon.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
The possibility to specify custom memcpy and memset implementations
in cpu modules is currently unused and there is generally no point
in such feature.
There are only 2 x86 vendors that really matter and there isn't
very big difference in performance of the generic optmized versions
of these funcions across different models. Even if we wanted different
versions of memset and memcpy depending on the processor model or
features much better solution would be to use STT_GNU_IFUNC and save
one indirect call.
Long story short, we don't really benefit in any way from
get_optimized_functions and the feature it implements and it only adds
unnecessary complexity to the code.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>