diff options
author | Eric Fernandes Ferreira <candelabrus@gmail.com> | 2017-08-26 14:18:41 +0100 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-09-02 10:19:43 +0100 |
commit | 31453fca665a207d7965f620eb4de4e92cf1a6ff (patch) | |
tree | 88a54022dff1941880002a22b7538e8697b0ae03 /system/hfsprogs/patches/0011-Fix-types.patch | |
parent | b1fcef60af497bb6770121e251215230471efb62 (diff) | |
download | slackbuilds-31453fca665a207d7965f620eb4de4e92cf1a6ff.tar.gz |
system/hfsprogs: Added (hfs+ user space utils).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/hfsprogs/patches/0011-Fix-types.patch')
-rw-r--r-- | system/hfsprogs/patches/0011-Fix-types.patch | 71 |
1 files changed, 71 insertions, 0 deletions
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?= <rbrito@ime.usp.br> +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++; |