Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions libxenon/drivers/diskio/ata.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ xenon_ata_dumpinfo(struct xenon_ata_device *dev, char *info) {
printf(" * Firmware: %s\n", text);
strncpy(text, data + 54, 40);
text[40] = 0;
printf(" * Model: %s\n", text);
strncpy(dev->model, text, sizeof(dev->model));
printf(" * Model: %s\n", dev->model);

if (!dev->atapi) {
printf(" * Addressing mode: %d\n", dev->addressing_mode);
Expand Down Expand Up @@ -456,7 +457,8 @@ xenon_atapi_inquiry_model(struct xenon_ata_device *dev) {
};

buf[8 + 24] = '\0';
printf("ATAPI inquiry model: %s\n", &buf[8]);
strncpy(dev->model, &buf[8], sizeof(dev->model));
printf("ATAPI inquiry model: %s %d\n", dev->model);

return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions libxenon/drivers/diskio/ata.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ extern "C" {
struct bdev *bdev;

struct xenon_ata_dma_prd * prds;

char model[0x30];
};

struct xenon_atapi_read {
Expand Down
Loading