]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: fix compile errors/warnings
authorTahsin Erdogan <tahsin@google.com>
Fri, 30 Jun 2017 04:19:32 +0000 (21:19 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 5 Jul 2017 03:48:05 +0000 (23:48 -0400)
Defining DEBUG_QUOTA reveals a few compile errors. Fix these.
Also fix format string type mismatches in a couple of log_debug()
calls.

Fixes: 2d2d799c7261 ("Clean up codes for adding new quota type")
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/support/mkquota.c
lib/support/quotaio.c

index 1bb43a71cfac2dfe75d706bd6bb1fa76a7a12fb9..11a878e7f1315785e42f9262381d90913db60f51 100644 (file)
@@ -50,7 +50,7 @@ static void print_dquot(const char *desc, struct dquot *dq)
 {
        if (desc)
                fprintf(stderr, "%s: ", desc);
-       fprintf(stderr, "%u %lld:%lld:%lld %lld:%lld:%lld\n",
+       fprintf(stderr, "%u %ld:%ld:%ld %ld:%ld:%ld\n",
                dq->dq_id, dq->dq_dqb.dqb_curspace,
                dq->dq_dqb.dqb_bsoftlimit, dq->dq_dqb.dqb_bhardlimit,
                dq->dq_dqb.dqb_curinodes,
@@ -523,7 +523,7 @@ static int scan_dquots_callback(struct dquot *dquot, void *cb_data)
            dq->dq_dqb.dqb_curinodes != dquot->dq_dqb.dqb_curinodes) {
                scan_data->usage_is_inconsistent = 1;
                fprintf(stderr, "[QUOTA WARNING] Usage inconsistent for ID %u:"
-                       "actual (%lld, %lld) != expected (%lld, %lld)\n",
+                       "actual (%ld, %ld) != expected (%ld, %ld)\n",
                        dq->dq_id, dq->dq_dqb.dqb_curspace,
                        dq->dq_dqb.dqb_curinodes,
                        dquot->dq_dqb.dqb_curspace,
index befa832951a2bbdc3f6c3893cc0f3223838081fa..240eab3d63ea234ac3c273c64c7c963e078a0dce 100644 (file)
@@ -230,9 +230,9 @@ errcode_t quota_file_open(quota_ctx_t qctx, struct quota_handle *h,
                return err;
 
        if (qf_ino == 0)
-               qf_ino = *quota_sb_inump(fs->super, qtype)
+               qf_ino = *quota_sb_inump(fs->super, qtype);
 
-       log_debug("Opening quota ino=%lu, type=%d", qf_ino, qtype);
+       log_debug("Opening quota ino=%u, type=%d", qf_ino, qtype);
        err = ext2fs_file_open(fs, qf_ino, flags, &e2_file);
        if (err) {
                log_err("ext2fs_file_open failed: %s", error_message(err));
@@ -366,7 +366,7 @@ errcode_t quota_file_create(struct quota_handle *h, ext2_filsys fs,
        h->e2fs_write = quota_write_nomount;
        h->e2fs_read = quota_read_nomount;
 
-       log_debug("Creating quota ino=%lu, type=%d", qf_inum, type);
+       log_debug("Creating quota ino=%u, type=%d", qf_inum, qtype);
        err = ext2fs_file_open(fs, qf_inum, h->qh_file_flags, &e2_file);
        if (err) {
                log_err("ext2fs_file_open failed: %ld", err);