ltp/fsx: output the seed value after logid is initialized
[xfstests-dev.git] / ltp / fsx.c
index ac9e929180e280318d1a993aa0e174dc96b530de..b0157ba357b4f90ba5dc9f45e601534b697d076a 100644 (file)
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -2036,8 +2036,6 @@ main(int argc, char **argv)
                                seed = time(0) % 10000;
                                seed += (int)getpid();
                        }
-                       if (!quiet)
-                               prt("Seed set to %d\n", seed);
                        if (seed < 0)
                                usage();
                        break;
@@ -2091,6 +2089,8 @@ main(int argc, char **argv)
        signal(SIGUSR1, cleanup);
        signal(SIGUSR2, cleanup);
 
+       if (!quiet && seed)
+               prt("Seed set to %d\n", seed);
        srandom(seed);
        fd = open(fname, o_flags, 0666);
        if (fd < 0) {