summaryrefslogtreecommitdiffstats
path: root/runtime/stpd/librelay.c
diff options
context:
space:
mode:
authorhunt <hunt>2006-04-05 19:56:50 +0000
committerhunt <hunt>2006-04-05 19:56:50 +0000
commit4b8a6dc2f049fe9e02490ca8f9505a3a693a7014 (patch)
treeaebf2f1aa74ce98e32a88e599f2237440ba0725b /runtime/stpd/librelay.c
parentd556e7d7f48a449b4be6e8174428219ae71a30b2 (diff)
downloadsystemtap-steved-4b8a6dc2f049fe9e02490ca8f9505a3a693a7014.tar.gz
systemtap-steved-4b8a6dc2f049fe9e02490ca8f9505a3a693a7014.tar.xz
systemtap-steved-4b8a6dc2f049fe9e02490ca8f9505a3a693a7014.zip
2006-04-05 Martin Hunt <hunt@redhat.com>
* librelay.c (merge_output): Set the output filename if necessary. * stpd.c (main): Don't reset output_filename just because relayfs is possible. Move that code to librelay.c.
Diffstat (limited to 'runtime/stpd/librelay.c')
-rw-r--r--runtime/stpd/librelay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/stpd/librelay.c b/runtime/stpd/librelay.c
index cbc5b5a5..e1d9e499 100644
--- a/runtime/stpd/librelay.c
+++ b/runtime/stpd/librelay.c
@@ -59,6 +59,8 @@ static char proc_filebase[128];
static int proc_file[NR_CPUS];
/* probe output written here, if non-NULL */
+/* if no output file name is specified, use this */
+#define DEFAULT_RELAYFS_OUTFILE_NAME "probe.out"
extern char *outfile_name;
/* internal variables */
@@ -577,6 +579,9 @@ static int merge_output(void)
num[i] = 0;
}
+ if (!outfile_name)
+ outfile_name = DEFAULT_RELAYFS_OUTFILE_NAME;
+
ofp = fopen (outfile_name, "w");
if (!ofp) {
fprintf (stderr, "ERROR: couldn't open output file %s: errcode = %s\n",