diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-01 14:11:51 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-01 14:11:51 +0200 |
commit | 79c333899d318bf9b1eec3837833c7f0229d1906 (patch) | |
tree | d31f6513d6284bcc8dc9a7ec8523ec2fdfa1944c /lib/sqfshelper | |
parent | 3b43f166629efbb34e1b0ceeaa2f06452d0fed2f (diff) |
Move some application specific stuff out of libutil
This commit does the following:
- canonicalize_name is moved to libfstree
- source_date_epoch is only used inside libfstree, so it's also moved
over and can later be completely internalized
- print_version is moved over to sqfshelper. Mainly so it doesn't end
up in libsquashfs.so for no sane reason.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfshelper')
-rw-r--r-- | lib/sqfshelper/print_version.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/sqfshelper/print_version.c b/lib/sqfshelper/print_version.c new file mode 100644 index 0000000..b23e2bd --- /dev/null +++ b/lib/sqfshelper/print_version.c @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * print_version.c + * + * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> + */ +#include "config.h" + +#include "util.h" + +#include <stdio.h> + +#define LICENSE_SHORT "GPLv3+" +#define LICENSE_LONG "GNU GPL version 3 or later" +#define LICENSE_URL "https://gnu.org/licenses/gpl.html" + +extern char *__progname; + +static const char *version_string = +"%s (%s) %s\n" +"Copyright (c) 2019 David Oberhollenzer et al\n" +"License " LICENSE_SHORT ": " LICENSE_LONG " <" LICENSE_URL ">.\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n"; + +void print_version(void) +{ + printf(version_string, __progname, PACKAGE_NAME, PACKAGE_VERSION); +} |