Fix running as a normal user (incorrect handling of "offset")
authorhpa <hpa>
Fri, 30 Jun 2000 07:44:26 +0000 (07:44 +0000)
committerhpa <hpa>
Fri, 30 Jun 2000 07:44:26 +0000 (07:44 +0000)
syslinux.c

index f095f8f..fb82fc5 100644 (file)
@@ -282,7 +282,8 @@ int main(int argc, char *argv[])
           !hasmntopt(mnt, "ro") &&
           mnt->mnt_dir[0] == '/' &&
           !!hasmntopt(mnt, "loop") == !!S_ISREG(st.st_mode) &&
-          atol(hasmntopt(mnt, "offset")) == offset) {
+          ( (!hasmntopt(mnt,"offset") && offset == 0) ||
+            (atol(hasmntopt(mnt, "offset")) == offset) ) ) {
        /* Okay, this is an fstab entry we should be able to live with. */
 
        mntpath = mnt->mnt_dir;