- 10 Nov, 2020 6 commits
-
-
Christian Kellner authored
Re-implement bolt_file_write_all in terms of bolt_write_file_at, since open (...) <=> openat (AT_FDWCD, ...).
-
Christian Kellner authored
Basically the same test as test_io_file_write_all: write data, check it is all there, overwrite the file, check it got overwritten and truncated.
-
Christian Kellner authored
This is like the existing `bolt_file_write_all`, except it takes a file descriptor to a directory to be able to specify the parent directory. Will create a new file or overwrite an existing. Does not do atomic io or the rename-to-do-atomic-io rename dance.
-
Christian Kellner authored
Create a define of open flags that is typically used to create or overwrite new files; with a plain text spelling out of the flags. This is done so that they can be reused in other functions.
-
Christian Kellner authored
Analogous to bolt_read_int_at, but for unsigned integers; uses bolt_read_value_at and bolt_str_parse_as_unit internally.
-
Christian Kellner authored
Change a stray podman usage to docker, since podman is not even installed and the image is built with docker.
-
- 09 Nov, 2020 4 commits
-
-
Christian Kellner authored
The ORG argument needs to be set as well.
-
Christian Kellner authored
Specify the missing build arguments for the coverity container.
-
Christian Kellner authored
Only meant to be run from schedule pipelines, since there is a rate limit for coverity.
-
Christian Kellner authored
Add a new container to perform coverity analysis, i.e. it fetches the coverity distribution. Add a new coverity.sh script to actually perform the analysis and upload the results.
-
- 21 Oct, 2020 5 commits
-
-
Christian Kellner authored
Add a new test for `bolt_str_parse_as_uint` based on the existing tests for `parse_as_xxx`.
-
Christian Kellner authored
Add a new helper to parse a string as unsigned integer (uint). Internally uses the 64 bit based uint64 parse method and then checks the parsed value fits into an unsigned integer.
-
Christian Kellner authored
For both, parse_uint{32, 64}, check that `errno` is properly set.
-
Christian Kellner authored
The `bolt_str_parse_as_uint32` method uses the uint64 based method to parse the string and then afterwards checks for the parsed value overflows an uint32. In that case also set the errno value, to be consistent with the uint64 parse method.
-
Christian Kellner authored
The value we are checking is a signed 'int', so use the proper comparison function, i.e. `g_assert_cmpint`.
-
- 05 Oct, 2020 9 commits
-
-
Christian Kellner authored
If codespell is available, as it should be in the Fedora container, run in on the source.
-
Christian Kellner authored
Can then be used by docker-build.sh to spell check the source.
-
Christian Kellner authored
Fix all spelling mistakes uncovered by codespell.
-
Christian Kellner authored
This makes codepsell happy without using a German dict.
-
Christian Kellner authored
Fedora 30 is actually EOL already. Use the current stable (F32).
-
Christian Kellner authored
Check that if bolt_domain_can_delete returns FALSE, the store does indeed refuse to delete the domain.
-
Christian Kellner authored
Use the new bolt_domain_can_delete function to check if a domain can be safely deleted before doing so. In the case it is not safe to delete the domain, the bolt_store_del_domain method will now return FALSE and propagate the error from domain_can_delete.
-
Christian Kellner authored
Check that if a domain has journal entries, bolt_domain_can_delete indeed returns FALSE, and TRUE otherwise. This code modifies the original test to use the original domain object 'd1' to delete the domain instead of the object that was fetched from the store. This is so that there are not two objects referring to the domain.
-
Christian Kellner authored
Add a new method, bolt_domain_can_delete, which can be used to check if a domain can safely be deleted without the loss of data. Currently, the only case where this can happen if the boot acl journal for the domain has entries. The function returns FALSE and sets and GError accordingly in case it is not safe to delete the domain.
-
- 23 Sep, 2020 12 commits
-
-
Christian Kellner authored
Check that if we remove a domain, its journal gets removed as well.
-
Christian Kellner authored
Helper to check if a journal of a give type and name exists in the store. Does not check if the specified journal has entries, i.e. an empty journal does exist. :)
-
Christian Kellner authored
When the domain is remove from the store, which means that a previously set "store" member will be set to NULL, also remove the journal.
-
Christian Kellner authored
-
Christian Kellner authored
We need to have the fresh property set to false after put_diff is called.
-
Christian Kellner authored
If all goes well and we replaced the journal with a new one, its freshness needs to be set to FALSE, but was not. Fix that using the new setter.
-
Christian Kellner authored
Add a setter method that will also emit the property notification.
-
Christian Kellner authored
Better separate the cleanup of an existing associated store from referencing and setting up the new store and journal. This makes it easier to follow and prepares for a new helper function to remove the log (if empty).
-
Christian Kellner authored
Including opening and deleting the journal.
-
Christian Kellner authored
Add a new method to delete a journal of a given type and name.
-
Christian Kellner authored
Instead of doing it all directly in set_property, do it in a separate function. No change to the logic itself.
-
Christian Kellner authored
Not much to see here. I do make typos. A lot. And David is not here to check them. So I blame him, really.
-
- 21 Sep, 2020 1 commit
-
-
Christian Kellner authored
Instead of using a construct continuing the loop in the case that a device is not a thunderbolt device, just do the one desired action if it is one.
-
- 02 Sep, 2020 3 commits
-
-
Christian Kellner authored
Just be a bit more PEP-8 compliant.
-
Christian Kellner authored
On integrated TBT (like ICL/TGL) the UUID of the controller is not stable, i.e. it changes between reboots. We therefore must not be saving the domain.
-
Christian Kellner authored
The bolt daemon uses the uuid of the host controller, i.e. the thunderbolt switch, to uniquely identify the domain across reboots. The main reason for this was the boot acl, which can change in the absence of the domain: in older tbt hardware, the controller was powered in hardware when no device was attached. If a user then wanted to remove a device from the controller, that needed to be recorded and synced back to the boot acl when the controller later became available again. All this relies on the fact that the uuid of the controller is stable, i.e. does not change across reboots. This sadly, is not true for integrated TBT, like e.g. on ice lake (ICL) and tiger lake (TGL). In the manager, the stability of the domain's uuid is now detected via the PCI id of the native host interface. If it is in fact not stable, or if the PCI id is unknown, the domain will not be stored. As a result, removing devices from the boot acl while the controller is offline, will not properly be synced to the controller. Since modern controllers are actually not powered down, but use runtime PM, i.e. they go to D3 cold state, this should indeed not matter much. Additionally, modern systems use the IOMMU to secure device access and there the firmware can and will indeed authorize the device during boot. Therefore the boot acl becomes less important, and there seems indeed to be no boot acl entries slots on ICL even.
-