1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/report
Peter Rajnoha 125cd06698 conf: make time format configurable
Make it possible to define format for time that is displayed.
The way the format is defined is equal to the way that is used
for strftime function, although not all formatting options as
used in strftime are available for LVM2 - the set is restricted
(e.g. we do not allow newline to be printed). The lvm.conf
comments contain the whole list that LVM2 accepts for time format
together with brief description (copied from strftime man page).

For example:
(defaults used - the format is the same as used before this patch)
$ lvs -o+time vg/lvol0 vg/lvol1
  LV    VG   Attr       LSize Time
  lvol0 vg   -wi-a----- 4.00m 2015-06-25 16:18:34 +0200
  lvol1 vg   -wi-a----- 4.00m 2015-06-29 09:17:11 +0200

(using 'time_format = "@%s"' in lvm.conf - number of seconds
since the Epoch)
$ lvs -o+time vg/lvol0 vg/lvol1
  LV    VG   Attr       LSize Time
  lvol0 vg   -wi-a----- 4.00m @1435241914
  lvol1 vg   -wi-a----- 4.00m @1435562231
2015-06-29 14:30:35 +02:00
..
columns-devtypes.h reporting: Add devtypes command. 2013-09-18 01:09:15 +01:00
columns.h lvm2app: Add signed numerical property values 2015-05-06 08:51:04 -05:00
properties.c conf: make time format configurable 2015-06-29 14:30:35 +02:00
properties.h report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
report.c conf: make time format configurable 2015-06-29 14:30:35 +02:00
report.h cleanup: replace static struct processing_handle initializer with common init_processing_handle 2015-02-13 11:26:57 +01:00
values.h select: fix matching reserved values while <,<=,>,>= is used in selection criteria 2015-04-24 09:48:57 +02:00