firmware-utils: rename the devname variable in mkwrgimg to avoid a clash with a BSD stdlib function
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27553 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
00dc80b385
commit
4903cab0d4
|
@ -49,7 +49,7 @@ static char *progname;
|
||||||
static char *ifname;
|
static char *ifname;
|
||||||
static char *ofname;
|
static char *ofname;
|
||||||
static char *signature;
|
static char *signature;
|
||||||
static char *devname;
|
static char *dev_name;
|
||||||
static uint32_t offset;
|
static uint32_t offset;
|
||||||
static int big_endian;
|
static int big_endian;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ int main(int argc, char *argv[])
|
||||||
big_endian = 1;
|
big_endian = 1;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
devname = optarg;
|
dev_name = optarg;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
ifname = optarg;
|
ifname = optarg;
|
||||||
|
@ -167,7 +167,7 @@ int main(int argc, char *argv[])
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (devname == NULL) {
|
if (dev_name == NULL) {
|
||||||
ERR("no device name specified");
|
ERR("no device name specified");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ int main(int argc, char *argv[])
|
||||||
memset(header, '\0', sizeof(struct wrg_header));
|
memset(header, '\0', sizeof(struct wrg_header));
|
||||||
|
|
||||||
strncpy(header->signature, signature, sizeof(header->signature));
|
strncpy(header->signature, signature, sizeof(header->signature));
|
||||||
strncpy(header->devname, devname, sizeof(header->signature));
|
strncpy(header->devname, dev_name, sizeof(header->signature));
|
||||||
put_u32(&header->magic1, WRG_MAGIC);
|
put_u32(&header->magic1, WRG_MAGIC);
|
||||||
put_u32(&header->magic2, WRG_MAGIC);
|
put_u32(&header->magic2, WRG_MAGIC);
|
||||||
put_u32(&header->size, st.st_size);
|
put_u32(&header->size, st.st_size);
|
||||||
|
|
Loading…
Reference in New Issue