summaryrefslogtreecommitdiffstats
path: root/stap-server
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2008-07-30 12:39:51 -0400
committerDave Brolley <brolley@redhat.com>2008-07-30 12:39:51 -0400
commit161be0d9d13449d74de97327786dde83da24bd86 (patch)
tree186a633cf23317fedce9fd646038a49fbf0ba7e4 /stap-server
parente59868d97dbe9b28ea2f3730252c38a582b19a0f (diff)
downloadsystemtap-steved-161be0d9d13449d74de97327786dde83da24bd86.tar.gz
systemtap-steved-161be0d9d13449d74de97327786dde83da24bd86.tar.xz
systemtap-steved-161be0d9d13449d74de97327786dde83da24bd86.zip
No need for random suffix file cmdline and sysinfo files in the
client's request tree.
Diffstat (limited to 'stap-server')
-rwxr-xr-xstap-server24
1 files changed, 12 insertions, 12 deletions
diff --git a/stap-server b/stap-server
index 7df324b4..e825c49a 100755
--- a/stap-server
+++ b/stap-server
@@ -146,20 +146,20 @@ function check_compatibility {
# function: read_data_file PREFIX
#
-# Find a file whose name matches '$1.??????' whose first line
+# Find a file whose name is '$1' and whose first line
# contents are '$1: .*'. Read and echo the first line.
function read_data_file {
- for f in `ls $1.??????`
- do
- read < $f
- line=$REPLY
- data=`expr "$line" : "$1: \\\(.*\\\)"`
- if test "X$data" != "X"; then
- echo $data
- return
- fi
- done
- fatal "ERROR: Data file for $1 not found"
+ test -f $1 || \
+ fatal "ERROR: Data file $1 not found"
+
+ read < $1
+ line=$REPLY
+ data=`expr "$line" : "$1: \\\(.*\\\)"`
+ if test "X$data" != "X"; then
+ echo $data
+ return
+ fi
+ fatal "ERROR: Data in file $1 is incorrect"
}
# function: parse_options [ STAP-OPTIONS ]