~ubuntu-branches/ubuntu/utopic/parted/utopic-proposed

« back to all changes in this revision

Viewing changes to libparted/arch/beos.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-07-21 10:23:16 UTC
  • mfrom: (7.2.32 sid)
  • Revision ID: package-import@ubuntu.com-20140721102316-jsyv3yzmbo8vlde5
Tags: 3.1-3
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    libparted - a library for manipulating disk partitions
3
 
    Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
 
3
    Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
4
4
 
5
5
    This program is free software; you can redistribute it and/or modify
6
6
    it under the terms of the GNU General Public License as published by
273
273
        struct stat stat_info;
274
274
        PedDevice* dev;
275
275
 
276
 
        PED_ASSERT(path != NULL, return NULL);
 
276
        PED_ASSERT(path != NULL);
277
277
 
278
278
        dev = (PedDevice*) ped_malloc (sizeof (PedDevice));
279
279
        if (!dev)
404
404
        PedExceptionOption ex_status;
405
405
        size_t read_length = count * dev->sector_size;
406
406
 
407
 
        PED_ASSERT(dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0, return 0);
 
407
        PED_ASSERT(dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0);
408
408
 
409
409
        /* First, try to seek */
410
410
        while(1)
478
478
        PedExceptionOption      ex_status;
479
479
        size_t                  write_length = count * dev->sector_size;
480
480
 
481
 
        PED_ASSERT(dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0, return 0);
 
481
        PED_ASSERT(dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0);
482
482
 
483
483
        if (dev->read_only)
484
484
        {
565
565
        PedSector               done = 0;
566
566
        int                             status;
567
567
 
568
 
        PED_ASSERT(dev != NULL, return 0);
 
568
        PED_ASSERT(dev != NULL);
569
569
 
570
570
        if (lseek(arch_specific->fd, start * dev->sector_size, SEEK_SET)
571
571
                != start * dev->sector_size)