Mercurial > illumos > illumos-gate
changeset 314:521ded0a71f2
6228013 /var/run/daemon is not explicitly part of any package (fix cstyle)
author | gm149974 |
---|---|
date | Mon, 08 Aug 2005 10:03:59 -0700 |
parents | 89b23177cfa0 |
children | 49348ca69429 |
files | usr/src/cmd/rcap/common/rcapd_stat.h usr/src/cmd/rcap/rcapd/rcapd_main.c |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/rcap/common/rcapd_stat.h Mon Aug 08 09:32:41 2005 -0700 +++ b/usr/src/cmd/rcap/common/rcapd_stat.h Mon Aug 08 10:03:59 2005 -0700 @@ -36,7 +36,8 @@ /* * Default path to statistics file */ -#define STAT_FILE_DEFAULT "/var/run/daemon/rcap.stat" +#define STAT_FILE_DIR "/var/run/daemon" +#define STAT_FILE_DEFAULT STAT_FILE_DIR "/rcap.stat" /* * Statistics file header.
--- a/usr/src/cmd/rcap/rcapd/rcapd_main.c Mon Aug 08 09:32:41 2005 -0700 +++ b/usr/src/cmd/rcap/rcapd/rcapd_main.c Mon Aug 08 10:03:59 2005 -0700 @@ -891,6 +891,13 @@ static char template[LINELEN]; /* + * Try to create a directory irrespective of whether it is existing + * or not. If it is not there then it will create. Otherwise any + * way it will fail at mkstemp call below. + */ + mkdir(STAT_FILE_DIR, 755); + + /* * Create a temporary file. */ if (sizeof (template) < (strlen(rcfg.rcfg_stat_file) +