When changing entries skip those that do not match the -L option.

Should fix PR 53668.
This commit is contained in:
mlelstv 2018-10-14 20:10:49 +00:00
parent 23c6352399
commit a66cbab44c
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@
__FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
#endif
#ifdef __RCSID
__RCSID("$NetBSD: gpt.c,v 1.75 2018/07/03 03:41:23 jnemeth Exp $");
__RCSID("$NetBSD: gpt.c,v 1.76 2018/10/14 20:10:49 mlelstv Exp $");
#endif
#include <sys/param.h>
@ -1043,7 +1043,7 @@ gpt_change_ent(gpt_t gpt, const struct gpt_find *find,
utf16_to_utf8(ent->ent_name,
__arraycount(ent->ent_name),
utfbuf, __arraycount(utfbuf));
if (strcmp((char *)find->label, (char *)utfbuf) == 0)
if (strcmp((char *)find->label, (char *)utfbuf) != 0)
continue;
}