Skip to content

Commit

Permalink
egk-tool: fixed reading relative files
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Sep 21, 2023
1 parent 8fd6fc8 commit 1ae3093
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/egk-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ main (int argc, char **argv)
goto err;

if (cmdline.pd_flag
&& read_file(card, "D001", &data, &data_len)
&& read_file(card, "iD001", &data, &data_len)
&& data_len >= 2) {
size_t len_pd = (data[0] << 8) | data[1];

Expand All @@ -195,7 +195,7 @@ main (int argc, char **argv)
}

if ((cmdline.vd_flag || cmdline.gvd_flag)
&& read_file(card, "D002", &data, &data_len)
&& read_file(card, "iD002", &data, &data_len)
&& data_len >= 8) {
size_t off_vd = (data[0] << 8) | data[1];
size_t end_vd = (data[2] << 8) | data[3];
Expand Down Expand Up @@ -230,7 +230,7 @@ main (int argc, char **argv)
}

if (cmdline.vsd_status_flag
&& read_file(card, "D00C", &data, &data_len)
&& read_file(card, "iD00C", &data, &data_len)
&& data_len >= 25) {
char *status;
unsigned int major, minor, fix;
Expand Down

0 comments on commit 1ae3093

Please sign in to comment.