// Author: duangsuse
// Utility for changing file "Immutable" attribute and reading file "Append"
// "Immutable" attribute
// Language: C99 / C++ 11
// Created: Jul, 2018 License: GPLv2
// Usage: e2immutable (+/-/@) <file path>
// @: query file attr
// return 0: no attribute
// return 255: stat/cmdline fails
// return 254: fgetfattr fails
// return 1: +i
// return 2: +a
// return 3: +i +a
// +: add immutable attribute
// return 0: OK, changed
// return 1: OK, unchanged
// return 255: stat/cmdline fails
// return 254: fsetfattr fails
// -: remove immutable attribute
// return 0: OK, changed
// return 1: OK, unchanged
// return 255: stat/cmdline fails
// return 254: fsetfattr fails