Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > ea6cfcf0527a1c7b8779f5e345d8a795 > files > 3

dosfstools-2.11-3mdv2007.1.src.rpm

--- dosfstools-2.11/dosfsck/io.c.lseek	2005-03-12 10:33:58.000000000 -0500
+++ dosfstools-2.11/dosfsck/io.c	2005-11-06 21:58:06.000000000 -0500
@@ -42,7 +42,7 @@
 
 #ifdef __DJGPP__
 #include "volume.h"	/* DOS lowlevel disk access functions */
-#undef llseek
+//#undef llseek
 static loff_t llseek( int fd, loff_t offset, int whence )
 {
     if ((whence != SEEK_SET) || (fd == 4711)) return -1; /* only those supported */
--- dosfstools-2.11/dosfsck/io.h.lseek	2005-03-12 09:04:07.000000000 -0500
+++ dosfstools-2.11/dosfsck/io.h	2005-11-06 21:58:06.000000000 -0500
@@ -13,7 +13,7 @@
 
 /* In earlier versions, an own llseek() was used, but glibc lseek() is
  * sufficient (or even better :) for 64 bit offsets in the meantime */
-#define llseek lseek
+//#define llseek lseek
 
 void fs_open(char *path,int rw);
 
--- dosfstools-2.11/dosfsck/boot.c.lseek	2005-03-12 09:16:22.000000000 -0500
+++ dosfstools-2.11/dosfsck/boot.c	2005-11-06 22:00:09.000000000 -0500
@@ -140,7 +140,7 @@
 	    fs->backupboot_start = bbs*lss;
 	    b->backup_boot = CT_LE_W(bbs);
 	    fs_write(fs->backupboot_start,sizeof(*b),b);
-	    fs_write((off_t)offsetof(struct boot_sector,backup_boot),
+	    fs_write((loff_t)offsetof(struct boot_sector,backup_boot),
 		     sizeof(b->backup_boot),&b->backup_boot);
 	    printf( "Created backup of boot sector in sector %d\n", bbs );
 	    return;
@@ -215,9 +215,9 @@
 		if (s != CF_LE_W(b->backup_boot)) break;
 	    if (s > 0 && s < CF_LE_W(b->reserved)) {
 		init_fsinfo(&i);
-		fs_write((off_t)s*lss,sizeof(i),&i);
+		fs_write((loff_t)s*lss,sizeof(i),&i);
 		b->info_sector = CT_LE_W(s);
-		fs_write((off_t)offsetof(struct boot_sector,info_sector),
+		fs_write((loff_t)offsetof(struct boot_sector,info_sector),
 			 sizeof(b->info_sector),&b->info_sector);
 		if (fs->backupboot_start)
 		    fs_write(fs->backupboot_start+
@@ -272,7 +272,7 @@
     unsigned total_sectors;
     unsigned short logical_sector_size, sectors;
     unsigned fat_length;
-    off_t data_size;
+    loff_t data_size;
 
     fs_read(0,sizeof(b),&b);
     logical_sector_size = GET_UNALIGNED_W(b.sector_size);
@@ -286,17 +286,17 @@
     total_sectors = sectors ? sectors : CF_LE_L(b.total_sect);
     if (verbose) printf("Checking we can access the last sector of the filesystem\n");
     /* Can't access last odd sector anyway, so round down */
-    fs_test((off_t)((total_sectors & ~1)-1)*(off_t)logical_sector_size,
+    fs_test((loff_t)((total_sectors & ~1)-1)*(loff_t)logical_sector_size,
 	    logical_sector_size);
     fat_length = CF_LE_W(b.fat_length) ?
 		 CF_LE_W(b.fat_length) : CF_LE_L(b.fat32_length);
-    fs->fat_start = (off_t)CF_LE_W(b.reserved)*logical_sector_size;
-    fs->root_start = ((off_t)CF_LE_W(b.reserved)+b.fats*fat_length)*
+    fs->fat_start = (loff_t)CF_LE_W(b.reserved)*logical_sector_size;
+    fs->root_start = ((loff_t)CF_LE_W(b.reserved)+b.fats*fat_length)*
       logical_sector_size;
     fs->root_entries = GET_UNALIGNED_W(b.dir_entries);
     fs->data_start = fs->root_start+ROUND_TO_MULTIPLE(fs->root_entries <<
       MSDOS_DIR_BITS,logical_sector_size);
-    data_size = (off_t)total_sectors*logical_sector_size-fs->data_start;
+    data_size = (loff_t)total_sectors*logical_sector_size-fs->data_start;
     fs->clusters = data_size/fs->cluster_size;
     fs->root_cluster = 0; /* indicates standard, pre-FAT32 root dir */
     fs->fsinfo_start = 0; /* no FSINFO structure */
--- dosfstools-2.11/mkdosfs/mkdosfs.c.lseek	2005-11-06 21:58:06.000000000 -0500
+++ dosfstools-2.11/mkdosfs/mkdosfs.c	2005-11-06 21:58:06.000000000 -0500
@@ -97,7 +97,7 @@
 
 /* In earlier versions, an own llseek() was used, but glibc lseek() is
  * sufficient (or even better :) for 64 bit offsets in the meantime */
-#define llseek lseek
+// #define llseek lseek
 
 /* Constant definitions */
 
@@ -538,7 +538,7 @@
 static unsigned long long
 count_blocks (char *filename)
 {
-  off_t high, low;
+  loff_t high, low;
   int fd;
 
   if ((fd = open (filename, O_RDONLY)) < 0)