diff options
Diffstat (limited to 'cgpt/cgpt_legacy.c')
-rw-r--r-- | cgpt/cgpt_legacy.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cgpt/cgpt_legacy.c b/cgpt/cgpt_legacy.c index 932fbb92..e736bd4c 100644 --- a/cgpt/cgpt_legacy.c +++ b/cgpt/cgpt_legacy.c @@ -18,6 +18,13 @@ int CgptLegacy(CgptLegacyParams *params) { if (CGPT_OK != DriveOpen(params->drive_name, &drive, O_RDWR)) return CGPT_FAILED; + if (drive.is_mtd) { + // This command requires GPT mode. + Error("'legacy' command unsupported in MTD mode\n"); + DriveClose(&drive, 0); + return CGPT_FAILED; + } + h1 = (GptHeader *)drive.gpt.primary_header; h2 = (GptHeader *)drive.gpt.secondary_header; if (params->efipart) { |