From: Nathan Scott Date: Tue, 3 Jul 2001 04:33:45 +0000 (+0000) Subject: bump version to 1.2.8. X-Git-Tag: v1.3.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc8202baf030718373b681c999a46df73edf278f;p=thirdparty%2Fxfsprogs-dev.git bump version to 1.2.8. --- diff --git a/VERSION b/VERSION index d3e2c1382..147b299db 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=1 PKG_MINOR=2 -PKG_REVISION=7 +PKG_REVISION=8 PKG_BUILD=0 diff --git a/debian/changelog b/debian/changelog index 9e935d031..e2b1921e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 2 Jul 2001 13:59:08 +1000 + xfsprogs (1.2.7) unstable; urgency=low * New xfs_freeze(8) command - volume manager snapshot helper diff --git a/doc/CHANGES b/doc/CHANGES index f6f614133..08429ab5b 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -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 diff --git a/doc/CREDITS b/doc/CREDITS index 92062269c..6291b2398 100644 --- a/doc/CREDITS +++ b/doc/CREDITS @@ -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 diff --git a/include/xfs_mount.h b/include/xfs_mount.h index 042f0395a..5e7e7a7d7 100644 --- a/include/xfs_mount.h +++ b/include/xfs_mount.h @@ -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 diff --git a/libxfs/init.c b/libxfs/init.c index 19c670335..1c0ea142b 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -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))