From 662fbf3db7cfd4f566a3e71253bfec93c701cf6e Mon Sep 17 00:00:00 2001 From: Michel Machado Date: Wed, 17 Dec 2014 09:00:22 -0500 Subject: [PATCH] f3probe: add a message after the last reset This message is supposed to help the user to avoid removing the drive after the last reset. After a sequence of manual resets, it's almost automatic to unplug the drive and lose all the save blocks; I've done it myself. --- f3probe.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/f3probe.c b/f3probe.c index 70d5dd3..b1d83fe 100644 --- a/f3probe.c +++ b/f3probe.c @@ -398,6 +398,13 @@ static int test_device(struct args *args) assert(!probe_device(dev, &real_size_byte, &announced_size_byte, &wrap, &block_order)); assert(!gettimeofday(&t2, NULL)); + + if (!args->debug && args->reset_type == RT_MANUAL_USB) { + printf("CAUTION\tCAUTION\tCAUTION\n"); + printf("No more resets are needed, so do not unplug the drive\n"); + fflush(stdout); + } + /* Keep free_device() as close of probe_device() as possible to * make sure that the written blocks are recovered when * @args->save is true.