On 19 July 2014 18:28, Timofey Titovets <nefelim4ag@xxxxxxxxx> wrote: Hi Timofey, I'm not the util-linux maintainer, but since I've done few contributions perhaps I can give couple hints how to proceed. > I want hear your opinions. > Several days ago, i writed zramctl util (on C++) for have useful app for > setup zrams.. Sounds potentially useful. > Code hosted her: https://github.com/Nefelim4ag/zramctl > > Examples: > zramctl find # return name of first free device (zram0) > zramctl find 1024M lz4 4 # (i not implement -? options now) > # 4 - threads > # setup and return name of device (zram1) > zramctl reset zram0 zram1 ... > > I want to port it on C and try include it in util-linux, like losetup. > It has a sense? What do you think? There are all sorts of small things each command in this package is expected to do. Good way to get introduced with them is to take the sample code below, and modify it to be the new command. https://github.com/karelzak/util-linux/blob/master/Documentation/boilerplate.c But before getting too excited about writing new tool it might be worth while to investigate related discussion. https://www.mail-archive.com/systemd-devel@xxxxxxxxxxxxxxxxxxxxx/msg16342.html By glance it seems a good utility would be able to integrate with udev and systemd, it should have add, remove, and possibly modify method. I would prefer the command to list what is current status of zram devices when nothing else is instructed. And of course manual page is needed. See util-linux/Documentation/howto-man-page.txt file to get manual done. Without any investigation I have no idea what should be done with systemd integration. The zramctl might need a systemd service file, and possibly some sort of configuration file to setup the devices at boot desired way. Or something totally different. I am sure there is someone who knows what should be done, and with a bit of luck the mail archive discussion I pointed out has an answer to this already. -- Sami Kerola http://www.iki.fi/kerolasa/ -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html