diff options
author | fche <fche> | 2006-12-06 17:13:47 +0000 |
---|---|---|
committer | fche <fche> | 2006-12-06 17:13:47 +0000 |
commit | 129be0acc85b2bb7bb9b3c71b0c4caa350aecb4b (patch) | |
tree | 4709106e68a56d8ab1148d73e57f09aa79890ad7 /main.cxx | |
parent | b42d7f79d123ac73da8b43051cbfb3480059b2c3 (diff) | |
download | systemtap-steved-129be0acc85b2bb7bb9b3c71b0c4caa350aecb4b.tar.gz systemtap-steved-129be0acc85b2bb7bb9b3c71b0c4caa350aecb4b.tar.xz systemtap-steved-129be0acc85b2bb7bb9b3c71b0c4caa350aecb4b.zip |
2006-12-05 Frank Ch. Eigler <fche@redhat.com>
PR 3648
* main.cxx (main): Tweak error message for tapset script execution.
Also catch those clever rogues who use stdin.
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -454,7 +454,10 @@ main (int argc, char * const argv []) int user_file_stat_rc = -1; if (script_file == "-") - s.user_file = parser::parse (s, cin, s.guru_mode); + { + s.user_file = parser::parse (s, cin, s.guru_mode); + user_file_stat_rc = fstat (STDIN_FILENO, & user_file_stat); + } else if (script_file != "") { s.user_file = parser::parse (s, script_file, s.guru_mode); @@ -529,8 +532,8 @@ main (int argc, char * const argv []) user_file_stat.st_dev == tapset_file_stat.st_dev && user_file_stat.st_ino == tapset_file_stat.st_ino) { - clog << "parse error: tapset file '" << globbuf.gl_pathv[j] - << "' is already processed as the user script." << endl; + clog << "usage error: tapset file '" << globbuf.gl_pathv[j] + << "' cannot be run directly as a session script." << endl; rc ++; } |