+static BYTE cr_for_slot[3] = {0xff, 0x30, 0x38};
+
+static int slot;
+
+static int ykn_parse_option(char *key, char *val)
+{
+ if (!strcmp(key, "slot")) {
+ if (!strcmp(val, "1")) {
+ slot = 1;
+ } else if (!strcmp(val, "2")) {
+ slot = 2;
+ } else {
+ return -1;
+ }
+ } else {
+ return -1;
+ }
+ return 0;
+}
+
+static DWORD ykn_check_atr_hb(BYTE *str, DWORD size)