fpga: Replace char * with const char * for filename
Ensure the string for filename is always constant, otherwise it can be corrupted by the writing. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
committed by
Michal Simek
parent
9184c92f46
commit
3003c445b3
@@ -421,7 +421,8 @@ static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
|
|||||||
loff_t blocksize, actread;
|
loff_t blocksize, actread;
|
||||||
loff_t pos = 0;
|
loff_t pos = 0;
|
||||||
int fstype;
|
int fstype;
|
||||||
char *interface, *dev_part, *filename;
|
char *interface, *dev_part;
|
||||||
|
const char *filename;
|
||||||
|
|
||||||
blocksize = fsinfo->blocksize;
|
blocksize = fsinfo->blocksize;
|
||||||
interface = fsinfo->interface;
|
interface = fsinfo->interface;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ typedef struct { /* typedef fpga_desc */
|
|||||||
unsigned int blocksize;
|
unsigned int blocksize;
|
||||||
char *interface;
|
char *interface;
|
||||||
char *dev_part;
|
char *dev_part;
|
||||||
char *filename;
|
const char *filename;
|
||||||
int fstype;
|
int fstype;
|
||||||
} fpga_fs_info;
|
} fpga_fs_info;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user