tools/smaz: basic adaptation to use the generic framework