Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst Deal with missing labels when parsing gpt(8...



details:   https://anonhg.NetBSD.org/src/rev/40054ec2ab04
branches:  trunk
changeset: 458601:40054ec2ab04
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 02 10:44:22 2019 +0000

description:
Deal with missing labels when parsing gpt(8) output.

diffstat:

 usr.sbin/sysinst/gpt.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r f7c879f68b8d -r 40054ec2ab04 usr.sbin/sysinst/gpt.c
--- a/usr.sbin/sysinst/gpt.c    Fri Aug 02 10:34:39 2019 +0000
+++ b/usr.sbin/sysinst/gpt.c    Fri Aug 02 10:44:22 2019 +0000
@@ -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 @@
        } 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;
 



Home | Main Index | Thread Index | Old Index