diff --git a/usr.sbin/sysinst/disks.c b/usr.sbin/sysinst/disks.c index 8450331d9640..1bd4d51c36c2 100644 --- a/usr.sbin/sysinst/disks.c +++ b/usr.sbin/sysinst/disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.63 2020/02/06 10:42:06 martin Exp $ */ +/* $NetBSD: disks.c,v 1.64 2020/02/06 16:28:10 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1520,6 +1520,16 @@ process_found_fs(struct data *list, size_t num, const struct lookfor *item, if (strcmp(item->head, name_prefix) == 0) { /* this fstab entry uses NAME= syntax */ + + /* unescape */ + char *src, *dst; + for (src = list[0].u.s_val, dst =src; src[0] != 0; ) { + if (src[0] == '\\' && src[1] != 0) + src++; + *dst++ = *src++; + } + *dst = 0; + if (!find_part_by_name(list[0].u.s_val, &parts, &pno) || parts == NULL || pno == NO_PART) return 0; diff --git a/usr.sbin/sysinst/txtwalk.c b/usr.sbin/sysinst/txtwalk.c index 5081a2b09a2c..c481e09fab6c 100644 --- a/usr.sbin/sysinst/txtwalk.c +++ b/usr.sbin/sysinst/txtwalk.c @@ -1,4 +1,4 @@ -/* $NetBSD: txtwalk.c,v 1.2 2019/08/07 10:08:04 martin Exp $ */ +/* $NetBSD: txtwalk.c,v 1.3 2020/02/06 16:28:10 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -239,9 +239,14 @@ finddata(const struct lookfor *item, char *line, struct data *found, size_t *num break; case 's': /* Matches a 'space' separated string. */ len = 0; - while (line[len] && !isspace((unsigned char)line[len]) - && line[len] != fmt[1]) + while (line[len] + && !isspace((unsigned char)line[len]) + && line[len] != fmt[1]) { + if (line[len] == '\\' + && line[len] != 0) + len++; len++; + } found[*numfound].what = STR; found[(*numfound)++].u.s_val = line; line[len] = 0;