Commit 42819eb7 authored by Martin Wilck's avatar Martin Wilck Committed by Christoph Hellwig

nvmet: don't overwrite identify sn/fr with 0-bytes

The merged version of my patch "nvmet: don't report 0-bytes in serial
number" fails to remove two lines which should have been replaced,
so that the space-padded strings are overwritten again with 0-bytes.
Fix it.

Fixes: 42de82a8 nvmet: don't report 0-bytes in serial number
Signed-off-by: default avatarMartin Wilck <mwilck@suse.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimbeg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent a082b426
...@@ -199,12 +199,6 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req) ...@@ -199,12 +199,6 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1); copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1);
copy_and_pad(id->fr, sizeof(id->fr), UTS_RELEASE, strlen(UTS_RELEASE)); copy_and_pad(id->fr, sizeof(id->fr), UTS_RELEASE, strlen(UTS_RELEASE));
memset(id->mn, ' ', sizeof(id->mn));
strncpy((char *)id->mn, "Linux", sizeof(id->mn));
memset(id->fr, ' ', sizeof(id->fr));
strncpy((char *)id->fr, UTS_RELEASE, sizeof(id->fr));
id->rab = 6; id->rab = 6;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment