[illumos-Developer] BEADM [WEBREV] 418 replace beadm by tbeadm with gettext support

Albert Lee trisk at opensolaris.org
Thu Dec 9 22:28:48 PST 2010


Is this able to use the existing translations for the Python version,
or does it use the tbeadm messages? The usage message still says
"tbeadm" on the first line.

be_command_tbl probably should use array syntax in run_be_cmd, even.

usage() in main on line 263 is called before setlocale(), etc. Maybe
the argc check should just be moved to run_be_cmd.

The strftime calls on 492, 548 and 622 can exceed the target array bounds.

A literal "6" is used to refer to the col_info array size in many
places, I would suggest a #define or a sizeof(cols)/sizeof(col_info).
cols should be indexed using array syntax instead of "cols + i".

Why does line 868 use a new variable instead of snap_name as  in 852?
snap_name is guaranteed to be NULL at that point.

Is ZFS_MAXNAMELEN+32 the actual maximum length for a  concatenated BE
and snapshot name?

Is there a consistent distinction between printing to stderr and
stdout? I see a lot of printf()s for error messages.

snprintf(), malloc(), and retry on 1408 could be replaced with asprintf().

-Albert



More information about the Developer mailing list