summaryrefslogtreecommitdiff
path: root/Utility/libdiskfree.c
Commit message (Collapse)AuthorAge
* Use statvfs on OSX.Gravatar Joey Hess2015-10-19
| | | | | | | | Fixes a recent-ish build warning on about 64 bit vs non. This is the method used by the disk-free-space library, and I tested it to yield the same results on even 10 tb drives on OSX -- so it's getting 64 bit values.
* Ported disk free space checking code to work on Solaris.Gravatar Joey Hess2015-10-02
| | | | | | | | | | | | | On Solaris, using f_bsize provided a value that is apparently much larger than the real block size. The solaris docs for statvfs say f_bsize is the "preferred" file system block size, and I guess the filesystem prefers larger blocks, but uses smaller ones or something. The docs also say that f_frsize is the "fundamental" block size. Switched to using f_frsize on Linux and kFreeBSD too, since I guess f_bsize could in theory vary the same way there too. Assuming that Solaris is not violating the posix spec, I guess the linux man page for statvfs is not as well written and I misunderstood it.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* OSX: Switched away from deprecated statfs64 interface.Gravatar Joey Hess2014-12-31
| | | | | | | | | | Getting rid of build warning warning: 'statfs64' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations] 10.6 is much older than the oldest git-annex OSX port, so won't break anything.
* relicense general utility library code to BSDGravatar Joey Hess2014-05-10
| | | | | Omitted a couple of files what have had significant contributions from others.
* add getDiskSizeGravatar Joey Hess2014-01-22
| | | | Couldn't find anything that exposed this for Windows.
* Makefile now builds using cabal, taking advantage of cabal's automatic ↵Gravatar Joey Hess2013-02-27
| | | | | | | | | detection of appropriate build flags. The only thing lost is ./ghci Speed: make fast used to take 20 seconds here, when rebuilding from touching Command/Unused.hs. With cabal, it's 29 seconds.
* can now build Android targeted binaryGravatar Joey Hess2013-02-10
| | | | | | | | | | | | | | | | Various things that don't work on Android are just ifdefed out. * the webapp (needs template haskell for arm) * --include and --exclude globbing (needs libpcre, which is not ported; probably I'll make it use the pure haskell glob library instead) * annex.diskreserve checking (missing sys/statvfs.h) * timestamp preservation support (yawn) * S3 * WebDAV * XMPP The resulting 17mb binary has been tested on Android, and it is able to, at least, print its usage message.
* Enable diskfree on kfreebsd, using statvfs.Gravatar Joey Hess2012-06-17
| | | | | | Could not reproduce the build failure I had seen related to this, but the numbers were wrong with statfs64. Probably pulling from the wrong place in the structure. statvfs seems to work..
* tweakGravatar Joey Hess2012-04-18
|
* clear errno after successful callGravatar Joey Hess2012-04-18
| | | | | | | | When preparing the debian stable backport, I am seeing a call to statvfs() succeed, but also set errno to 2 (ENOENT). Not sure why this happens; I am in a schroot when it does happen, or perhaps stable's libc is a little broken and sets errno incorrectly. Anyway, it should be perfectly fine to clear errno after the successful call, rather than before it.
* Renamed diskfree.c to avoid OSX case insensativity bug.Gravatar Joey Hess2012-04-13