Seems something went wrong, so I'll try to send the patch in plaintext instead (it's pretty small)
diff -Naur Scripts.orig/2.9.4/src/List.c Scripts/2.9.4/src/List.c --- Scripts.orig/2.9.4/src/List.c 2008-07-31 02:30:04.000000000 +0200 +++ Scripts/2.9.4/src/List.c 2008-10-05 01:27:22.000000000 +0200 @@ -30,6 +30,10 @@ #include <sys/mount.h> #define MAJOR(x) (long long) major(x) #define MINOR(x) (long long) minor(x) +#elif defined(__FreeBSD__) + #include <sys/mount.h> + #define MAJOR(x) (long long) major(x) + #define MINOR(x) (long long) minor(x) #else #include <sys/statfs.h> #include <sys/vfs.h> @@ -700,9 +704,10 @@ exit(EXIT_FAILURE); } -char * -get_filesystem(struct statfs status) +char const * +get_filesystem(struct statfs *status) { +#ifndef __FreeBSD__ int i; struct fs_info fs_info[] = { { ADFS_SUPER_MAGIC, "adfs" }, @@ -755,11 +760,17 @@ }; for (i = 0; i < sizeof(fs_info)/sizeof(struct fs_info); ++i) { - if (status.f_type == fs_info[i].magic) + if (status->f_type == fs_info[i].magic) return fs_info[i].name; } return "filesystem"; +#else + /* Those magic numbers don't work on FreeBSD. + OTOH, the statfs struct on that platform + has a convenient filesystem name in cleartext. */ + return status->f_fstypename; +#endif } void @@ -817,11 +828,11 @@ if (hiddenfiles) { printf("\n%s in %ld%s+%ld%s files - %s: %s%s kB used (%02.0f%%), %s%s kB free\n", bytes_total_string, - counter, COLOR_GREY_CODE, hiddenfiles, COLOR_WHITE_CODE, get_filesystem(status), + counter, COLOR_GREY_CODE, hiddenfiles, COLOR_WHITE_CODE, get_filesystem(&status), bytes_used_string, COLOR_WHITE_CODE, percent, bytes_free_string, COLOR_WHITE_CODE); } else { printf("\n%s in %ld files - %s: %s%s kB used (%02.0f%%), %s%s kB free\n", bytes_total_string, counter, - get_filesystem(status), bytes_used_string, COLOR_WHITE_CODE, percent, bytes_free_string, + get_filesystem(&status), bytes_used_string, COLOR_WHITE_CODE, percent, bytes_free_string, COLOR_WHITE_CODE); } -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com
_______________________________________________ gobolinux-devel mailing list gobolinux-devel@lists.gobolinux.org http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel