~ubuntu-branches/ubuntu/natty/acorn-fdisk/natty

« back to all changes in this revision

Viewing changes to lib/blkio/open.c

  • Committer: Bazaar Package Importer
  • Author(s): Thorsten Glaser
  • Date: 2010-10-02 18:45:24 UTC
  • Revision ID: james.westby@ubuntu.com-20101002184524-16z4xp4rs6r0owe5
Tags: 3.0.6-7
* QA upload.
* Acknowledge NMU (Closes: #366447) (Closes: #552791) (Closes: #563996)
  Thanks Martin!
* Apply my patch from January 2010 (Closes: #563522)
  + fix compiler warnings:
    - fdisk.c: passing … from incompatible pointer type
    - lib/scheme/icside.c: dereferencing … does break strict-aliasing rules
      XXX there might be an endianness issue left from the original code
    - lib/scheme/pcbios.c: array subscript is above array bounds
    - lib/scheme/pcbios.c: use of uninitialised value
  + fix lintian warnings:
    - debhelper-but-no-misc-depends
    - debian-rules-ignores-make-clean-error
    - spelling-error-in-binary
    - unknown-section base
    - package-contains-empty-directory
  + debian/watch: new file (took me some time to track down upstream tho)
  + debian/control: add Homepage (as close to one as I could find)
  + debian/manpages, debian/acorn-fdisk.8: new files
* Extend the manual page, obsoletes another bug (Closes: #436190)
* Set maintainer to QA group. (I will however keep an eye on this
  package and, while not promising, might take it over. Not now.)
* Add debian/source/format (preferring 1.0 at the moment)
* Port this to GNU/kFreeBSD (some ideas from util-linux, 10x)
* Disable building on GNU/Hurd until we have a way to port it
* Fix more compiler warnings (format strings, unused variables)
* Support short options in addition to GNU --long-options
* Honour dpkg CFLAGS during build
* debian/dirs: remove, not needed
* debian/README.source: new, describe TODO

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
  dbg_level_up ();
335
335
 
336
336
  do {
 
337
#ifdef HDIO_GETGEO
337
338
    struct hd_geometry geometry;
 
339
#endif
338
340
 
339
341
    blkio = zmalloc (sizeof (blkio_t));
340
342
    if (blkio == NULL)
351
353
      break;
352
354
    }
353
355
    
 
356
#ifdef HDIO_GETGEO
354
357
    if (!ioctl(blkio->fd, HDIO_GETGEO, &geometry)) {
355
358
      uint64_t length;
356
359
      int sector_size;
368
371
        blkio->geometry.cylinders = (length / sector_size) / (geometry.heads * geometry.sectors);
369
372
      }
370
373
 
371
 
    } else {
 
374
    } else
 
375
#endif
 
376
    {
372
377
      blkio->geometry.cylinders = 1024;
373
378
      blkio->geometry.heads = 16;
374
379
      blkio->geometry.sectors = 63;