Ignore:
Timestamp:
Nov 19, 2005, 2:27:31 AM (14 years ago)
Author:
bcornec
Message:

merge -r 125:126 $SVN_M/branches/2.05

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/Mindi/DiskSize/lib/DiskSize.c

    r30 r127  
    44#include "DiskSize.h"
    55
    6 long
    7 get_size_of_disk(disk)
    8     const char *    disk;
     6long get_size_of_disk(disk)
     7const char *disk;
    98{
    10     int      fd;
    11     unsigned long ul;
    12     if ((fd = open (disk, O_RDONLY)) == -1) {
    13     return 0; /* couldn't open */
    14     }
    15     if (ioctl (fd, BLKGETSIZE, &ul) == -1) {
    16     return 0; /* couldn't ioctl */
    17     }
    18     close (fd);
    19     return ul / 2;
     9    int fd;
     10    unsigned long ul;
     11    if ((fd = open(disk, O_RDONLY)) == -1) {
     12        return 0;               /* couldn't open */
     13    }
     14    if (ioctl(fd, BLKGETSIZE, &ul) == -1) {
     15        return 0;               /* couldn't ioctl */
     16    }
     17    close(fd);
     18    return ul / 2;
    2019}
Note: See TracChangeset for help on using the changeset viewer.