aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-05-31 12:11:53 -0400
committerTheodore Ts'o <tytso@mit.edu>2023-05-31 12:11:53 -0400
commit74571d9430da149fa46a0f7ef171920ebe9a7b8c (patch)
tree974ce807689058f67456e2c359f020968e3fc8ca
parent018ddcb29239fbd0a16a54e00613954e2d88b2b6 (diff)
downloade2fsprogs-74571d9430da149fa46a0f7ef171920ebe9a7b8c.tar.gz
libsupport: fix function prototype for quota_write_inode()
Commit 2d2d799c7261 ("Clean up codes for adding new quota type") changed the second paramter of quota_write_inode() from taking a single quota type to taking a logical OR of (1 << quota_types). The one thing this commit didn't change was the function prototype for quota_write_inode() in the header file from an enum to an unsigned int. Most C compilers don't seem to mind, and omission is mostly harmless. However, mingw64 does issue a warning which gets promoted to an error. Fixes: 2d2d799c7261 ("Clean up codes for adding new quota type") Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--lib/support/quotaio.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/support/quotaio.h b/lib/support/quotaio.h
index 84fac35dd..390f7dc92 100644
--- a/lib/support/quotaio.h
+++ b/lib/support/quotaio.h
@@ -16,8 +16,7 @@
* AND/OR
* quota_data_add/quota_data_sub/quota_data_inodes();
* }
- * quota_write_inode(qctx, USRQUOTA);
- * quota_write_inode(qctx, GRPQUOTA);
+ * quota_write_inode(qctx, (1 << USRQUOTA) | (1 << GRPQUOTA));
* quota_release_context(&qctx);
* }
*
@@ -223,7 +222,7 @@ void quota_data_add(quota_ctx_t qctx, struct ext2_inode_large *inode,
ext2_ino_t ino, qsize_t space);
void quota_data_sub(quota_ctx_t qctx, struct ext2_inode_large *inode,
ext2_ino_t ino, qsize_t space);
-errcode_t quota_write_inode(quota_ctx_t qctx, enum quota_type qtype);
+errcode_t quota_write_inode(quota_ctx_t qctx, unsigned int qtype_bits);
/* Flags for quota_read_all_dquots() */
#define QREAD_USAGE 0x01
#define QREAD_LIMITS 0x02