chiark / gitweb /
Parse "timeout=0" as infinity in various generators (#6264)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 3 Jul 2017 12:29:32 +0000 (08:29 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:53 +0000 (09:46 +0200)
commit73760c099f5abdd636723d44d108165defc2ed09
tree065681d2936469ac982506501be59bc85bb62248
parent2f4b99eec00077890bc6b247aa8630fb42eb698e
Parse "timeout=0" as infinity in various generators (#6264)

This extends 2d79a0bbb9f651656384a0a86ed814e6306fb5dd to the kernel
command line parsing.

The parsing is changed a bit to only understand "0" as infinity. If units are
specified, parse normally, e.g. "0s" is just 0. This makes it possible to
provide a zero timeout if necessary.

Simple test is added.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1462378.
src/basic/time-util.c
src/basic/time-util.h