Revision 90527811 tools/trasher.c

View differences:

tools/trasher.c
6 6

  
7 7
int main(int argc, char** argv)
8 8
{
9
    FILE *f= fopen(argv[1], "rb+");
10
    int count= atoi(argv[2]);
11
    int maxburst= atoi(argv[3]);
12
    int length;
9
    FILE *f;
10
    int count, maxburst, length;
11

  
12
    if (argc < 4){
13
        printf("USAGE: trasher <filename> <count> <maxburst>\n");
14
        return 1;
15
    }
16

  
17
    f= fopen(argv[1], "rb+");
18
    if (!f){
19
        perror(argv[1]);
20
        return 2;
21
    }
22
    count= atoi(argv[2]);
23
    maxburst= atoi(argv[3]);
13 24

  
14 25
    srand (time (0));
15 26

  

Also available in: Unified diff