summaryrefslogtreecommitdiff
path: root/drivers/scsi/libfc/fc_disc.c
diff options
context:
space:
mode:
authorChris Leech <christopher.leech@intel.com>2010-04-10 01:23:10 +0400
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 23:02:41 +0400
commitce8b5df04292e93a117d9f863af206245bf61271 (patch)
treefb10dd4b931756765b3352402d83033a326b9c30 /drivers/scsi/libfc/fc_disc.c
parent63ac4bbffb40f2cb3bc7e8b11bac47598813ea13 (diff)
downloadlinux-ce8b5df04292e93a117d9f863af206245bf61271.tar.xz
[SCSI] libfc: set both precision and field with when printing FC IDs
Most of the prints of fabric IDs were specified as %6x, which will not print any leading 0s. It's nice to see leading 0s for identifiers like this, which are a fixed length. This patch sets the precision modifier as well, making the specifier %6.6x, which forces the printing of leading 0s. Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_disc.c')
-rw-r--r--drivers/scsi/libfc/fc_disc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 1087a7f18e84..83314a18db2b 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -132,7 +132,7 @@ static void fc_disc_recv_rscn_req(struct fc_seq *sp, struct fc_frame *fp,
switch (fmt) {
case ELS_ADDR_FMT_PORT:
FC_DISC_DBG(disc, "Port address format for port "
- "(%6x)\n", ntoh24(pp->rscn_fid));
+ "(%6.6x)\n", ntoh24(pp->rscn_fid));
dp = kzalloc(sizeof(*dp), GFP_KERNEL);
if (!dp) {
redisc = 1;
@@ -449,7 +449,7 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len)
} else {
printk(KERN_WARNING "libfc: Failed to allocate "
"memory for the newly discovered port "
- "(%6x)\n", ids.port_id);
+ "(%6.6x)\n", ids.port_id);
error = -ENOMEM;
}
}
@@ -607,7 +607,7 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,
rdata->ids.port_name = port_name;
else if (rdata->ids.port_name != port_name) {
FC_DISC_DBG(disc, "GPN_ID accepted. WWPN changed. "
- "Port-id %x wwpn %llx\n",
+ "Port-id %6.6x wwpn %llx\n",
rdata->ids.port_id, port_name);
lport->tt.rport_logoff(rdata);