Commit Graph

587 Commits

Author SHA1 Message Date
Norman Feske
5d40c0c1ce Rename 'Nitpicker' namespace to 'Gui'
Issue 
2020-06-22 09:39:40 +02:00
Norman Feske
98f39c698f Rename "Nitpicker" service name to "Gui"
Issue 
2020-06-22 09:39:39 +02:00
Norman Feske
c6eda9bd80 Rename include/nitpicker_session to gui_session
This patch also renames the depot api archive accordingly.

Issue 
2020-06-22 09:39:39 +02:00
Stefan Kalkowski
1a80f166c5 os: introduce common platform driver for ARM
Ref 
2020-05-27 11:56:46 +02:00
Norman Feske
ab8ef5750d doc: tweaks for updated Genode Foundations book 2020-05-27 11:56:46 +02:00
Norman Feske
b078224753 Replace Genode::strncpy by Genode::copy_cstring
- Since Genode::strncpy is not 100% compatible with the POSIX
  strncpy function, better use a distinct name.

- Remove bogus return value from the function, easing the potential
  enforcement of mandatory return-value checks later.

Fixes 
2020-05-27 11:56:45 +02:00
Norman Feske
be65c4acd2 Avoid use of deprecated Xml_node methods
Issue 
2020-05-18 10:16:14 +02:00
Norman Feske
bbc21cf063 util/bit_array.h: remove use of memset and memcpy
This makes the code less dependent on functions considered unsafe.

Fixes 
2020-05-05 13:30:15 +02:00
Stefan Kalkowski
0e49336b96 Retire Exynos 5 support (fix ) 2020-04-17 12:53:57 +02:00
Tomasz Gajewski
1d9a2dce94 trace: extend policy with log_output
Issue 
2020-04-17 12:47:19 +02:00
Roman Iten
12ea494477 vfs/File_content: fix end condition in for_each_line
Fixes 
2020-04-17 12:45:10 +02:00
Alexander Boettcher
22d71d5a8b os: use Mutex/Blockade
Issue 
2020-04-17 12:40:12 +02:00
Norman Feske
85a1f91f59 Sanitize Framebuffer::Mode member access
Fixes 
2020-04-17 12:40:12 +02:00
Norman Feske
c2cf0ae8c6 os/vfs.h: fix possible nullptr dereference
Fixes 
2020-03-26 11:38:56 +01:00
Norman Feske
2912096f6e vfs: distinguish NO_PERM from NO_ENTRY in unlink
This patch changes the 'Single_file_system' to return NO_PERM only if
the to-be-unlinked file corresponds to the single file. This way, a
<rom> co-mounted with a <ram> file-system does not stand in the way of
unlinking files from the <ram>. The concrete symptom occurred the
following scenario:

  <vfs>
    <dir name="home">
      <ram/>
      <rom name="..."/>
    </dir>
  </vfs>

The following sequence of commands wrongly resulted in "Operation not
permitted":

 $ mkdir -p /home/a/b/c
 $ rm -f /home/a/b/c/d

In this case, rm should not fail (unlink should return ENOENT)

Fixes 
2020-03-26 11:38:55 +01:00
Norman Feske
7118ad494c os/vfs.h: add Directory::Entry::rwx accessor 2020-02-27 14:46:58 +01:00
Josef Söntgen
c53be5a3fb os: omit size check on payloadless Block packets
The check is already performed in 'packet_valid' where the conditions
for payloadless packets are already considered.

Fixes .
2020-02-27 14:46:57 +01:00
Josef Söntgen
6addd6cf1e os: fix Node_rwx::rwx
Fixes .
2020-02-27 14:46:57 +01:00
Norman Feske
9b0fbf000e sandbox: support for local state-report handling
Fixes 
2020-02-20 12:11:22 +01:00
Norman Feske
46c5a90ba1 nitpicker_gfx: Text_painter::Font::index_at_xpos
This method is useful for finding the character under a mouse position.
2020-02-20 12:08:16 +01:00
Norman Feske
52e582132f os/vfs.h: handle corner case in join function
When specifying "/" or "" as rel_path to the 'Directory' constructor,
the constructed directory should refer to the same directory. The
implementation of the join utility did not consider this corner case. It
occurred during the attempt to use fs_query with "/" given as path.

This patch also adds a Directory::Entry::dir accessor that returns true
if the entry is a directory.

