Fix sparse gcc-base-dir

The sparse has default value for the gcc's base directory when sparse
was compiled.  So, if gcc was updated, but sparse was not rebuilded,
sparse's default value may not work correctly.

So, this overwrites the base directory with current gcc.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix sparse for debian's multiarch include path

Debian patched gcc to add multiarch include path
(e.g. /usr/include/x86_64-linux-gnu).

We have to teach to sparse about this.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Don't use variable length array in clear_other_magic()

sparse warns about variable length array. And it is not good for
kernel debugging (outputs confusing asm).

For now, user is clear_other_magic() only. So, fix clear_other_magic().
If we want to this later, let's adjust sparse flags then.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix cleanup target for *.gcda, *.gcno, and *.orig

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Separate "coverage" target from "tests" target in Makefile

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix conflict of XATTR_CREATE/REPLACE and struct xattr

XATTR_CREATE/REPLACE and struct xattr are conflicting with kernel.
Don't use some sort of common name.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix usage of -m32 in Makefile

If arch is e.g. armv5tejl, we add -m32 to CFLAGS. But, actually, We
just want to use -m32 only if i686.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Add command line option parser to replace getopt

Signed-off-by: Daniel Phillips <daniel@phunq.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Suppress sparse warning for ptr-subtraction-blows

sparse warns if structure is not power-of-two, and using pointer
subtraction. This seems to be useless.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Convert tux3.c to new options parser

This adds help and usage autogenerate and other conveniences
Separate command line parsing from tux3 filesystem operations

Signed-off-by: Daniel Phillips <daniel@phunq.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix option parsing so per-command options can follow

Also fix the verbose option to be available globally, and per command.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Remove extra semi-colon after logline()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Support die() on other arch than x86

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix bufindex() on 32bits arch

On 32bits arch, we can't divide 64bits by 32bits. there are several
way to fix this though.

Best way would be pass "sb" to bufindex(), and use "sb->blockbits".
For now, this fixes by hack as minimal patch.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fix error handling in replay of btree

vol_getblk() and vol_bread() returns NULL on error.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cleanup INIT_DISKSB() usage

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
vtable-disable-for-now

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
atable-flush-fix

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
writeback-sort-inodes

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
cursor_redirect-alloc-order-fix

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>