Skip to content

Commit

Permalink
fw-update: vc compilation issue try2
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Perchanov <[email protected]>
  • Loading branch information
dmipx committed May 28, 2024
1 parent 6d2eebd commit c0472cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fw-update/fw-update-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <thread>
#include <string>
#include <regex>
#include <iostream>
#include <fstream>

#define DEFAULT_TIMEOUT 100
#define FW_UPDATE_INTERFACE_NUMBER 0
Expand Down Expand Up @@ -189,7 +189,7 @@ namespace librealsense
, _product_line( product_line )
, _serial_number( mipi_device->get_info().serial_number )
{
std::ifstream fw_path_in_device(_physical_port);
std::ifstream fw_path_in_device(_physical_port.c_str());
if (!fw_path_in_device)
{
throw std::runtime_error("Firmware Update failed - wrong path or permissions missing");
Expand Down Expand Up @@ -306,7 +306,7 @@ namespace librealsense
throw librealsense::invalid_value_exception("Device: " + get_serial_number() + " failed to update firmware\nImage is unsupported for this device or corrupted");
// Write signed firmware to appropriate file descriptor

std::ofstream fw_path_in_device(_physical_port, std::ios::binary);
std::ofstream fw_path_in_device(_physical_port.c_str(), std::ios::binary);
if (!fw_path_in_device)
{
throw std::runtime_error("Firmware Update failed - wrong path or permissions missing");
Expand Down

0 comments on commit c0472cc

Please sign in to comment.