Tor Arne Vestbø
c08a2b8728
Implement release callback
...
Not doing anything yet, but will be needed for zero-copy
2012-10-14 21:45:53 +02:00
Tor Arne Vestbø
4bcb457c24
Handle return value of asprintf
2012-10-14 01:49:16 +02:00
Tor Arne Vestbø
9800369652
Add a few missing includes
2012-10-14 01:47:42 +02:00
Tor Arne Vestbø
bfe906f853
Fix reads across band boundaries
...
If a read was requested at an offset just before the end of a band,
with a length sufficiently large to cross over to the next band, we
would pad the remaining space after the initial band with zeroes,
and never proceed to read the second band.
We now limit the size of each consecutive band read to the end of the
band, so that the while loop will correctly continue with the next
band if there's still more data to be read.
2012-10-07 22:27:36 +02:00
Tor Arne Vestbø
c9e2a8ed53
Use const char foo[] over const char *foo for string literals
...
Saves one pointer in memory and is cleaner than const char * const.
2012-10-03 21:30:53 +02:00
Tor Arne Vestbø
7a58f90043
Force read-only mount by explicitly passing -o ro
2012-10-03 00:01:31 +02:00
Tor Arne Vestbø
4cb052473c
Add new option -D, and only enable debug logging if passed
2012-10-02 23:34:06 +02:00
Tor Arne Vestbø
a500b7b168
Simplify main()
...
No reason to clean up, we're exiting anyways, and syslog will
automatically closed on exit.
2012-10-02 23:13:21 +02:00
Tor Arne Vestbø
7d9274f28c
Tweak usage text
2012-10-02 23:13:15 +02:00
Tor Arne Vestbø
ff663449a9
Replace custom logging with syslog
2012-10-02 23:00:36 +02:00
Tor Arne Vestbø
5e36b62332
Remove duplicate include
2012-10-02 02:01:01 +02:00
Tor Arne Vestbø
04d2a2fc60
Minor code cleanup
2012-10-02 01:59:32 +02:00
Tor Arne Vestbø
1be8425136
Reference band files by hex value instead of decimal
2012-10-01 21:09:55 +02:00
Tor Arne Vestbø
f9c2e41d6e
Fix warning about comparison between signed and unsigned ints
...
We assume numeric_limits<off_t>::max() will not return a negative
number, so casting should be safe.
2012-10-01 20:34:49 +02:00
Tor Arne Vestbø
357e446d94
Allow mounting of images larger than 2GB
...
Adds some sanity checking of the 'size' and 'band-size' values from the
Info.plist file, and ensures they are within the range of off_t, which
happens to be 64 bit due to FUSE forcing the use of _FILE_OFFSET_BITS=64.
2012-10-01 20:03:47 +02:00
Tor Arne Vestbø
4998a33e19
Fix another warning about signed and unsigned comparison
2012-09-28 13:56:42 +02:00
Tor Arne Vestbø
6356cbc32a
Remove use of C99 designated initializers
2012-09-28 13:54:06 +02:00
Tor Arne Vestbø
3a3a86bcdb
Fix warning about signed and unsigned comparison
2012-09-28 13:38:10 +02:00
Tor Arne Vestbø
09f2c0e39a
Initial commit
2012-09-28 13:16:17 +02:00