1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- --- dosfstools-3.0.26.orig/src/mkfs.fat.c 2014-02-08 18:53:10.000000000 +0100
- +++ dosfstools-3.0.26/src/mkfs.fat.c 2014-03-26 13:37:51.000000000 +0100
- @@ -300,7 +300,7 @@ static long do_check(char *buffer, int t
- static void alarm_intr(int alnum);
- static void check_blocks(void);
- static void get_list_blocks(char *filename);
- -static int valid_offset(int fd, loff_t offset);
- +static int valid_offset(int fd, off_t offset);
- static uint64_t count_blocks(char *filename, int *remainder);
- static void check_mount(char *device_name);
- static void establish_params(int device_num, int size);
- @@ -477,7 +477,7 @@ static void get_list_blocks(char *filena
- /* Given a file descriptor and an offset, check whether the offset is a valid offset for the file - return FALSE if it
- isn't valid or TRUE if it is */
-
- -static int valid_offset(int fd, loff_t offset)
- +static int valid_offset(int fd, off_t offset)
- {
- char ch;
-
- @@ -492,7 +492,7 @@ static int valid_offset(int fd, loff_t o
-
- static uint64_t count_blocks(char *filename, int *remainder)
- {
- - loff_t high, low;
- + off_t high, low;
- int fd;
-
- if ((fd = open(filename, O_RDONLY)) < 0) {
- @@ -506,7 +506,7 @@ static uint64_t count_blocks(char *filen
- for (high = 1; valid_offset(fd, high); high *= 2)
- low = high;
- while (low < high - 1) {
- - const loff_t mid = (low + high) / 2;
- + const off_t mid = (low + high) / 2;
- if (valid_offset(fd, mid))
- low = mid;
- else
- @@ -1299,7 +1299,7 @@ static void setup_tables(void)
-
- #define seekto(pos,errstr) \
- do { \
- - loff_t __pos = (pos); \
- + off_t __pos = (pos); \
- if (llseek (dev, __pos, SEEK_SET) != __pos) \
- error ("seek to " errstr " failed whilst writing tables"); \
- } while(0)
- @@ -1679,7 +1679,7 @@ int main(int argc, char **argv)
- exit(1); /* The error exit code is 1! */
- }
- } else {
- - loff_t offset = blocks * BLOCK_SIZE - 1;
- + off_t offset = blocks * BLOCK_SIZE - 1;
- char null = 0;
- /* create the file */
- dev = open(device_name, O_EXCL | O_RDWR | O_CREAT | O_TRUNC, 0666);
|