From e81cdd9f3794d2b4452ae2297c43e16e3faf6f6a Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 20 Jun 2006 10:01:43 +1000 Subject: Stop map_dev from returning [0:0] We sometimes need the NULL when major==minor==0. So make sure all callers of map_dev can cope with NULL. --- config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config.c') diff --git a/config.c b/config.c index 20dc725..157bdff 100644 --- a/config.c +++ b/config.c @@ -242,7 +242,8 @@ mddev_dev_t load_partitions(void) minor = strtoul(mp, NULL, 10); name = map_dev(major, minor, 1); - + if (!name) + continue; d = malloc(sizeof(*d)); d->devname = strdup(name); d->next = rv; -- cgit