runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit baa458d8556e3ba64a60e46ba40774790ca3ed65
parent ea14f43f632314180f07be87d37417631142848f
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Mon, 30 Sep 2024 03:11:50 +0200

move all $Id$ into #define VERSION

Diffstat:
Msrc/chpst.c | 4+++-
Msrc/runit-init.c | 4+++-
Msrc/runit.c | 5+++--
Msrc/svwaitup.c | 4+++-
Msrc/utmpset.c | 4+++-
5 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/chpst.c b/src/chpst.c @@ -24,6 +24,8 @@ #define FATAL "chpst: fatal: " #define WARNING "chpst: warning: " +#define VERSION "$Id$" + const char *progname; static stralloc sa; @@ -327,7 +329,7 @@ int main(int argc, const char **argv) { case '0': nostdin =1; break; case '1': nostdout =1; break; case '2': nostderr =1; break; - case 'V': strerr_warn1("$Id$", 0); + case 'V': strerr_warn1(VERSION, 0); case '?': usage(); } argv +=optind; diff --git a/src/runit-init.c b/src/runit-init.c @@ -12,6 +12,8 @@ #define FATAL "init: fatal: " /* #define WARNING "init: warning: " */ +#define VERSION "$Id$" + const char *progname; void usage(void) { strerr_die4x(0, "usage: ", progname, USAGE, "\n"); } @@ -67,7 +69,7 @@ int main (int argc, const char * const *argv, char * const *envp) { break; case '-': if ((*argv)[1] == 'V') - strerr_warn1("$Id$\n", 0); + strerr_warn1(VERSION "\n", 0); default: usage(); } diff --git a/src/runit.c b/src/runit.c @@ -22,6 +22,8 @@ #define WARNING "- runit: warning: " #define FATAL "- runit: fatal: " +#define VERSION "$Id$" + const char * const stage[3] ={ "/etc/runit/1", "/etc/runit/2", @@ -90,8 +92,7 @@ int main (int argc, const char * const *argv, char * const *envp) { if (RB_DISABLE_CAD == 0) reboot_system(0); #endif - strerr_warn3(INFO, "$Id$", - ": booting.", 0); + strerr_warn3(INFO, VERSION, ": booting.", 0); /* runit */ for (st =0; st < 3; st++) { diff --git a/src/svwaitup.c b/src/svwaitup.c @@ -13,6 +13,8 @@ #define INFO "svwaitup: " #define USAGE " [-v] [-s 1..600] service ..." +#define VERSION "$Id$" + const char *progname; unsigned long sec =2; unsigned int rc =0; @@ -50,7 +52,7 @@ int main(int argc, const char * const *argv) { verbose =1; break; case 'V': - strerr_warn1("$Id$", 0); + strerr_warn1(VERSION, 0); case '?': usage(); } diff --git a/src/utmpset.c b/src/utmpset.c @@ -17,6 +17,8 @@ #define FATAL "utmpset: fatal: " #define WARNING "utmpset: warning: " +#define VERSION "$Id$" + const char *progname; void usage(void) { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); } @@ -97,7 +99,7 @@ int main (int argc, const char * const *argv, const char * const *envp) { wtmp =1; break; case 'V': - strerr_warn1("$Id$", 0); + strerr_warn1(VERSION, 0); case '?': usage(); }