From 1557ef280d373c3c8ffef36bbecd9ca637bc9a91 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 15 Sep 2009 16:21:16 +0200 Subject: [PATCH] installer: Small fix for the /dev/serno changes. Protect against the case where a /dev/serno/ directory exists but the disk we want to install to doesn't have a node in it. --- usr.sbin/installer/libinstaller/survey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/installer/libinstaller/survey.c b/usr.sbin/installer/libinstaller/survey.c index 140cffa09a..95bae98fcf 100644 --- a/usr.sbin/installer/libinstaller/survey.c +++ b/usr.sbin/installer/libinstaller/survey.c @@ -292,7 +292,7 @@ survey_storage(struct i_fn_args *a) } } else if (strcmp(line, "@SERNO") == 0) { fgets_chomp(line, 255, f); - if (strcmp(line, "@END") != 0) + if (line[0] != '\0' && strcmp(line, "@END") != 0) disk_set_serno(d, line); } else if (strcmp(line, "@SLICES") == 0) { int cyl, hd, sec; -- 2.11.4.GIT