Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Dec 30, 2024
1 parent 5a8cc01 commit e814810
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cpp/devices/daynaport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int DaynaPort::GetMessage(data_in_t buf)
// If we didn't receive anything, return size of 0
if (rx_packet_size <= 0) {
LogTrace("No network packet received");
auto *response = (scsi_resp_read_t*)buf.data();
auto *response = (ScsiRespRead*)buf.data();
response->length = 0;
response->flags = ReadDataFlagsType::NO_MORE_DATA;
return DAYNAPORT_READ_HEADER_SZ;
Expand Down
6 changes: 3 additions & 3 deletions cpp/devices/daynaport.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ class DaynaPort : public PrimaryDevice
DROPPED_PACKETS = 0xFFFFFFFF,
};

using scsi_resp_read_t = struct __attribute__((packed)) {
using ScsiRespRead = struct __attribute__((packed)) {
uint32_t length;
ReadDataFlagsType flags;
byte pad;
array<byte, ETH_FRAME_LEN + sizeof(uint32_t)> data; // Frame length + 4 byte CRC
};

using scsi_resp_link_stats_t = struct __attribute__((packed)) {
using ScsiRespLinkStats = struct __attribute__((packed)) {
array<byte, 6> mac_address;
uint32_t frame_alignment_errors;
uint32_t crc_errors;
uint32_t frames_lost;
};

static constexpr scsi_resp_link_stats_t SCSI_LINK_STATS = {
static constexpr ScsiRespLinkStats SCSI_LINK_STATS = {
// The last 3 bytes of this MAC address are replaced by those of the bridge interface
.mac_address = { byte { 0x00 }, byte { 0x80 }, byte { 0x19 }, byte { 0x10 }, byte { 0x98 }, byte { 0xe3 } },
.frame_alignment_errors = 0,
Expand Down
4 changes: 2 additions & 2 deletions cpp/devices/host_services.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ void HostServices::SetUpModePages(map<int, vector<byte>> &pages, int page, bool

void HostServices::AddRealtimeClockPage(map<int, vector<byte>> &pages, bool changeable) const
{
pages[32] = vector<byte>(sizeof(mode_page_datetime) + 2);
pages[32] = vector<byte>(sizeof(ModePageDateTime) + 2);

if (!changeable) {
const time_t &t = system_clock::to_time_t(system_clock::now());
tm localtime;
localtime_r(&t, &localtime);

mode_page_datetime datetime;
ModePageDateTime datetime;
datetime.major_version = 0x01;
datetime.minor_version = 0x00;
datetime.year = static_cast<uint8_t>(localtime.tm_year);
Expand Down
2 changes: 1 addition & 1 deletion cpp/devices/host_services.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class HostServices : public PrimaryDevice

private:

using mode_page_datetime = struct __attribute__((packed)) {
using ModePageDateTime = struct __attribute__((packed)) {
// Major and minor version of this data structure (e.g. 1.0)
uint8_t major_version;
uint8_t minor_version;
Expand Down
2 changes: 1 addition & 1 deletion cpp/s2psimh/s2psimh_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ vector<SimhMetaData> S2pSimh::ParseObject(const string &s)
return {};
}
else {
objects.push_back(SimhMetaData(static_cast<SimhClass>(c), static_cast<uint32_t>(v)));
objects.push_back(SimhMetaData( { static_cast<SimhClass>(c), static_cast<uint32_t>(v) }));
}
}

Expand Down

0 comments on commit e814810

Please sign in to comment.