forked from Minki/linux
GFS2: fix sprintf format specifier
Sprintf format specifier "%d" and "%u" are mixed up in gfs2_recovery_done() and freeze_show(). So correct them. Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
parent
8f6cb409f0
commit
3566c96476
@ -439,7 +439,7 @@ static void gfs2_recovery_done(struct gfs2_sbd *sdp, unsigned int jid,
|
||||
|
||||
ls->ls_recover_jid_done = jid;
|
||||
ls->ls_recover_jid_status = message;
|
||||
sprintf(env_jid, "JID=%d", jid);
|
||||
sprintf(env_jid, "JID=%u", jid);
|
||||
sprintf(env_status, "RECOVERY=%s",
|
||||
message == LM_RD_SUCCESS ? "Done" : "Failed");
|
||||
kobject_uevent_env(&sdp->sd_kobj, KOBJ_CHANGE, envp);
|
||||
|
@ -96,7 +96,7 @@ static ssize_t freeze_show(struct gfs2_sbd *sdp, char *buf)
|
||||
struct super_block *sb = sdp->sd_vfs;
|
||||
int frozen = (sb->s_writers.frozen == SB_UNFROZEN) ? 0 : 1;
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", frozen);
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", frozen);
|
||||
}
|
||||
|
||||
static ssize_t freeze_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
|
||||
|
Loading…
Reference in New Issue
Block a user