aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/securecoreutils.c30
2 files changed, 32 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 41d86e2..733b559 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@ Copyright (C) 2015, 2017 David M. Syzdek <david@syzdek.net>.
8 - core: adding ability to change widget alias prefix at compile time (syzdek) 8 - core: adding ability to change widget alias prefix at compile time (syzdek)
9 - syzdek: adding easter egg widget (syzdek) 9 - syzdek: adding easter egg widget (syzdek)
10 - tail: allowing timeout to be modified via env variable TAILTIMEOUT (syzdek) 10 - tail: allowing timeout to be modified via env variable TAILTIMEOUT (syzdek)
11 - usage: adding usage widget (syzdek)
12 - version: adding version widget (syzdek)
11 - zcat: fixing segfault with LXMA (.xz) and large files (syzdek) 13 - zcat: fixing segfault with LXMA (.xz) and large files (syzdek)
12 14
130.1 2017-07-07 150.1 2017-07-07
diff --git a/src/securecoreutils.c b/src/securecoreutils.c
index 880d410..75cbdd0 100644
--- a/src/securecoreutils.c
+++ b/src/securecoreutils.c
@@ -86,6 +86,8 @@ int main(int argc, char * argv[]);
86const char * scu_basename(const char * path); 86const char * scu_basename(const char * path);
87const scu_widget * scu_widget_lookup(const char * wname, int exact); 87const scu_widget * scu_widget_lookup(const char * wname, int exact);
88int scu_widget_syzdek(scu_config * cnf); 88int scu_widget_syzdek(scu_config * cnf);
89int scu_widget_version(scu_config * cnf);
90int scu_widget_usage(scu_config * cnf);
89 91
90 92
91///////////////// 93/////////////////
@@ -106,6 +108,12 @@ const scu_widget scu_widget_map[] =
106 scu_widget_cat, // widget function 108 scu_widget_cat, // widget function
107 }, 109 },
108 { 110 {
111 "help", // widget name
112 NULL, // widget description
113 (const char * const[]) { "usage", NULL }, // widget alias
114 scu_widget_usage, // widget function
115 },
116 {
109 "pathcheck", // widget name 117 "pathcheck", // widget name
110 "Validates path using internal checks.", // widget description 118 "Validates path using internal checks.", // widget description
111 (const char * const[]) { _PREFIX"path", NULL }, // widget alias 119 (const char * const[]) { _PREFIX"path", NULL }, // widget alias
@@ -138,6 +146,12 @@ const scu_widget scu_widget_map[] =
138 scu_widget_tail, // widget function 146 scu_widget_tail, // widget function
139 }, 147 },
140 { 148 {
149 "version", // widget name
150 NULL, // widget description
151 NULL, // widget alias
152 scu_widget_version, // widget function
153 },
154 {
141 "zcat", // widget name 155 "zcat", // widget name
142 "Uncompresses file and write to standard out.", // widget description 156 "Uncompresses file and write to standard out.", // widget description
143 (const char * const[]) { _PREFIX"zcat", 157 (const char * const[]) { _PREFIX"zcat",
@@ -592,6 +606,22 @@ int scu_widget_syzdek(scu_config * cnf)
592#endif 606#endif
593 607
594 608
609int scu_widget_usage(scu_config * cnf)
610{
611 assert(cnf != NULL);
612 scu_usage(cnf);
613 return(0);
614}
615
616
617int scu_widget_version(scu_config * cnf)
618{
619 assert(cnf != NULL);
620 scu_version();
621 return(0);
622}
623
624
595const char * scu_strerror(int err) 625const char * scu_strerror(int err)
596{ 626{
597 if (err < 0) 627 if (err < 0)