~ubuntu-branches/ubuntu/lucid/udisks/lucid

« back to all changes in this revision

Viewing changes to src/helpers/job-drive-benchmark.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-04-09 18:19:18 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20100409181918-78f2v3ko8gfj0j23
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
        }
104
104
      else if (num_read < 0)
105
105
        {
106
 
          g_printerr ("Error reading %" G_GSSIZE_FORMAT " bytes at %" G_GOFFSET_FORMAT " from %s "
 
106
          g_printerr ("Error reading %" G_GUINT64_FORMAT " bytes at %" G_GSSIZE_FORMAT " from %s "
107
107
                      "when guesstimating buffer size: %m\n",
108
108
                      buffer_size,
109
109
                      (remaining - total_read),
174
174
 
175
175
      if (lseek64 (fd, pos, SEEK_SET) == -1)
176
176
        {
177
 
          g_printerr ("Error seeking to position %" G_GSSIZE_FORMAT " for %s: %m\n",
 
177
          g_printerr ("Error seeking to position %" G_GOFFSET_FORMAT " for %s: %m\n",
178
178
                      pos,
179
179
                      device_file);
180
180
          goto out;
198
198
            }
199
199
          else if (num_read < 0)
200
200
            {
201
 
              g_printerr ("Error reading %" G_GSSIZE_FORMAT " bytes at %" G_GOFFSET_FORMAT " from %s: %m\n",
 
201
              g_printerr ("Error reading %" G_GUINT64_FORMAT " bytes at %" G_GOFFSET_FORMAT " from %s: %m\n",
202
202
                          sample_size,
203
203
                          pos + (remaining - total_read),
204
204
                          device_file);
259
259
 
260
260
      if (lseek64 (fd, pos, SEEK_SET) == -1)
261
261
        {
262
 
          g_printerr ("Error seeking to position %" G_GSSIZE_FORMAT " for %s: %m\n",
 
262
          g_printerr ("Error seeking to position %" G_GOFFSET_FORMAT " for %s: %m\n",
263
263
                      pos,
264
264
                      device_file);
265
265
          goto out;
283
283
            }
284
284
          else if (num_written < 0)
285
285
            {
286
 
              g_printerr ("Error writing %" G_GSSIZE_FORMAT " bytes at %" G_GOFFSET_FORMAT " to %s: %m\n",
 
286
              g_printerr ("Error writing %" G_GUINT64_FORMAT " bytes at %" G_GOFFSET_FORMAT " to %s: %m\n",
287
287
                          sample_size,
288
288
                          pos + (remaining - total_written),
289
289
                          device_file);
349
349
      g_get_current_time (&begin_time);
350
350
      if (lseek64 (fd, pos, SEEK_SET) == -1)
351
351
        {
352
 
          g_printerr ("Error seeking to position %" G_GSSIZE_FORMAT " for %s: %m\n",
 
352
          g_printerr ("Error seeking to position %" G_GUINT64_FORMAT " for %s: %m\n",
353
353
                      pos,
354
354
                      device_file);
355
355
          goto out;
356
356
        }
357
357
      if (read (fd, buf, page_size) < 0)
358
358
        {
359
 
          g_printerr ("Error reading %d bytes at %" G_GOFFSET_FORMAT " from %s: %m\n",
 
359
          g_printerr ("Error reading %d bytes at %" G_GUINT64_FORMAT " from %s: %m\n",
360
360
                      page_size,
361
361
                      pos,
362
362
                      device_file);
367
367
      duration_secs = ((end_time.tv_sec * G_USEC_PER_SEC + end_time.tv_usec) - (begin_time.tv_sec * G_USEC_PER_SEC
368
368
                                                                                + begin_time.tv_usec)) / ((gdouble) G_USEC_PER_SEC);
369
369
 
370
 
      g_print ("access_time: offset %" G_GOFFSET_FORMAT " time %f\n",
 
370
      g_print ("access_time: offset %" G_GUINT64_FORMAT " time %f\n",
371
371
               pos,
372
372
               duration_secs);
373
373