From: okuji Date: Fri, 27 Oct 2000 10:28:54 +0000 (+0000) Subject: skip empty lines in a device map file. X-Git-Tag: 0.6.96~380 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ac0d65e2e75baa71d79cc87b49ee22a9c2dff3b;p=thirdparty%2Fgrub.git skip empty lines in a device map file. --- diff --git a/ChangeLog b/ChangeLog index 71efa7943..0bfc6521c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-10-27 OKUJI Yoshinori + + * lib/device.c (read_device_map): Don't parse a line, if it is + empty. Reported by Holger Bauer . + 2000-10-25 Jochen Hoenicke * stage2/builtins.c (md5crypt_func): Use all bits of currticks () diff --git a/lib/device.c b/lib/device.c index ef993f569..24c99b3fe 100644 --- a/lib/device.c +++ b/lib/device.c @@ -370,6 +370,10 @@ read_device_map (FILE *fp, char **map, const char *map_file) /* Skip leading spaces. */ while (*ptr && isspace (*ptr)) ptr++; + + /* Skip empty lines. */ + if (! *ptr) + continue; if (*ptr != '(') {