Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xyproto/tinyionice

Drop-in replacement for ionice in 300 lines of C
https://github.com/xyproto/tinyionice

c cli drop-in-replacement ionice linux small tiny tool utility

Last synced: 2 months ago
JSON representation

Drop-in replacement for ionice in 300 lines of C

Awesome Lists containing this project

README

        

tinyionice logo

# Tiny I/O Nice

This is a fork of `ionice` from [util-linux](https://github.com/karelzak/util-linux)

It's a drop-in replacement for `ionice` in just 300 lines of C and under a single open source license.

[![Packaging status](https://repology.org/badge/vertical-allrepos/tinyionice.svg)](https://repology.org/project/tinyionice/versions)

* Support for obsolete systems is removed.
* Translated output messages are removed.
* Other than that it's a fully featured drop-in replacement for `ionice`.
* The resulting executable is only 11k when built with GCC 11 on Linux (and then stripped with `sstrip`).
* `util-linux` uses several open source licenses across many different files. This fork is only based on files licensed under GPL2. `tinyionice` is only GPL2 licensed.

## Build

### With gcc

gcc -O2 -fPIC -fstack-protector-strong -D_GNU_SOURCE -s -z norelro main.c -o tinyionice

### With `make`

make

### With [`cxx`](https://github.com/xyproto/cxx)

cxx tiny

## Install

As `root`, with `sudo` or `doas`:

### Manually

sudo install -Dm755 tinyionice /usr/bin/tinyionice

### With `make`

make install

## License

The original source code of `ionice` is dual-licenced under either GPL2:

```
Copyright (C) 2004 Jens Axboe
Released under the terms of the GNU General Public License version 2
```

Or under `No copyright is claimed. This code is in the public domain; do with it what you wish`:

```
Copyright (C) 2010 Karel Zak
Copyright (C) 2010 Davidlohr Bueso
No copyright is claimed. This code is in the public domain; do with it what you wish.
```

I wish to relicense all code under these terms as GPL2.

The changes made in 2021 and beyond are:

```
Copyright (C) 2021-2022 Alexander F. Rødseth
Released under the terms of the GNU General Public License version 2
```

The entire code of `tinyionice` is now released under GPL2.

The full license text is in the `COPYING` file.

## General info

* Version: 1.0.4
* License: GPL2