Fixes 
2020-02-20 12:08:16 +01:00
Stefan Kalkowski
22498e0b09 os: add backtrace utility for arm_64
Fix 
2020-02-04 16:10:22 +01:00
Norman Feske
c67a0d3dd8 os/dynamic_rom_session.h: support Xml_generator
This patch adds a special variant of a 'Content_producer' called
'Xml_producer', which allows the direct use of an 'Xml_generator'
for generating the ROM-module content.
2020-02-04 15:51:09 +01:00
Norman Feske
78c0e5f6b6 New sandbox library extracted from init component
This patch extracts the child-management functionality from the init
component into a new library called "sandbox". The library API is
located at 'os/include/os/sandbox.h'.

The sandbox API allows for the interaction of the component with the
sandboxed children by providing locally implemented services. This
mechanism is illustrated by the new test at os/src/test/sandbox.

Issue 
2020-02-04 15:51:09 +01:00
Norman Feske
f82e7df0ba os/buffered_xml.h: support for generating XML
This patch extends the 'Buffered_xml' utility with a new constructor
that fills the buffer with the output of an 'Xml_generator'. It thereby
presents an easy way to generate XML to be consumed locally.

The patch also add a deprecation mark to the original 'xml' accessor
because copying 'Xml_node' objects (here as return value) is dangerous.
The new 'with_xml_node' method should instead be used to access the XML
content stored in the buffer.

Fixes 
2020-02-04 15:51:09 +01:00
Christian Helmuth
9a35743df6 Mark packet-stream descriptor head/tail as volatile
`volatile` effectively prevents instruction reordering by the compiler
and fixes an issue with -O3 compiled components.

Note, this commit does not address further arguments regarding memory
barriers and volatile voiced in issue .

Issue 
2019-12-20 14:34:22 +01:00
Norman Feske
f85ec313de os/vfs.h: handle zero-sized files
The 'File_content' class failed to consider zero-sized files.

Fixes 
2019-12-19 16:59:03 +01:00
Norman Feske
3ac970ac1d Streamline Timestamp::INVALID values
This is a follow-up patch for issue  that solves two
inconsistencies.

- The Vfs::Timestamp::INVALID matches File_system::Timestamp::INVALID
- The Noux libc plugin tests for Timestamp::INVALID instead of a
  positive value.

The patch fixes the mtime info as shown in directory listings in
Sculpt's inspect window.
2019-11-21 14:26:27 +01:00
Emery Hemingway
c51b4b5742 New VFS plugin for emulating POSIX pipes
Add a new plugin for creating pipes between pairs of VFS handles. It is
intended to replace the libc_pipe plugin, one of the last remaining libc
plugins.

In contrast to the libc_pipe plugin, this plugin defers cross-handle
notification until I/O signal handling rather than block and unblock
readers using a semaphore. This is a performance regression in the case
of multiple threads blocking on a pipe, but shall be an intermediate
mechanism pending renovations within the libc VFS and threading layers.
As a side effect, threads blocked on a pipe might not be resumed until
the main thread suspends and dispatches I/O signals.

The "test-libc_pipe" test has been adjusted to use the VFS pipe plugin
and tests both local pipes and pipes hosted remotely in the VFS server.

Merge adaptations (such as EOF handling, adjustment to VFS/libc
interface changes) by Norman Feske.

Fix 
2019-11-19 14:54:13 +01:00
Norman Feske
d7b1a89087 file-system session: use same dirent size as VFS
This change allows for the conversion of directory entries in place
(i.e., in the VFS server) and anticipates the potential future merge of
both types into one.

Issue 
2019-11-19 14:54:13 +01:00
Martin Stein
b541a0d448 smbios.h: move to os/include/smbios
Fixes 
2019-11-19 14:54:12 +01:00
Josef Söntgen
dbecceec09 expanding_reporter: configure initial buffer size
Fixes .
2019-11-19 14:44:02 +01:00
Norman Feske
7549189f88 vfs: watch support for Readonly_value_file_system
This patch adds support for watch notifications for the
'Readonly_value_file_system', which is often used by VFS plugins to
implement pseudo files. It thereby enables VFS clients to respond to
VFS-plugin events (think of terminal resize) dynamically.

Fixes 
2019-11-19 14:42:23 +01:00
Martin Stein
60d37f690c packet_stream_*: fix missing dissolve on exception
When the construction of a member of Packet_stream_*::Rpc_object after
the _cap member threw an exception, the object was not dissolved from
the entrypoint although the Rpc_object vanished at this point. This was
because the call to 'manage()' happened in the initializer list (for the
_cap member instantiation). The destruction of the _cap member then did
not dissolve the object.

