diff options
| author | Raghavendra G <raghavendra@gluster.com> | 2011-04-05 09:02:53 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@gluster.com> | 2011-04-06 10:51:55 -0700 | 
| commit | 282109ed02a1ad220027bc69398941ba2b115cd2 (patch) | |
| tree | de09861b3c09f22fd7cb034f4c516fca01fdcfb5 | |
| parent | 322ed6812d9a5b3c975b5c949ff5adfd16d40eb4 (diff) | |
features/marker, cli: use appropriate conversion specifiers.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
BUG: 2649 (Quota: size field is not getting updated properly)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2649
| -rw-r--r-- | cli/src/cli-rpc-ops.c | 6 | ||||
| -rw-r--r-- | xlators/features/marker/src/marker-quota.c | 13 | 
2 files changed, 12 insertions, 7 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index c358192d2fa..ff568f63c2f 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -1378,8 +1378,10 @@ print_limit_list (char *volname, char *limit_list)                  if (ret < 0) {                          cli_out ("%-20s %10s", path, value);                  } else { -                        sscanf (ret_str, "%ld,%ld", &size, &limit_value); -                        cli_out ("%-20s %10ld %20ld", path, limit_value, size); +                        sscanf (ret_str, "%"PRId64",%"PRId64, &size, +                                &limit_value); +                        cli_out ("%-20s %10"PRId64" %20"PRId64, path, +                                 limit_value, size);                  }                  i++;          } diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 4d5fed66e9a..16139fc24f8 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -210,9 +210,10 @@ update_size_xattr (call_frame_t *frame, void *cookie, xlator_t *this,          *delta = ntoh64 (ntoh64 (*size) - local->sum); -        gf_log (this->name, GF_LOG_DEBUG, "calculated size = %ld, original size = %ld" -                        "path = %s diff = %ld", local->sum, ntoh64 (*size), -                        local->loc.path, ntoh64 (*delta)); +        gf_log (this->name, GF_LOG_DEBUG, "calculated size = %"PRId64", " +                "original size = %"PRIu64 +                " path = %s diff = %"PRIu64, local->sum, ntoh64 (*size), +                local->loc.path, ntoh64 (*delta));          new_dict = dict_new ();          if (!new_dict); @@ -463,9 +464,11 @@ quota_readdir_cbk (call_frame_t *frame,                          break;                  }          } -        gf_log (this->name, GF_LOG_INFO, "offset before =%lu",local->d_off); +        gf_log (this->name, GF_LOG_INFO, "offset before =%"PRIu64, +                local->d_off);          local->d_off +=offset; -        gf_log (this->name, GF_LOG_INFO, "offset after = %lu",local->d_off); +        gf_log (this->name, GF_LOG_INFO, "offset after = %"PRIu64, +                local->d_off);          if (ret)                  release_lock_on_dirty_inode (frame, NULL, this, 0, 0);  | 
