summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-02 16:30:33 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-03 21:45:46 +0200
commit2aa2f13131663afa0d13259365f824b05e9a2f02 (patch)
treeb5b8d7d1f46717d5b49278ec300f769e68641fd6 /lib/util
parent03916fcbb453684fa13135e2b46f5a82d13d78a7 (diff)
unsquashfs: add argument processing, file listing parameter
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/print_version.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/util/print_version.c b/lib/util/print_version.c
new file mode 100644
index 0000000..7d1b91a
--- /dev/null
+++ b/lib/util/print_version.c
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-3.0-or-later */
+#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\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"
+"\n"
+"Written by David Oberhollenzer.\n";
+
+void print_version(void)
+{
+ printf(version_string, __progname, PACKAGE_NAME, PACKAGE_VERSION);
+}