commit - 90af0b19bab6346d8472d5e126d8690192e36220
commit + 9e17834c0d040591851629431cdc9abe95c49684
blob - 205cfc95c537fb5a7a99457d1abc1f8ffb106f3c
blob + c3fa0c95669d9d9974a25e3091ec8a5b9af914cf
--- shreddisk.c
+++ shreddisk.c
#include <ctype.h>
#include <err.h>
#include <fcntl.h>
+#include <math.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
}
sh_time = time(NULL);
- if (percent < 100)
- printf("\n\nDisk appears to have been removed.\n"
- "Finished shredding %s\n", ctime(&sh_time));
- else
- printf("\n\nFinished shredding %s\n", ctime(&sh_time));
+ if (round(percent) < 100)
+ printf("\n\nDisk appears to have been removed.");
+ printf("\n\nFinished shredding %s\n", ctime(&sh_time));
+
fclose(dd);
/* re-enable cursor on finish */