~jkaivo/deonebook

dbd1640b9f41dd0699e5ac09df6f0b1f2a607bdb — Jakob Kaivo 1 year, 8 months ago 5c47d31
fail if the device isn't an mmcblk device
1 files changed, 6 insertions(+), 0 deletions(-)

M deonebook.c
M deonebook.c => deonebook.c +6 -0
@@ 1,4 1,5 @@
#define _XOPEN_SOURCE 700
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include "deonebook.h"


@@ 36,6 37,11 @@ int main(int argc, char *argv[])
			if (optind < argc) {
				device = argv[optind];
			}
			if (strstr(device, "mmcblk") != device) {
				fprintf(stderr, "device must be an mmcblk device\n");
				return 1;
			}

			key = genkey(device);
		}