to the original input. Just zap it for now.
No functional change.
-/* $OpenBSD: cmd.c,v 1.169 2023/03/25 15:58:44 krw Exp $ */
+/* $OpenBSD: cmd.c,v 1.170 2023/03/26 16:23:58 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
if (strlen(lbuf) == 0)
return dflt;
if (strcmp(lbuf, "?") == 0) {
- PRT_print_mbrmenu();
- continue;
+ PRT_print_mbrmenu(lbuf, sizeof(lbuf));
+ if (strlen(lbuf) == 0)
+ continue;
}
num = hex_octet(lbuf);
string_from_line(lbuf, sizeof(lbuf), TRIMMED);
if (strcmp(lbuf, "?") == 0) {
- PRT_print_gptmenu();
- continue;
+ PRT_print_gptmenu(lbuf, sizeof(lbuf));
+ if (strlen(lbuf) == 0)
+ continue;
} else if (strlen(lbuf) == 0) {
uuid = *olduuid;
goto done;
-/* $OpenBSD: part.c,v 1.138 2023/03/26 13:12:33 krw Exp $ */
+/* $OpenBSD: part.c,v 1.139 2023/03/26 16:23:58 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
}
void
-PRT_print_mbrmenu(void)
+PRT_print_mbrmenu(char *lbuf, size_t lbuflen)
{
unsigned int cidx, i, idrows;
mbr_types[cidx].mt_name);
printf("\n");
}
+
+ memset(lbuf, 0, lbuflen); /* Just continue. */
}
void
-PRT_print_gptmenu(void)
+PRT_print_gptmenu(char *lbuf, size_t lbuflen)
{
unsigned int cidx, i, idrows;
gpt_types[cidx].gt_name);
printf("\n");
}
+
+ memset(lbuf, 0, lbuflen); /* Just continue. */
}
void
-/* $OpenBSD: part.h,v 1.40 2023/03/25 15:58:44 krw Exp $ */
+/* $OpenBSD: part.h,v 1.41 2023/03/26 16:23:58 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
unsigned char prt_id;
};
-void PRT_print_mbrmenu(void);
-void PRT_print_gptmenu(void);
+void PRT_print_mbrmenu(char *, size_t);
+void PRT_print_gptmenu(char *, size_t);
void PRT_parse(const struct dos_partition *, const uint64_t,
const uint64_t, struct prt *);
void PRT_make(const struct prt *,const uint64_t, const uint64_t,