bootstrap: constify strings
Various parameters for device names, etc. should be const strings. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
5e3069f3f9
commit
a3544b162e
|
@ -14,10 +14,10 @@
|
|||
void bootstrap_boot(int (*func)(void), bool barebox);
|
||||
|
||||
#ifdef CONFIG_BOOTSTRAP_DEVFS
|
||||
void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
|
||||
void* bootstrap_read_devfs(const char *devname, bool use_bb, int offset,
|
||||
int default_size, int max_size);
|
||||
#else
|
||||
static inline void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
|
||||
static inline void* bootstrap_read_devfs(const char *devname, bool use_bb, int offset,
|
||||
int default_size, int max_size)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -25,9 +25,9 @@ static inline void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_BOOTSTRAP_DISK
|
||||
void* bootstrap_read_disk(char *devname, char *fstype);
|
||||
void* bootstrap_read_disk(const char *devname, const char *fstype);
|
||||
#else
|
||||
static inline void* bootstrap_read_disk(char *devname, char *fstype)
|
||||
static inline void* bootstrap_read_disk(const char *devname, const char *fstype)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ static unsigned int get_image_size(void *head)
|
|||
}
|
||||
#endif
|
||||
|
||||
void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
|
||||
void* bootstrap_read_devfs(const char *devname, bool use_bb, int offset,
|
||||
int default_size, int max_size)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
#include <libfile.h>
|
||||
#include <bootstrap.h>
|
||||
|
||||
void* bootstrap_read_disk(char *dev, char *fstype)
|
||||
void* bootstrap_read_disk(const char *dev, const char *fstype)
|
||||
{
|
||||
int ret;
|
||||
void *buf;
|
||||
int len;
|
||||
char *path = "/";
|
||||
const char *path = "/";
|
||||
|
||||
ret = mount(dev, fstype, path, NULL);
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in New Issue