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
   TERN_(SD_RESORT, if (re_sort) presort());
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
   flag.logging = DISABLED(SDCARD_READONLY);
519
   flag.logging = DISABLED(SDCARD_READONLY);
520
   IF_DISABLED(SDCARD_READONLY, openFileWrite(path));
520
   IF_DISABLED(SDCARD_READONLY, openFileWrite(path));
521
 }
521
 }
634
 //
634
 //
635
 // Open a file by DOS path for write
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
   if (!isMounted()) return;
638
   if (!isMounted()) return;
639
 
639
 
640
   announceOpen(2, path);
640
   announceOpen(2, path);
722
     SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING);
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
   char *begin = buf;
726
   char *begin = buf;
727
   char *npos = nullptr;
727
   char *npos = nullptr;
728
   char *end = buf + strlen(buf) - 1;
728
   char *end = buf + strlen(buf) - 1;

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

91
   static void manage_media();
91
   static void manage_media();
92
 
92
 
93
   // SD Card Logging
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
   #if DISABLED(NO_SD_AUTOSTART)     // Auto-Start auto#.g file handling
97
   #if DISABLED(NO_SD_AUTOSTART)     // Auto-Start auto#.g file handling
98
     static uint8_t autofile_index;  // Next auto#.g index to run, plus one. Ignored by autofile_check when zero.
98
     static uint8_t autofile_index;  // Next auto#.g index to run, plus one. Ignored by autofile_check when zero.
103
 
103
 
104
   // Basic file ops
104
   // Basic file ops
105
   static void openFileRead(char * const path, const uint8_t subcall=0);
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
   static void closefile(const bool store_location=false);
107
   static void closefile(const bool store_location=false);
108
   static bool fileExists(const char * const name);
108
   static bool fileExists(const char * const name);
109
   static void removeFile(const char * const name);
109
   static void removeFile(const char * const name);

Loading…
Cancel
Save