mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-09-16 17:03:11 +00:00
Add device name to prompt composition
Include device name in prompt composition. Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
@@ -350,10 +350,11 @@ static void prompt_set(void) {
|
||||
}
|
||||
|
||||
static void prompt_compose(char *buf, size_t buflen, const char *promptctx, const char *promptdev, const char *promptnet, bool no_newline) {
|
||||
const char *dev_name = IfPm5() ? "pm5" : "pm3";
|
||||
if (no_newline) {
|
||||
snprintf(buf, buflen - 1, PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx);
|
||||
snprintf(buf, buflen - 1, PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx, dev_name);
|
||||
} else {
|
||||
snprintf(buf, buflen - 1, _CLR_LINE_ "\r" PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx);
|
||||
snprintf(buf, buflen - 1, _CLR_LINE_ "\r" PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx, dev_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user