]> git.wh0rd.org - dump.git/blobdiff - compat/lib/bylabel.c
LFS fixes (explicit use of open64/etc)
[dump.git] / compat / lib / bylabel.c
index 065d52985c5629ec810e53f2ae46953bf045b4c1..07f0dd92320ccb112b773a9eb54e44b1a826256c 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <config.h>
+#include <compatlfs.h>
 #include <stdio.h>
 #include <sys/param.h>
 #include <string.h>
@@ -55,11 +56,11 @@ get_label_uuid(const char *device, char **label, char *uuid) {
        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);