[OmniOS-discuss] zfs diff UTF-8 probrem

takashi ary takashiary at gmail.com
Wed Apr 30 15:01:44 UTC 2014


Hello,

When OmniOS fix illumos Bug #4448 ?
https://www.illumos.org/issues/4448


OmniOS r151008 behavior

root at omnios1:~# uname -v
omnios-6de5e81
root at omnios1:~#
root at omnios1:~# zfs diff -HF tank at test
M       /       /tank/
+       F       /tank/abcd\37777777703\37777777651fg
root at omnios1:~#


I tried to patch from zfsonlinux.
https://github.com/zfsonlinux/zfs/issues/1172

root at omnios1:~# ls -l /root/zfsdiff/lib
total 201
lrwxrwxrwx 1 root root     11 Apr 30 16:17 libzfs.so -> libzfs.so.1
-rwxr-xr-x 1 root bin  324932 Apr 28 20:29 libzfs.so.1
root at omnios1:~#
root at omnios1:~# LD_LIBRARY_PATH=/root/zfsdiff/lib zfs diff -HF tank at test
M       /       /tank/
+       F       /tank/abcd\303\251fg
root at omnios1:~#


I created a wrapper script.

root at omnios1:~# cat /root/zfsdiff/zfsdiff.sh
#!/bin/bash

LIBZFS_DIR=/root/zfsdiff/lib

LD_LIBRARY_PATH=$LIBZFS_DIR zfs diff $* | awk '{cmd = "printf \"a" $0
"\""; cmd | getline line; close(cmd); sub(/^a/,"",line); print line}'
root at omnios1:~#
root at omnios1:~# /root/zfsdiff/zfsdiff.sh -HF tank at test
M       /       /tank/
+       F       /tank/abcdéfg
root at omnios1:~#


Thanks


More information about the OmniOS-discuss mailing list