Module Name: src
Committed By: martin
Date: Fri Aug 2 10:44:22 UTC 2019
Modified Files:
src/usr.sbin/sysinst: gpt.c
Log Message:
Deal with missing labels when parsing gpt(8) output.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/gpt.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/gpt.c
diff -u src/usr.sbin/sysinst/gpt.c:1.6 src/usr.sbin/sysinst/gpt.c:1.7
--- src/usr.sbin/sysinst/gpt.c:1.6 Sun Jul 28 16:30:36 2019
+++ src/usr.sbin/sysinst/gpt.c Fri Aug 2 10:44:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: gpt.c,v 1.6 2019/07/28 16:30:36 martin Exp $ */
+/* $NetBSD: gpt.c,v 1.7 2019/08/02 10:44:22 martin Exp $ */
/*
* Copyright 2018 The NetBSD Foundation, Inc.
@@ -212,8 +212,7 @@ gpt_add_info(struct gpt_part_entry *part
} else if (strcmp(tag, "GUID:") == 0) {
strlcpy(part->gp_id, val, sizeof(part->gp_id));
} else if (strcmp(tag, "Label:") == 0) {
- if (strlen(val) > 0)
- strlcpy(part->gp_label, val, sizeof(part->gp_label));
+ strlcpy(part->gp_label, val, sizeof(part->gp_label));
} else if (strcmp(tag, "Attributes:") == 0) {
char *n;