From 98d6c751d3484b1a3d30cefaa692b4f993d81abd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 2 Apr 2021 14:30:13 -0500 Subject: [PATCH] Fix CardReader string args --- Marlin/src/sd/cardreader.cpp | 6 +++--- Marlin/src/sd/cardreader.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 225f7d9a95..c9668bf8a8 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -515,7 +515,7 @@ void CardReader::endFilePrint(TERN_(SD_RESORT, const bool re_sort/*=false*/)) { TERN_(SD_RESORT, if (re_sort) presort()); } -void CardReader::openLogFile(char * const path) { +void CardReader::openLogFile(const char * const path) { flag.logging = DISABLED(SDCARD_READONLY); IF_DISABLED(SDCARD_READONLY, openFileWrite(path)); } @@ -634,7 +634,7 @@ inline void echo_write_to_file(const char * const fname) { // // Open a file by DOS path for write // -void CardReader::openFileWrite(char * const path) { +void CardReader::openFileWrite(const char * const path) { if (!isMounted()) return; announceOpen(2, path); @@ -722,7 +722,7 @@ void CardReader::report_status() { SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING); } -void CardReader::write_command(char * const buf) { +void CardReader::write_command(const char * const buf) { char *begin = buf; char *npos = nullptr; char *end = buf + strlen(buf) - 1; diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 9528c4ac28..cf876ce9c7 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -91,8 +91,8 @@ public: static void manage_media(); // SD Card Logging - static void openLogFile(char * const path); - static void write_command(char * const buf); + static void openLogFile(const char * const path); + static void write_command(const char * const buf); #if DISABLED(NO_SD_AUTOSTART) // Auto-Start auto#.g file handling static uint8_t autofile_index; // Next auto#.g index to run, plus one. Ignored by autofile_check when zero. @@ -103,7 +103,7 @@ public: // Basic file ops static void openFileRead(char * const path, const uint8_t subcall=0); - static void openFileWrite(char * const path); + static void openFileWrite(const char * const path); static void closefile(const bool store_location=false); static bool fileExists(const char * const name); static void removeFile(const char * const name);