]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix minor xfs_quota double-reporting issue found by QA testing project quota; bump...
authorNathan Scott <nathans@sgi.com>
Tue, 7 Jun 2005 23:34:55 +0000 (23:34 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 7 Jun 2005 23:34:55 +0000 (23:34 +0000)
VERSION
debian/changelog
doc/CHANGES
quota/init.c
quota/quot.c
quota/report.c
quota/state.c

diff --git a/VERSION b/VERSION
index b59990c976f343d95cc5ab7ae9d15e840095057b..c48b852c640c29fa81cbffeafc82118210a0c80d 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=2
 PKG_MINOR=6
-PKG_REVISION=31
+PKG_REVISION=32
 PKG_BUILD=1
index c2f1fd4bb831660abae9f9c263a26a358a476a9a..cace49c74ac7d22bcaf3d0773ffb037dab2960c9 100644 (file)
@@ -1,8 +1,8 @@
-xfsprogs (2.6.31-1) unstable; urgency=low
+xfsprogs (2.6.32-1) unstable; urgency=low
 
   * New upstream release.
 
- -- Nathan Scott <nathans@debian.org>  Mon, 06 Jun 2005 11:52:23 +1000
+ -- Nathan Scott <nathans@debian.org>  Wed, 08 Jun 2005 09:01:04 +1000
 
 xfsprogs (2.6.28-1) unstable; urgency=low
 
index ceca6fafd09a75a002cf1c0c70091de99314d609..90b863b77b2d36cecb4f3e17e1bc4064a301d83e 100644 (file)
@@ -1,3 +1,8 @@
+xfsprogs-2.6.32 (08 June 2005)
+       - Minor endian cleanups in some tools.
+       - Fix a couple of xfs_quota double-reporting issues when
+         issuing commands via the -c (command line) 0option.
+
 xfsprogs-2.6.31 (06 June 2005)
        - Fix previous MD driver-specific change to correctly handle
          (i.e. not "stripe align") linear arrays.
index 3c52c40010f5b859bdb4014a65308015051dc91e..a779ac1d5991daaa3b61302ae32135a52bf7450b 100644 (file)
@@ -99,6 +99,8 @@ init_args_command(
                fs_path = &fs_table[index++];
        } while ((fs_path->fs_flags & FS_PROJECT_PATH) && index < fs_count);
 
+       if (fs_path->fs_flags & FS_PROJECT_PATH)
+               return 0;
        if (index > fs_count)
                return 0;
        return index;
@@ -147,10 +149,11 @@ init(
                }
        }
 
-       if (optind == argc)
+       if (optind == argc) {
                fs_table_initialise();
-       else while (optind < argc) {
-               fs_table_insert_mount(argv[optind++]);
+       } else {
+               while (optind < argc)
+                       fs_table_insert_mount(argv[optind++]);
                if (!nprojopts)
                        fs_table_insert_project(NULL);
                else
index 751cb286b2babc8e7409bcd5b6368e0ac930ba2a..41b18eb6a617fc7c05fe3ddc0ee1bff2caee112a 100644 (file)
@@ -408,11 +408,14 @@ quot_f(
        if ((fp = fopen_write_secure(fname)) == NULL)
                return 0;
 
-       if (argc == optind)
-               quot_any_type(fp, form, type, (flags & ALL_MOUNTS_FLAG) ?
-                               NULL : fs_path->fs_dir, flags);
-       else while (argc > optind)
+       if (argc == optind) {
+               if (flags & ALL_MOUNTS_FLAG)
+                       quot_any_type(fp, form, type, NULL, flags);
+               else if (fs_path->fs_flags & FS_MOUNT_POINT)
+                       quot_any_type(fp, form, type, fs_path->fs_dir, flags);
+       } else while (argc > optind) {
                quot_any_type(fp, form, type, argv[optind++], flags);
+       }
 
        if (fname)
                fclose(fp);
index a32e016d71d1aaebd3e145dc78fb06e352f573fb..b0c9154970404cd9edc5b10b7c9d9349b52cd9e2 100644 (file)
@@ -545,7 +545,7 @@ report_f(
        char            **argv)
 {
        FILE            *fp = NULL;
-       char            *dir, *fname = NULL;
+       char            *fname = NULL;
        uint            lower = 0, upper = 0;
        int             c, flags = 0, type = 0, form = 0;
 
@@ -607,12 +607,16 @@ report_f(
        if ((fp = fopen_write_secure(fname)) == NULL)
                return 0;
 
-       if (argc == optind)
-               report_any_type(fp, form, type, (flags & ALL_MOUNTS_FLAG) ?
-                               NULL : fs_path->fs_dir, lower, upper, flags);
-       else while (argc > optind) {
-               dir = argv[optind++];
-               report_any_type(fp, form, type, dir, lower, upper, flags);
+       if (argc == optind) {
+               if (flags & ALL_MOUNTS_FLAG)
+                       report_any_type(fp, form, type, NULL,
+                                       lower, upper, flags);
+               else if (fs_path->fs_flags & FS_MOUNT_POINT)
+                       report_any_type(fp, form, type, fs_path->fs_dir,
+                                       lower, upper, flags);
+       } else while (argc > optind) {
+               report_any_type(fp, form, type, argv[optind++],
+                               lower, upper, flags);
        }
 
        if (fname)
index 4fb1467d0357c5278851f7f2fbe26142e1e1e394..57d4f78ecc666822c87e76028ac5d298f13de481 100644 (file)
@@ -246,8 +246,10 @@ state_f(
        if (!type)
                type = XFS_USER_QUOTA | XFS_GROUP_QUOTA | XFS_PROJ_QUOTA;
 
-       state_quotafile(fp, type, (flags & ALL_MOUNTS_FLAG) ?
-                       NULL : fs_path->fs_dir, flags);
+       if (flags & ALL_MOUNTS_FLAG)
+               state_quotafile(fp, type, NULL, flags);
+       else if (fs_path->fs_flags & FS_MOUNT_POINT)
+               state_quotafile(fp, type, fs_path->fs_dir, flags);
 
        if (fname)
                fclose(fp);
@@ -391,7 +393,8 @@ enable_f(
                qflags |= XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_UDQ_ENFD;
        }
 
-       enable_enforcement(fs_path->fs_dir, type, qflags, flags);
+       if (fs_path->fs_flags & FS_MOUNT_POINT)
+               enable_enforcement(fs_path->fs_dir, type, qflags, flags);
        return 0;
 }
 
@@ -432,7 +435,8 @@ disable_f(
                qflags |= XFS_QUOTA_UDQ_ACCT;
        }
 
-       disable_enforcement(fs_path->fs_dir, type, qflags, flags);
+       if (fs_path->fs_flags & FS_MOUNT_POINT)
+               disable_enforcement(fs_path->fs_dir, type, qflags, flags);
        return 0;
 }
 
@@ -473,7 +477,8 @@ off_f(
                qflags |= XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_UDQ_ENFD;
        }
 
-       quotaoff(fs_path->fs_dir, type, qflags, flags);
+       if (fs_path->fs_flags & FS_MOUNT_POINT)
+               quotaoff(fs_path->fs_dir, type, qflags, flags);
        return 0;
 }
 
@@ -514,7 +519,8 @@ remove_f(
                qflags |= XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_UDQ_ENFD;
        }
 
-       remove_extents(fs_path->fs_dir, type, qflags, flags);
+       if (fs_path->fs_flags & FS_MOUNT_POINT)
+               remove_extents(fs_path->fs_dir, type, qflags, flags);
        return 0;
 }