~ubuntu-branches/ubuntu/oneiric/sg3-utils/oneiric

« back to all changes in this revision

Viewing changes to src/sg_turs.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-11-05 20:42:13 UTC
  • mfrom: (5.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091105204213-ug7wrb6m7l9kmvyg
Tags: 1.28-2
* QA upload.
* Add libsgutils2-2.symbols.kfreebsd. Some of the symbols are Linux
  specific causing FTBFS on kfreebsd.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include "config.h"
10
10
#endif
11
11
 
12
 
#ifndef SG3_UTILS_MINGW
 
12
#ifndef SG_LIB_MINGW
13
13
#include <sys/time.h>
14
14
#endif
15
15
 
21
21
   data transfer (and no REQUEST SENSE command iff the unit is ready)
22
22
   then this can be used for timing per SCSI command overheads.
23
23
 
24
 
 * Copyright (C) 2000-2007 D. Gilbert
 
24
 * Copyright (C) 2000-2009 D. Gilbert
25
25
 * This program is free software; you can redistribute it and/or modify
26
26
 * it under the terms of the GNU General Public License as published by
27
27
 * the Free Software Foundation; either version 2, or (at your option)
29
29
 
30
30
 */
31
31
 
32
 
static char * version_str = "3.26 20070714";
 
32
static char * version_str = "3.27 20090422";
33
33
 
34
34
#if defined(MSC_VER) || defined(__MINGW32__)
35
35
#define HAVE_MS_SLEEP
269
269
    int num_errs = 0;
270
270
    int reported = 0;
271
271
    int ret = 0;
272
 
#ifndef SG3_UTILS_MINGW
 
272
#ifndef SG_LIB_MINGW
273
273
    struct timeval start_tm, end_tm;
274
274
#endif
275
275
    struct opts_t opts;
318
318
            printf("Completed %d Test Unit Ready commands\n",
319
319
                   ((k < opts.do_number) ? k + 1 : k));
320
320
    } else {
321
 
#ifndef SG3_UTILS_MINGW
 
321
#ifndef SG_LIB_MINGW
322
322
        if (opts.do_time) {
323
323
            start_tm.tv_sec = 0;
324
324
            start_tm.tv_usec = 0;
337
337
                }
338
338
            }
339
339
        }
340
 
#ifndef SG3_UTILS_MINGW
 
340
#ifndef SG_LIB_MINGW
341
341
        if ((opts.do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
342
342
            struct timeval res_tm;
343
343
            double a, b;