This first fix moves the call to 'manage()' into the constructor body
after the instantiation of all other members. A more sophisticated fix
would use some kind of 'Managed_object' life-time guard that manages an
object on construction and dissolves on destruction.

Ref 
2019-11-19 14:42:22 +01:00
Norman Feske
c85bc38802 Move include/gems/vfs.h to include/os/vfs.h
Fixes 
2019-11-19 14:23:56 +01:00
Norman Feske
5bb366513b Remove os/src/app/cli_monitor
Nowadays, we use standard command-line tools like vim to edit init
configurations dynamically, which alleviates the need for a custom CLI.
The CLI-monitor component was too limited for use cases like Sculpt
anyway.

The patch also removes the ancient (and untested for long time)
terminal_mux.run script, which used to be the only remaining user of the
CLI monitor.

Issue 
2019-11-19 14:23:56 +01:00
Norman Feske
5ab1505d43 file system: enhanced file status info
This patch extends the 'File_system::Status',
'File_system::Directory_entry', and the related 'Vfs' types with
the following additional information:

- Distinction between continuous and transactional files (Node_type)
  (issue )
- Readable, writeable, and executable attributes (Node_rwx),
  replacing the former 'mode' bits
  (issue )

The types 'Node_rwx', 'Node_type' are defined twice,
once for the VFS (vfs/types.h) and once for the 'File_system'
session (file_system_session/file_system_session.h).
Similarly, there is a direct correspondance between
'Vfs::Directory_service::Dirent' and 'File_system::Directory_entry'.

This duplication of types follows the existing pattern of keeping the
VFS and file-system session independent from each other.
2019-11-19 14:23:56 +01:00
Christian Helmuth
cc611834c9 input: repeat events require valid codepoints
Issue 
2019-11-19 14:23:54 +01:00
Josef Söntgen
9a82bbb54d vfs: add modification time member to directory_service
Issue .
2019-11-19 14:17:30 +01:00
Josef Söntgen
2ec3aaf639 file_system_session: add modification time
* add modification_time member
* add WRITE_TIMESTAMP packet
2019-11-19 14:17:30 +01:00
Christian Helmuth
4491c070be input: fix Codepoint::INVALID in Press event
The Press event is actually a Press_char event with a default codepoint.
The default codepoint is now

  Codepoint { Codepoint::INVALID } /* value 0xfffe */

in contrast to

  Codepoint { Input::Event::INVALID } /* value 0 */

Issue 
2019-08-28 14:22:32 +02:00
Christian Helmuth
a97b8043b5 utf8: non-character U+fffe as invalid codepoint
Unicode non-characters [1] are guaranteed to never be used for a
character. The formerly used U+fffd however is a valid character - the
replacement character [2] correctly displayed by Qt5 as <?>.

[1] https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Non-characters
[2] https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character

Issue 
2019-08-28 14:22:32 +02:00
Norman Feske
cc437a5eca Spelling fix in os/single_session_service.h 2019-08-21 13:35:52 +02:00
Martin Stein
cb6377355e sntp_client: report received transmit timestamp
For now in libports because it relies on contrib sources from musl doing
the time data conversion.

Ref 
Ref 
2019-08-21 12:37:02 +02:00
Josef Söntgen
ea2b330158 rtc: extended session with set-signal
A client may register a signal handler to be notified whenever the
RTC value was changed, i.e., a mis-configured clock was synchronized,
by calling 'set_sigh()'.

Issue 
2019-08-21 12:37:01 +02:00
Josef Söntgen
86cacd23bb rtc: add documentation comments
Issue 
2019-08-21 12:37:01 +02:00
Martin Stein
1e379cb3a9 drivers/acpi: provide plain SMBIOS table as report
Ref 
2019-08-13 12:02:03 +02:00
Josef Söntgen
91ce57848c rtc_session: make timestamp printable
Issue .
2019-08-13 12:02:03 +02:00
Norman Feske
fc7b983a40 terminal: clipboard support
Fixes 
2019-07-09 08:58:38 +02:00
Christian Prochaska
f99a1d78bb os: fix 'CUU' terminal command
Decrement the y position to move the cursor up.

Fixes 
2019-05-29 10:20:52 +02:00