depmod: Allow empty modules.dep file creation
commitdba7dd5a44ca00b230c5af55c5cc0f960d299a99
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Wed, 4 Feb 2009 07:19:12 +0000 (4 02:19 -0500)
committerJon Masters <jcm@jonmasters.org>
Wed, 4 Feb 2009 07:19:12 +0000 (4 02:19 -0500)
tree9801f806c41a2787eb9601e9340dc272de5adea7
parentb645fd7177818abcc6f4df76e5bfd97acce261a7
depmod: Allow empty modules.dep file creation

Commit c0aa5cd6b7c24345ba39a0082989b784d5d0d24a fixed the file
truncation bug but also introduced a new problem: it doesn't
allow the creation of an empty modules.dep file.

The right fix is to only forbid the truncation when modules have
been specified in the command-line.

Thanks to Alan Jenkins for noticing this.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
depmod.c