*/
#include <config.h>
+#include <compatlfs.h>
#include <stdio.h>
#include <sys/param.h>
#include <string.h>
int fd;
struct ext2_super_block e2sb;
- fd = open(device, O_RDONLY);
+ fd = OPEN(device, O_RDONLY);
if (fd < 0)
return 1;
- if (lseek(fd, EXT2_SUPER_OFFSET, SEEK_SET) != EXT2_SUPER_OFFSET ||
+ if (LSEEK(fd, EXT2_SUPER_OFFSET, SEEK_SET) != EXT2_SUPER_OFFSET ||
read(fd, (char *) &e2sb, EXT2_SUPER_SIZE) != EXT2_SUPER_SIZE ||
ext2magic(e2sb) != EXT2_SUPER_MAGIC) {
close(fd);