kernel syscalls - How does it work?
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
kernel syscalls - How does it work?
Lets say I have a 2.6.38 kernel that is compiled with xz support. Is there a way to use syscalls to the kernel (in a C program) to decompress an xz file without having to use the userland tools?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
That's the transparent decompression mechanism as used by squashfs, cramfs, cloop, zisofs and now also ext4. They all depend on the kernel being able to do on-the-fly decompression of streams. And they each depend on a different program to create those filesystesms/images. From a regular C program, you'd want to use glibc calls along with small stream decompressor code. The in-kernel stuff is only useful at the filesystem level.