Changeset View
Changeset View
Standalone View
Standalone View
head/sys/ddb/db_textdump.c
Show First 20 Lines • Show All 448 Lines • ▼ Show 20 Lines | if (di->mediasize < SIZEOF_METADATA + 2 * sizeof(kdh)) { | ||||
printf("Insufficient space on dump partition for minimal textdump.\n"); | printf("Insufficient space on dump partition for minimal textdump.\n"); | ||||
return; | return; | ||||
} | } | ||||
textdump_error = 0; | textdump_error = 0; | ||||
/* | /* | ||||
* Disable EKCD because we don't provide encrypted textdumps. | * Disable EKCD because we don't provide encrypted textdumps. | ||||
*/ | */ | ||||
kdc = di->kdc; | kdc = di->kdcrypto; | ||||
di->kdc = NULL; | di->kdcrypto = NULL; | ||||
/* | /* | ||||
* Position the start of the dump so that we'll write the kernel dump | * Position the start of the dump so that we'll write the kernel dump | ||||
* trailer immediately before the end of the partition, and then work | * trailer immediately before the end of the partition, and then work | ||||
* our way back. We will rewrite this header later to reflect the | * our way back. We will rewrite this header later to reflect the | ||||
* true size if things go well. | * true size if things go well. | ||||
*/ | */ | ||||
textdump_offset = di->mediasize - sizeof(kdh); | textdump_offset = di->mediasize - sizeof(kdh); | ||||
Show All 40 Lines | else if (textdump_error != 0) | ||||
printf("Textdump: Error %d writing dump\n", textdump_error); | printf("Textdump: Error %d writing dump\n", textdump_error); | ||||
else | else | ||||
printf("Textdump complete.\n"); | printf("Textdump complete.\n"); | ||||
textdump_pending = 0; | textdump_pending = 0; | ||||
/* | /* | ||||
* Restore EKCD status. | * Restore EKCD status. | ||||
*/ | */ | ||||
di->kdc = kdc; | di->kdcrypto = kdc; | ||||
} | } | ||||
/*- | /*- | ||||
* DDB(4) command to manage textdumps: | * DDB(4) command to manage textdumps: | ||||
* | * | ||||
* textdump set - request a textdump | * textdump set - request a textdump | ||||
* textdump status - print DDB output textdump status | * textdump status - print DDB output textdump status | ||||
* textdump unset - clear textdump request | * textdump unset - clear textdump request | ||||
Show All 40 Lines |