Commit a4d944e2 authored by cRTrn13's avatar cRTrn13

device_path now uses strdup(). Various debug text changes.

parent 8014175c
......@@ -22,7 +22,7 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
BLURAY *bd = calloc(1, sizeof(BLURAY));
if (device_path) {
strncpy(bd->device_path, device_path, 100);
bd->device_path = strdup(device_path);
bd->aacs = NULL;
bd->h_libaacs = NULL;
......@@ -50,14 +50,14 @@ BLURAY *bd_open(const char* device_path, const char* keyfile_path)
}
}
} else {
DEBUG(DBG_BLURAY, "libbdplus not present!\n");
DEBUG(DBG_BLURAY, "libbdplus not found!\n");
}
} else {
DEBUG(DBG_BLURAY | DBG_CRIT, "libaacs failed to initialize! If this disc is encrypted, you will not be able to play it.\n");
DEBUG(DBG_BLURAY | DBG_CRIT, "libaacs failed to initialize! If this disc is encrypted, you will not be able to play it\n");
}
}
} else {
DEBUG(DBG_BLURAY, "libaacs not present!\n");
DEBUG(DBG_BLURAY, "libaacs not found!\n");
}
} else {
DEBUG(DBG_BLURAY | DBG_CRIT, "No keyfile provided. You will not be able to make use of crypto functionality (0x%08x)\n", bd);
......@@ -99,6 +99,8 @@ void bd_close(BLURAY *bd)
file_close(bd->fp);
}
X_FREE(bd->device_path);
DEBUG(DBG_BLURAY, "BLURAY destroyed! (0x%08x)\n", bd);
X_FREE(bd);
......
......@@ -12,7 +12,7 @@ typedef void* (*fptr_p_void)();
typedef struct bluray BLURAY;
struct bluray {
char device_path[100];
char *device_path;
FILE_H *fp;
uint64_t s_size;
uint64_t s_pos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment