2010/9/23 scott mc <scottmc2@xxxxxxxxx>: > On Thu, Sep 23, 2010 at 10:52 AM, <korli@xxxxxxxxxxxxxxxx> wrote: >> Author: korli >> Date: 2010-09-23 19:52:20 +0200 (Thu, 23 Sep 2010) >> New Revision: 38800 >> Changeset: http://dev.haiku-os.org/changeset/38800 >> >> Added: >> haiku/vendor/ffsb/ >> haiku/vendor/ffsb/current/ >> Log: >> ffsb placeholder > > Is there a compelling reason to have this in tree and not just > available via an external OptionalPackage? Mostly packaging lazyness. Here is a patch if needed. I wonder myself if in the end externalisation is also to be applied to some heavy packages like ffmpeg/libavcodec. Bye, Jérôme Index: util.c =================================================================== --- util.c (.../vendor/ffsb/current) (révision 38803) +++ util.c (.../trunk/src/tests/add-ons/kernel/file_systems/ffsb) (révision 38803) @@ -190,9 +190,15 @@ /* !!!! check portability */ float getfsutil(char *dirname) { +#ifdef __HAIKU__ + struct statvfs fsdata; + + statvfs(dirname, &fsdata); +#else struct statvfs64 fsdata; statvfs64(dirname, &fsdata); +#endif /* return (float)(fsdata.f_blocks-fsdata.f_bfree)/ */ /* (float)(fsdata.f_blocks-fsdata.f_bfree+fsdata.f_bavail); */ @@ -202,8 +208,14 @@ uint64_t getfsutil_size(char *dirname) { +#ifdef __HAIKU__ + struct statvfs fsdata; + statvfs(dirname, &fsdata); +#else struct statvfs64 fsdata; statvfs64(dirname, &fsdata); +#endif return (fsdata.f_blocks - fsdata.f_bfree) * fsdata.f_bsize; } Index: fh.c =================================================================== --- fh.c (.../vendor/ffsb/current) (révision 38803) +++ fh.c (.../trunk/src/tests/add-ons/kernel/file_systems/ffsb) (révision 38803) @@ -74,7 +74,9 @@ int need_stats = ft_needs_stats(ft, SYS_OPEN) || fs_needs_stats(fs, SYS_OPEN); +#ifndef __HAIKU__ flags |= O_LARGEFILE; +#endif if (need_stats) gettimeofday(&start, NULL);