diff options
author | David <dbphillipsnz@gmail.com> | 2014-05-31 21:06:56 +1200 |
---|---|---|
committer | David <dbphillipsnz@gmail.com> | 2014-05-31 21:06:56 +1200 |
commit | 2747e2b658b2f27897a80345cb3afb196c0e7c3b (patch) | |
tree | 7109f7783715b54036043d0395f90c33a6ea2d4b | |
parent | 6faf4635230843b995276e7cb5183a2118f4434b (diff) | |
download | paramano-2747e2b658b2f27897a80345cb3afb196c0e7c3b.tar.xz |
Added strip section to Makefile (saves 9kb heh)
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | trayfreq_set.c | 6 |
2 files changed, 14 insertions, 0 deletions
@@ -129,6 +129,14 @@ trayfreq.conf: -e 's:TRAYFREQ_CONF:$(TRAYFREQ_CONF):g' \ trayfreq.conf.src > trayfreq.conf ######################################################################## + + +######################################################################## +# Strip all symbols from binaries +strip: + strip -s trayfreq trayfreq-set + +######################################################################## ######################################################################## diff --git a/trayfreq_set.c b/trayfreq_set.c index 7a48af5..8f2ad72 100644 --- a/trayfreq_set.c +++ b/trayfreq_set.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <libintl.h> #include <locale.h> @@ -125,6 +126,11 @@ int main(int argc, char *argv[]) // If unusual number of args, give up now if (argc == 5) { + + debug ("Checking UID\n"); + if (getuid() != 0) + fprintf(stderr,"Warning: running as UID %d, not 0\n",getuid() ); + get_argument_summary(argc, argv, &args); debug("Correct number of command line arguments\n"); |