summaryrefslogtreecommitdiff
path: root/src/import/import-compress.c
Commit message (Collapse)AuthorAgeFilesLines
* basic: rename util.h to logarithm.hZbigniew Jędrzejewski-Szmek2022-11-081-1/+0
| | | | | util.h is now about logarithms only, so we can rename it. Many files included util.h for no apparent reason… Those includes are dropped.
* Drop the text argument from assert_not_reached()Zbigniew Jędrzejewski-Szmek2021-08-031-1/+1
| | | | | | | | | | | | | | | | | In general we almost never hit those asserts in production code, so users see them very rarely, if ever. But either way, we just need something that users can pass to the developers. We have quite a few of those asserts, and some have fairly nice messages, but many are like "WTF?" or "???" or "unexpected something". The error that is printed includes the file location, and function name. In almost all functions there's at most one assert, so the function name alone is enough to identify the failure for a developer. So we don't get much extra from the message, and we might just as well drop them. Dropping them makes our code a tiny bit smaller, and most importantly, improves development experience by making it easy to insert such an assert in the code without thinking how to phrase the argument.
* import: make sure we can import empty filesLennart Poettering2021-01-291-0/+7
|
* import: don't invoke compress callbacks with empty dataLennart Poettering2021-01-291-9/+15
| | | | | It's pointless if no data was generated. (This happens if an empty file is compressed)
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* Make bzip2 an optional dependency for systemd-importdThiago Macieira2018-09-251-0/+14
| | | | | | Yes, there are still a lot of users of bzip2, but it's fallen out of favour after LZMA/xz, which can compress a lot more and often decompresses faster than bzip2 too.
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-3/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* support LZMA concatenated filesMatthew Thode2018-01-111-1/+1
| | | | | | | | The xz format supports concatenated files, images are sometimes created and shipped with it to increase compression. https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1742744 is the source bug for this issue.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* tree-wide: use `!IN_SET(..)` for `a != b && a != c && …`Andreas Rammhold2017-10-021-6/+6
| | | | | | The included cocci was used to generate the changes. Thanks to @flo-wer for pointing this case out.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* util-lib: move string table stuff into its own string-table.[ch]Lennart Poettering2015-10-271-1/+2
|
* tree-wide: there is no ENOTSUP on linuxDavid Herrmann2015-03-131-3/+3
| | | | Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
* importd: add API for exporting container/VM imagesLennart Poettering2015-03-091-4/+280
| | | | Also, expose it in machinectl.
* import: split out compression logic, so that we can share it with between ↵Lennart Poettering2015-03-051-0/+194
import and pull calls