The endianness of a DMS is now stored in the OBIDMS structure
This commit is contained in:
@ -13,6 +13,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -387,6 +388,8 @@ OBIDMS_p obi_open_dms(const char* dms_name)
|
|||||||
|
|
||||||
close(infos_file_descriptor);
|
close(infos_file_descriptor);
|
||||||
|
|
||||||
|
dms->little_endian = little_endian_dms;
|
||||||
|
|
||||||
// Open the arrays directory
|
// Open the arrays directory
|
||||||
dms->array_directory = private_opendirat(dms->dir_fd, ARRAYS_DIR_NAME);
|
dms->array_directory = private_opendirat(dms->dir_fd, ARRAYS_DIR_NAME);
|
||||||
if (dms->array_directory == NULL)
|
if (dms->array_directory == NULL)
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "obierrno.h"
|
#include "obierrno.h"
|
||||||
|
|
||||||
@ -52,6 +53,8 @@ typedef struct OBIDMS {
|
|||||||
int array_dir_fd; /**< The file descriptor of the directory entry
|
int array_dir_fd; /**< The file descriptor of the directory entry
|
||||||
* usable to refer and scan the array directory.
|
* usable to refer and scan the array directory.
|
||||||
*/
|
*/
|
||||||
|
bool little_endian; /**< Endianness of the database.
|
||||||
|
*/
|
||||||
} OBIDMS_t, *OBIDMS_p;
|
} OBIDMS_t, *OBIDMS_p;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user