2 * disksize.c - Try to get the size of a disk.
4 * At present this relies on fseeko and such. Could do something
5 * smarter here like a binary search if this needs to be more portable.
8 #define _FILE_OFFSET_BITS 64
13 int get_disk_size(char *device
, u64
*size
)
15 FILE *fp
= fopen(device
, "r");
19 fseeko(fp
, 0, SEEK_END
);