]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
bump version to 1.2.8.
authorNathan Scott <nathans@sgi.com>
Tue, 3 Jul 2001 04:33:45 +0000 (04:33 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 3 Jul 2001 04:33:45 +0000 (04:33 +0000)
VERSION
debian/changelog
doc/CHANGES
doc/CREDITS
include/xfs_mount.h
libxfs/init.c

diff --git a/VERSION b/VERSION
index d3e2c1382525c6127ac4337191348cb675437412..147b299dba399970d06e7b3d319493c0af51b275 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=1
 PKG_MINOR=2
-PKG_REVISION=7
+PKG_REVISION=8
 PKG_BUILD=0
index 9e935d031f500b1443a519ebedbcc9571c20f778..e2b1921e23cac05c46d423efa734d8933c534848 100644 (file)
@@ -1,3 +1,12 @@
+xfsprogs (1.2.8) unstable; urgency=low
+
+  * Fixed a bug in libxfs /etc/mtab read-only mount detection
+  * First try procfs, fall back to /etc/mtab, for read-only mounts
+  * Sync with recent mount code changes for reiserfs and ext3 probes
+  * Fix logprint build problem under gcc 3.0
+
+ -- Nathan Scott <nathans@debian.org>  Mon,  2 Jul 2001 13:59:08 +1000
+
 xfsprogs (1.2.7) unstable; urgency=low
 
   * New xfs_freeze(8) command - volume manager snapshot helper
index f6f614133d2f5d5344889f301cffb711916232fd..08429ab5b524be973533b07f07d82e98656d74d0 100644 (file)
@@ -1,3 +1,8 @@
+xfsprogs-1.2.8 (02 Jul 2001)
+       - fixed a bug in libxfs /etc/mtab read-only mount detection
+       - first try procfs, fall back to /etc/mtab, for read-only mounts
+       - sync with recent mount code changes for reiserfs and ext3 probes
+       - fix logprint build problem under gcc 3.0
 
 xfsprogs-1.2.7 (22 May 2001)
        - new xfs_freeze(8) command - volume manager snapshot helper
index 92062269ce239a39773f94dfdc16733b55a33539..6291b239854ce90db1cca0aa725ed3cc708984f4 100644 (file)
@@ -23,7 +23,7 @@ S: Danny Cox; Connex; 2970 Brandywine Ln; Suite 120; Atlanta GA 30341-5527
 
 N: Thomas Graichen
 E: tgr@spoiled.org
-D: XFS FAQ ( http://oss.sgi.com/projects/xfs/faq.html ) maintainer
+D: Original XFS FAQ maintainer
 D: PowerPC and Alpha porting
 S: Berlin, Germany
 
@@ -47,6 +47,10 @@ S: Krosenska' 543
 S: 181 00 Praha 8
 S: Czech Republic
 
+N: Seth Mos
+E: knuffie@xs4all.nl
+D: XFS FAQ ( http://oss.sgi.com/projects/xfs/faq.html ) maintainer
+
 N: Robert Stickel
 E: rstickel@connex.com
 D: libacl port to Linux
@@ -54,5 +58,5 @@ S: 2970 Brandywine Rd, Suite 120, Atlanta, GA 30431, USA
 
 N: John Trostel
 E: jtrostel@connex.com
-D: libacl extentions for Linux
+D: libacl extensions for Linux
 S: 2970 Brandywine Rd, Suite 120, Atlanta, GA 30431, USA
index 042f0395a6908aca0c6ab36230115a112cb48dfc..5e7e7a7d701817abbffb78ac31830c82b9e8a714 100644 (file)
@@ -341,6 +341,7 @@ typedef struct xfs_mount {
 #define XFS_MOUNT_SHARED       0x00000800      /* shared mount */
 #define XFS_MOUNT_DFLT_IOSIZE          0x00001000      /* set default i/o size */
 #define XFS_MOUNT_OSYNCISDSYNC         0x00002000      /* treat o_sync like o_dsync */
+#define XFS_MOUNT_NOUUID       0x00004000      /* ignore uuid during mount */
 
 /*
  * Flags for m_cxfstype
index 19c67033509c45853457cd34292bef7c2b343d20..1c0ea142b8f4d7fd01fea4867bbe1e6661e38f0c 100644 (file)
@@ -59,7 +59,7 @@ static struct dev_to_fd {
 } dev_map[MAX_DEVS]={{0}};
 
 static int
-check_ismounted(char *name, char *block, int verbose)
+check_ismounted(char *name, char *block)
 {
        struct ustat    ust;
        struct stat64   st;
@@ -69,10 +69,8 @@ check_ismounted(char *name, char *block, int verbose)
        if ((st.st_mode & S_IFMT) != S_IFBLK)
                return 0;
        if (ustat(st.st_rdev, &ust) >= 0) {
-               if (verbose)
-                       fprintf(stderr,
-                               "%s: %s contains a mounted filesystem\n",
-                               progname, name);
+               fprintf(stderr, "%s: %s contains a mounted filesystem\n",
+                       progname, name);
                return 1;
        }
        return 0;
@@ -89,29 +87,43 @@ check_ismounted(char *name, char *block, int verbose)
 static int
 check_isactive(char *name, char *block, int fatal)
 {
+#define PROC_MOUNTED   "/proc/mounts"
        int             sts = 0;
        FILE            *f;
        struct mntent   *mnt;
+       struct stat64   st, mst;
+       struct ustat    ust;
+       char            mounts[MAXPATHLEN];
 
-       if (check_ismounted(name, block, 0)) {
-               if ((f = setmntent(MOUNTED, "r")) == NULL) {
-                       fprintf(stderr,
-                               "%s: %s contains a possibly writable, mounted "
+       if (stat64(block, &st) < 0)
+               return sts;
+       if ((st.st_mode & S_IFMT) != S_IFBLK)
+               return sts;
+       if (ustat(st.st_rdev, &ust) < 0)
+               return sts;
+
+       strcpy(mounts, access(PROC_MOUNTED, R_OK)? PROC_MOUNTED : MOUNTED);
+       if ((f = setmntent(mounts, "r")) == NULL) {
+               fprintf(stderr, "%s: %s contains a possibly writable, mounted "
                                "filesystem\n", progname, name);
                        return fatal;
-               }
-               while ((mnt = getmntent(f)) != NULL) {
-                       if (hasmntopt(mnt, MNTOPT_RO) != NULL)
-                               break;
-               }
-               if (mnt == NULL) {
-                       fprintf(stderr,
-                               "%s: %s contains a writable mounted "
+       }
+       while ((mnt = getmntent(f)) != NULL) {
+               if (stat64(mnt->mnt_fsname, &mst) < 0)
+                       continue;
+               if ((mst.st_mode & S_IFMT) != S_IFBLK)
+                       continue;
+               if (mst.st_rdev == st.st_rdev
+                   && hasmntopt(mnt, MNTOPT_RO) != NULL)
+                       break;
+       }
+       if (mnt == NULL) {
+               fprintf(stderr, "%s: %s contains a writable, mounted "
                                "filesystem\n", progname, name);
-                       sts = fatal;
-               }
-               endmntent(f);
+               sts = fatal;
        }
+       endmntent(f);
+
        return sts;
 }
 
@@ -313,7 +325,7 @@ libxfs_init(libxfs_init_t *a)
                        goto done;
                }
                if (!readonly && !inactive && check_ismounted(
-                                       a->volname, blockfile, 1))
+                                       a->volname, blockfile))
                        goto done;
                if (inactive && check_isactive(
                                        a->volname, blockfile, readonly))
@@ -418,7 +430,7 @@ voldone:
                                goto done;
                        }
                        if (!readonly && !inactive && check_ismounted(
-                                               dname, blockfile, 1))
+                                               dname, blockfile))
                                goto done;
                        if (inactive && check_isactive(
                                                dname, blockfile, readonly))
@@ -455,7 +467,7 @@ voldone:
                                goto done;
                        }
                        if (!readonly && !inactive && check_ismounted(
-                                               logname, blockfile, 1))
+                                               logname, blockfile))
                                goto done;
                        else if (inactive && check_isactive(
                                                logname, blockfile, readonly))
@@ -492,7 +504,7 @@ voldone:
                                goto done;
                        }
                        if (!readonly && !inactive && check_ismounted(
-                                               rtname, blockfile, 1))
+                                               rtname, blockfile))
                                goto done;
                        if (inactive && check_isactive(
                                                rtname, blockfile, readonly))