On Wed, Jul 23, 2014 at 01:43:48PM -0400, Dave Reisner wrote: > > + char *table = "%6s %12s %10s %10s %4s %4s \n"; > > + printf(table, "NAME","DISKSIZE","ORIG","COMPRES","ALG","THR"); > > Not really extensible. You really ought to adopt the style used in utils > like lsblk or findmnt to make this dynamic. Dave is talking about libsmartcols, see losetup.c: show_table(), it's probably the most simple example for the same thing like zramctl. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html