sheepfs: fix sdhost

"localshot" isn't recognized anymore by dog. We have to specify numeric letters.

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Tested-by: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
debian: speedup 'make deb'

Use 'timesize' instead of md5 will speed up the packaging a lot.
Alsl add --parallel for dh_auto_build so that we can specify
DEB_BUILD_OPTIONS=parallel=number to parallelize buliding as following:

$ DEB_BUILD_OPTIONS=parallel=8 make deb

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: add '\n' after formatting message

Log formatters may truncate the given Log message when there is not an
enough buffer space.  '\n' should be added after the log messages are
formatted.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
logger: add str_len to logmsg structure

This removes redundant strlen() calls.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
logger: add format_thread_name()

This prepares for the next patch.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
logger: simplify formatters

Calling a lot of snprintf() is not clean and makes the codes difficult
to read.  This reduces the number of snprintf() calls and simplifies
logger a bit.

This also fixes the problem that json formatter causes a buffer
overflow when there is not enough buffer space.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
logger: check the return value of vsnprintf

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
logger: remove redundant memset

In formmaters, we don't use strlen() against the given buffer now.  No
need to initialize them with zero any more.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
logger: show log priority in sheep.log

This helps us to find important log messages from sheep.log.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
plain_store: use lower log priority when sha1 not cached

This is actually not an error.  sd_debug() is more appropriate.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
recovery: fix log priority and output

This is not an error.  sd_info() is better.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
rename collie as dog

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
symlink dog to collie for compatibility

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
fix 'make rpm'

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
man: add script/gen_man.pl to generate manuals

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
man: print detailed usage for sheep if available

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheepfs: check 'dog' command at startup

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
script: auto-generate bash_completion_dog

The current bash_completion_dog is too out-of-date.  Rather than
updating the file, this patch adds a perl script to auto-generate the
file from dog help information like man/collie.8.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Makefile: remove zk_control from install programs

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
tests/func: add sheepfs test

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>