Commit 01ccfd3e authored by Federico Vaga's avatar Federico Vaga

sw:lib: fix path to LUN link

The path size was allowing only 2 digit LUNs. It never happened that we
have a LUN greater than 9 [0, 9]. However, the LUN is an arbitrary
number, any value is a good value. Therefore, increase the string size
to potentially contain a 32bit number (10 digits).
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 562f72a5
......@@ -126,7 +126,7 @@ struct fdelay_board *fdelay_open_by_lun(int lun)
ssize_t ret;
char dev_id_str[4];
char path_pattern[] = "/dev/fd.%d";
char path[sizeof(path_pattern) + 1];
char path[sizeof(path_pattern) + 10]; // add 10 to allow more digits
uint32_t dev_id;
if (fdelay_is_verbose())
......
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