Skip to content

Commit

Permalink
print device in case of writing error
Browse files Browse the repository at this point in the history
  • Loading branch information
embetrix committed Dec 19, 2024
1 parent f676ce5 commit 0051c59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bmap-writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ int main(int argc, const char *argv[]) {

std::cout << "Starting bmap writer..." << std::endl;
if (isDeviceMounted(device)) {
std::cerr << "Error: Device " << device << " is mounted. Please unmount it before proceeding." << std::endl;
std::cerr << "Error device: " << device << " is mounted. Please unmount it before proceeding." << std::endl;
return 1;
}
auto start = std::chrono::high_resolution_clock::now();
Expand All @@ -288,7 +288,7 @@ int main(int argc, const char *argv[]) {
}
int ret = BmapWriteImage(imageFile, bmap, device);
if (ret != 0) {
std::cerr << "Failed to write image to device" << std::endl;
std::cerr << "Failed to write image to device: " << device << std::endl;
return ret;
}
auto end = std::chrono::high_resolution_clock::now();
Expand Down

0 comments on commit 0051c59

Please sign in to comment.