Browse Source

Fix CardReader string args

Scott Lahteine 4 years ago
parent
commit
98d6c751d3
2 changed files with 6 additions and 6 deletions
  1. 3
    3
      Marlin/src/sd/cardreader.cpp
  2. 3
    3
      Marlin/src/sd/cardreader.h

+ 3
- 3
Marlin/src/sd/cardreader.cpp View File

@@ -515,7 +515,7 @@ void CardReader::endFilePrint(TERN_(SD_RESORT, const bool re_sort/*=false*/)) {
515 515
   TERN_(SD_RESORT, if (re_sort) presort());
516 516
 }
517 517
 
518
-void CardReader::openLogFile(char * const path) {
518
+void CardReader::openLogFile(const char * const path) {
519 519
   flag.logging = DISABLED(SDCARD_READONLY);
520 520
   IF_DISABLED(SDCARD_READONLY, openFileWrite(path));
521 521
 }
@@ -634,7 +634,7 @@ inline void echo_write_to_file(const char * const fname) {
634 634
 //
635 635
 // Open a file by DOS path for write
636 636
 //
637
-void CardReader::openFileWrite(char * const path) {
637
+void CardReader::openFileWrite(const char * const path) {
638 638
   if (!isMounted()) return;
639 639
 
640 640
   announceOpen(2, path);
@@ -722,7 +722,7 @@ void CardReader::report_status() {
722 722
     SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING);
723 723
 }
724 724
 
725
-void CardReader::write_command(char * const buf) {
725
+void CardReader::write_command(const char * const buf) {
726 726
   char *begin = buf;
727 727
   char *npos = nullptr;
728 728
   char *end = buf + strlen(buf) - 1;

+ 3
- 3
Marlin/src/sd/cardreader.h View File

@@ -91,8 +91,8 @@ public:
91 91
   static void manage_media();
92 92
 
93 93
   // SD Card Logging
94
-  static void openLogFile(char * const path);
95
-  static void write_command(char * const buf);
94
+  static void openLogFile(const char * const path);
95
+  static void write_command(const char * const buf);
96 96
 
97 97
   #if DISABLED(NO_SD_AUTOSTART)     // Auto-Start auto#.g file handling
98 98
     static uint8_t autofile_index;  // Next auto#.g index to run, plus one. Ignored by autofile_check when zero.
@@ -103,7 +103,7 @@ public:
103 103
 
104 104
   // Basic file ops
105 105
   static void openFileRead(char * const path, const uint8_t subcall=0);
106
-  static void openFileWrite(char * const path);
106
+  static void openFileWrite(const char * const path);
107 107
   static void closefile(const bool store_location=false);
108 108
   static bool fileExists(const char * const name);
109 109
   static void removeFile(const char * const name);

Loading…
Cancel
Save