blob: 07df54dd3ce1a8e8d892fa045ac078719e81d896 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
void random_data_linux(char sym_drive[16], bool random) {
char command[55];
if (random) {
sprintf(command, "dd if=/dev/urandom of=%s bs=1024 count=1024", sym_drive);
} else {
sprintf(command, "dd if=/dev/zero of=%s bs=1024 count=1024", sym_drive);
}
system(command);
}
|