~emersion/drmdb

b696ee7c3fe8871129890ba0ed74f105d70f9d28 — Simon Ser 4 months ago 08eb22b
Don't print zero version date

virtio doesn't set a version date, no point in printing zero.
Additionally the version date is deprecated:
https://lore.kernel.org/all/20240510090951.3398882-1-jani.nikula@intel.com/
1 files changed, 5 insertions(+), 1 deletions(-)

M drmtree/drmtree.go
M drmtree/drmtree.go => drmtree/drmtree.go +5 -1
@@ 20,7 20,11 @@ type DriverVersion struct {
}

func (ver DriverVersion) String() string {
	return fmt.Sprintf("%v.%v.%v (%v)", ver.Major, ver.Minor, ver.Patch, ver.Date)
	s := fmt.Sprintf("%v.%v.%v", ver.Major, ver.Minor, ver.Patch)
	if ver.Date != "" && ver.Date != "0" {
		s += " " + ver.Date
	}
	return s
}

func (ver *DriverVersion) Less(other *DriverVersion) bool {