diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-06-17 16:30:17 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-06-17 16:30:17 +0000 |
commit | a858b2518bcb17f5a06344d2c032c7326669c1f4 (patch) | |
tree | 841d396b9808af91eea0cec2b3d271819b99b12c /src | |
parent | ab3834e5ed682012c0b4043f8c79ed7d27e73e42 (diff) | |
download | ipacct-a858b2518bcb17f5a06344d2c032c7326669c1f4.tar.gz ipacct-a858b2518bcb17f5a06344d2c032c7326669c1f4.tar.bz2 |
Use program_invocation_short_name.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c index 78bca78..449d90d 100644 --- a/src/utils.c +++ b/src/utils.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: utils.c,v 1.1 2001/05/31 13:40:56 gray Exp $ */ +/* $Id: utils.c,v 1.2 2002/06/17 16:30:17 gray Exp $ */ #if defined(HAVE_CONFIG_H) # include <config.h> #endif @@ -27,6 +27,7 @@ #include <errno.h> #include <varargs.h> #include <syslog.h> +#include <argp.h> #include "ipacct.h" int use_stderr = 1; @@ -111,7 +112,7 @@ void init_syslog() { use_stderr = 0; - openlog(progname, LOG_PID, LOGFACILITY); + openlog(program_invocation_short_name, LOG_PID, LOGFACILITY); } error(fmt, va_alist) @@ -122,7 +123,7 @@ error(fmt, va_alist) va_start(ap); if (use_stderr) { - fprintf(stderr, "%s: ", progname); + fprintf(stderr, "%s: ", program_invocation_short_name); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); } else { @@ -139,7 +140,7 @@ warning(fmt, va_alist) va_start(ap); if (use_stderr) { - fprintf(stderr, "%s: ", progname); + fprintf(stderr, "%s: ", program_invocation_short_name); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); } else { @@ -157,7 +158,7 @@ die(code, fmt, va_alist) va_list ap; va_start(ap); - fprintf(stderr, "%s: ", progname); + fprintf(stderr, "%s: ", program_invocation_short_name); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); va_end(ap); |