From 951bacc20b90c27978a70ebf34571ec43d9d550c Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Thu, 31 Jul 2003 14:12:36 +0000 Subject: [PATCH] Use hasmntopt only if it exists. (Logical change 1.166) --- libntfs/volume.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libntfs/volume.c b/libntfs/volume.c index ca518b45..f83a6571 100644 --- a/libntfs/volume.c +++ b/libntfs/volume.c @@ -1,7 +1,7 @@ /* * volume.c - NTFS volume handling code. Part of the Linux-NTFS project. * - * Copyright (c) 2000-2002 Anton Altaparmakov + * Copyright (c) 2000-2003 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -1049,12 +1049,13 @@ static int ntfs_mntent_check(const char *file, unsigned long *mnt_flags) *mnt_flags = NTFS_MF_MOUNTED; if (!strcmp(mnt->mnt_dir, "/")) *mnt_flags |= NTFS_MF_ISROOT; +#ifdef HAVE_HASMNTOPT if (hasmntopt(mnt, "ro") && !hasmntopt(mnt, "rw")) *mnt_flags |= NTFS_MF_READONLY; +#endif return 0; } - -#endif +#endif /* HAVE_MNTENT_H */ /** * ntfs_check_if_mounted - check if an ntfs volume is currently mounted