2626#include <ctype.h>
2727#include <errno.h>
2828
29- #ifdef ORBIS
30- #include <sys/fcntl.h>
31- #include <orbisFile.h>
32- #endif
3329#include <retro_miscellaneous.h>
3430#include <compat/strl.h>
3531#include <compat/posix_string.h>
@@ -1338,13 +1334,6 @@ bool config_file_write(config_file_t *conf, const char *path, bool sort)
13381334
13391335 if (!string_is_empty (path ))
13401336 {
1341- #ifdef ORBIS
1342- int fd = orbisOpen (path ,O_RDWR |O_CREAT ,0644 );
1343- if (fd < 0 )
1344- return false;
1345- config_file_dump_orbis (conf ,fd );
1346- orbisClose (fd );
1347- #else
13481337 void * buf = NULL ;
13491338 FILE * file = (FILE * )fopen_utf8 (path , "wb" );
13501339 if (!file )
@@ -1359,7 +1348,6 @@ bool config_file_write(config_file_t *conf, const char *path, bool sort)
13591348 fclose (file );
13601349 if (buf )
13611350 free (buf );
1362- #endif
13631351
13641352 /* Only update modified flag if config file
13651353 * is actually written to disk */
@@ -1371,53 +1359,6 @@ bool config_file_write(config_file_t *conf, const char *path, bool sort)
13711359 return true;
13721360}
13731361
1374- #ifdef ORBIS
1375- void config_file_dump_orbis (config_file_t * conf , int fd )
1376- {
1377- struct config_entry_list * list = NULL ;
1378- struct config_include_list * includes = conf -> includes ;
1379-
1380- if (conf -> reference )
1381- {
1382- pathname_make_slashes_portable (conf -> reference );
1383- fprintf (file , "#reference \"%s\"\n" , conf -> reference );
1384- }
1385-
1386-
1387- list = config_file_merge_sort_linked_list (
1388- (struct config_entry_list * )conf -> entries ,
1389- config_file_sort_compare_func );
1390- conf -> entries = list ;
1391-
1392- while (list )
1393- {
1394- if (!list -> readonly && list -> key )
1395- {
1396- char newlist [256 ];
1397- snprintf (newlist , sizeof (newlist ),
1398- "%s = %s\n" , list -> key , list -> value );
1399- orbisWrite (fd , newlist , strlen (newlist ));
1400- }
1401- list = list -> next ;
1402- }
1403-
1404- /* Config files are read from the top down - if
1405- * duplicate entries are found then the topmost
1406- * one in the list takes precedence. This means
1407- * '#include' directives must go *after* individual
1408- * config entries, otherwise they will override
1409- * any custom-set values */
1410- while (includes )
1411- {
1412- char cad [256 ];
1413- snprintf (cad , sizeof (cad ),
1414- "#include %s\n" , includes -> path );
1415- orbisWrite (fd , cad , strlen (cad ));
1416- includes = includes -> next ;
1417- }
1418- }
1419- #endif
1420-
14211362void config_file_dump (config_file_t * conf , FILE * file , bool sort )
14221363{
14231364 struct config_entry_list * list = NULL ;
0 commit comments