From 31453fca665a207d7965f620eb4de4e92cf1a6ff Mon Sep 17 00:00:00 2001 From: Eric Fernandes Ferreira Date: Sat, 26 Aug 2017 14:18:41 +0100 Subject: system/hfsprogs: Added (hfs+ user space utils). Signed-off-by: David Spencer --- system/hfsprogs/patches/0011-Fix-types.patch | 71 ++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 system/hfsprogs/patches/0011-Fix-types.patch (limited to 'system/hfsprogs/patches/0011-Fix-types.patch') diff --git a/system/hfsprogs/patches/0011-Fix-types.patch b/system/hfsprogs/patches/0011-Fix-types.patch new file mode 100644 index 0000000000..88c049fcd1 --- /dev/null +++ b/system/hfsprogs/patches/0011-Fix-types.patch @@ -0,0 +1,71 @@ +From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= +Date: Thu, 24 Oct 2013 01:11:22 -0200 +Subject: Fix types + +--- + fsck_hfs.tproj/cache.c | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) + +diff --git a/fsck_hfs.tproj/cache.c b/fsck_hfs.tproj/cache.c +index 527088a..540fa0b 100644 +--- a/fsck_hfs.tproj/cache.c ++++ b/fsck_hfs.tproj/cache.c +@@ -961,20 +961,21 @@ int CacheLookup (Cache_t *cache, uint64_t off, Tag_t **tag) + */ + int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf) + { +- uint64_t result; ++ off_t result1; ++ ssize_t result2; + + /* Both offset and length must be multiples of the device block size */ + if (off % cache->DevBlockSize) return (EINVAL); + if (len % cache->DevBlockSize) return (EINVAL); + + /* Seek to the position */ +- result = lseek (cache->FD_R, off, SEEK_SET); +- if (result < 0) return (errno); +- if (result != off) return (ENXIO); ++ result1 = lseek(cache->FD_R, off, SEEK_SET); ++ if (result1 < 0) return (errno); ++ if (result1 != off) return (ENXIO); + /* Read into the buffer */ +- result = read (cache->FD_R, buf, len); +- if (result < 0) return (errno); +- if (result == 0) return (ENXIO); ++ result2 = read(cache->FD_R, buf, len); ++ if (result2 < 0) return (errno); ++ if (result2 == 0) return (ENXIO); + + /* Update counters */ + cache->DiskRead++; +@@ -989,21 +990,22 @@ int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf) + */ + int CacheRawWrite (Cache_t *cache, uint64_t off, uint32_t len, void *buf) + { +- uint64_t result; ++ off_t result1; ++ ssize_t result2; + + /* Both offset and length must be multiples of the device block size */ + if (off % cache->DevBlockSize) return (EINVAL); + if (len % cache->DevBlockSize) return (EINVAL); + + /* Seek to the position */ +- result = lseek (cache->FD_W, off, SEEK_SET); +- if (result < 0) return (errno); +- if (result != off) return (ENXIO); ++ result1 = lseek (cache->FD_W, off, SEEK_SET); ++ if (result1 < 0) return (errno); ++ if (result1 != off) return (ENXIO); + + /* Write into the buffer */ +- result = write (cache->FD_W, buf, len); +- if (result < 0) return (errno); +- if (result == 0) return (ENXIO); ++ result2 = write (cache->FD_W, buf, len); ++ if (result2 < 0) return (errno); ++ if (result2 == 0) return (ENXIO); + + /* Update counters */ + cache->DiskWrite++; -- cgit v1.2.3