Er, actually make this test meaningful.  It now aborts correctly if you try to
launch stage2 directly, rather than giving an obscure error about the tool
later on.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2527 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index a8a09b5..9b5bd81 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -473,8 +473,8 @@
 	 break;
       }
 
-   if ( ! (1|2) ) {
-      fprintf(stderr, "stage2 must be launched by stage1\n");
+   if ( found != (1|2) ) {
+      fprintf(stderr, "valgrind: stage2 must be launched by stage1\n");
       exit(127);
    }
 }