Matthew Ahrens
2013-08-26 03:29:10 UTC
Yuri, sorry this slipped off of my radar. I have just a few comments on
this code:
zfs_main.c:
235, 293, 297: thanks for fixing this. It looks like the convention is "\t
" (a tab + 4 spaces) for continuation lines (e.g. list, get, allow).
Could you use that here?
2840, 2913: why should we always left-justify when -p (literal) is
specified? I noticed that "zfs get" always left-justifies, even without
-p. But right-justified is easier to read, and it seems like if you're
going to parse the output then you'd use -H so that the columns are
tab-separated.
--matt
illumos-developer
Archives: https://www.listbox.com/member/archive/182179/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182179/21175072-86d49504
Modify Your Subscription: https://www.listbox.com/member/?member_id=21175072&id_secret=21175072-abdf7b7e
Powered by Listbox: http://www.listbox.com
this code:
zfs_main.c:
235, 293, 297: thanks for fixing this. It looks like the convention is "\t
" (a tab + 4 spaces) for continuation lines (e.g. list, get, allow).
Could you use that here?
2840, 2913: why should we always left-justify when -p (literal) is
specified? I noticed that "zfs get" always left-justifies, even without
-p. But right-justified is easier to read, and it seems like if you're
going to parse the output then you'd use -H so that the columns are
tab-separated.
--matt
Hi,
https://illumos.org/issues/**2583 <https://illumos.org/issues/2583>
https://www.xvoid.org/illumos/**webrev/il-2583/<https://www.xvoid.org/illumos/webrev/il-2583/>
This adds -p (parsable) option to zfs list, displaying parseable values
instead of human-readable ones. The difference from Joyent's implementation
and the one I posted for review about an year ago (sigh) is that this
phoenix:yuri:~/ws/il-2583$ LD_PRELOAD=~/ws/il-2583/proto/**root_i386/lib/libzfs.so.1
~/ws/il-2583/usr/src/cmd/zfs/**zfs list -p
NAME USED AVAIL REFER MOUNTPOINT
rpool 64063774720 70170730496 48128 /rpool
rpool/ROOT 17284885504 70170730496 31744 legacy
rpool/ROOT/il-3105 4318720 70170730496 4586279936/tmp/onu.fuaiEF
rpool/ROOT/il-3506 7000576 70170730496 6143191040/tmp/onu.LQapCV
rpool/ROOT/il-3530 7362560 70170730496 6143555584/tmp/onu.ZcqZgQ
rpool/ROOT/il-3530-backup-1 82944 70170730496 6140741120 /
rpool/ROOT/il-man 11073024 70170730496 6142300672/tmp/onu..dGZl2
rpool/ROOT/il-man-1 6889472 70170730496 12581827584 /
rpool/ROOT/il-xen-hvm 5597184 70170730496 12592677376
/tmp/onu.PQGpjq
rpool/ROOT/il-xen-hvm-1 17238568960 70170730496 12582631936
/tmp/onu.VwaEkg
rpool/ROOT/openindiana 3960320 70170730496 4535514624 /
rpool/dump 4295544832 70170730496 4295544832 -
rpool/export 35678348288 70170730496 32768 /export
rpool/export/home 35678315520 70170730496 32768 /export/home
rpool/export/home/yuri 35678282752 70170730496 35678282752
/export/home/yuri
rpool/smb 34816 70170730496 34816 /share/smb
rpool/swap 4565762048 74596788224 139704320 -
rpool/wcd 1107820544 71278534656 16384 -
rpool/wce 1107820544 71278534656 16384 -
------------------------------**-------------
illumos-developer
Archives: https://www.listbox.com/**member/archive/182179/=now<https://www.listbox.com/member/archive/182179/=now>
RSS Feed: https://www.listbox.com/**member/archive/rss/182179/**
21175174-cd73734d<https://www.listbox.com/member/archive/rss/182179/21175174-cd73734d>
Modify Your Subscription: https://www.listbox.com/**
member/?&id_**secret=21175174-792643f6<https://www.listbox.com/member/?&>
Powered by Listbox: http://www.listbox.com
-------------------------------------------https://illumos.org/issues/**2583 <https://illumos.org/issues/2583>
https://www.xvoid.org/illumos/**webrev/il-2583/<https://www.xvoid.org/illumos/webrev/il-2583/>
This adds -p (parsable) option to zfs list, displaying parseable values
instead of human-readable ones. The difference from Joyent's implementation
and the one I posted for review about an year ago (sigh) is that this
phoenix:yuri:~/ws/il-2583$ LD_PRELOAD=~/ws/il-2583/proto/**root_i386/lib/libzfs.so.1
~/ws/il-2583/usr/src/cmd/zfs/**zfs list -p
NAME USED AVAIL REFER MOUNTPOINT
rpool 64063774720 70170730496 48128 /rpool
rpool/ROOT 17284885504 70170730496 31744 legacy
rpool/ROOT/il-3105 4318720 70170730496 4586279936/tmp/onu.fuaiEF
rpool/ROOT/il-3506 7000576 70170730496 6143191040/tmp/onu.LQapCV
rpool/ROOT/il-3530 7362560 70170730496 6143555584/tmp/onu.ZcqZgQ
rpool/ROOT/il-3530-backup-1 82944 70170730496 6140741120 /
rpool/ROOT/il-man 11073024 70170730496 6142300672/tmp/onu..dGZl2
rpool/ROOT/il-man-1 6889472 70170730496 12581827584 /
rpool/ROOT/il-xen-hvm 5597184 70170730496 12592677376
/tmp/onu.PQGpjq
rpool/ROOT/il-xen-hvm-1 17238568960 70170730496 12582631936
/tmp/onu.VwaEkg
rpool/ROOT/openindiana 3960320 70170730496 4535514624 /
rpool/dump 4295544832 70170730496 4295544832 -
rpool/export 35678348288 70170730496 32768 /export
rpool/export/home 35678315520 70170730496 32768 /export/home
rpool/export/home/yuri 35678282752 70170730496 35678282752
/export/home/yuri
rpool/smb 34816 70170730496 34816 /share/smb
rpool/swap 4565762048 74596788224 139704320 -
rpool/wcd 1107820544 71278534656 16384 -
rpool/wce 1107820544 71278534656 16384 -
------------------------------**-------------
illumos-developer
Archives: https://www.listbox.com/**member/archive/182179/=now<https://www.listbox.com/member/archive/182179/=now>
RSS Feed: https://www.listbox.com/**member/archive/rss/182179/**
21175174-cd73734d<https://www.listbox.com/member/archive/rss/182179/21175174-cd73734d>
Modify Your Subscription: https://www.listbox.com/**
member/?&id_**secret=21175174-792643f6<https://www.listbox.com/member/?&>
Powered by Listbox: http://www.listbox.com
illumos-developer
Archives: https://www.listbox.com/member/archive/182179/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182179/21175072-86d49504
Modify Your Subscription: https://www.listbox.com/member/?member_id=21175072&id_secret=21175072-abdf7b7e
Powered by Listbox: http://www.listbox.com