summaryrefslogtreecommitdiff
path: root/usr/src/boot/lib/libstand
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-08-13 12:38:47 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-08-13 12:38:47 +0000
commitc41f3cf10a99f055337e884f8bf6c5a612047efb (patch)
treec873f980911fe63842b5598ede8a2ffa8e46825e /usr/src/boot/lib/libstand
parent185a422e63f55e51465370d497ca1c1a13366df4 (diff)
parent6640c13beae5a8b03718dc6b7a9cda5dd6ab9024 (diff)
downloadillumos-joyent-c41f3cf10a99f055337e884f8bf6c5a612047efb.tar.gz
[illumos-gate merge]
commit 6640c13beae5a8b03718dc6b7a9cda5dd6ab9024 9718 update mandoc to 1.14.4 commit 9fd537180d8c7ca186c4842f6262016f5e418d10 9668 loader: rename zfsloader to loader commit a942f1f5f0eafb4e2a9cf5d6cff385b7830676e6 9715 libstand: gzipfs unused variable commit 567af71db40b696d77b6f0112d8cb20c4dc3ad93 9714 libstand: dereferencing type-punned pointer will break strict-aliasing rules commit 5620b343930008e3d99871d6563033c0cbe44afa 9713 libstand: cd9660 pointers differ in signedness commit 27d539f2d4b4c40e9fc667f8b1319ed290c6e4b3 9712 libstand: netif.c variable set but not used commit 380059927f2f5af9148793463b305037707f8613 9708 loader: libstand warning: pointer targets differ in signedness commit cb41b9c565d4eec9e1f06e24d429696f59f2f07d 9674 Let's scrap AVS/sdbc Conflicts: usr/src/lib/Makefile
Diffstat (limited to 'usr/src/boot/lib/libstand')
-rw-r--r--usr/src/boot/lib/libstand/bootp.c2
-rw-r--r--usr/src/boot/lib/libstand/bootp.h2
-rw-r--r--usr/src/boot/lib/libstand/cd9660.c2
-rw-r--r--usr/src/boot/lib/libstand/dosfs.c2
-rw-r--r--usr/src/boot/lib/libstand/gzipfs.c4
-rw-r--r--usr/src/boot/lib/libstand/net.c4
-rw-r--r--usr/src/boot/lib/libstand/netif.c4
-rw-r--r--usr/src/boot/lib/libstand/nfs.c2
8 files changed, 10 insertions, 12 deletions
diff --git a/usr/src/boot/lib/libstand/bootp.c b/usr/src/boot/lib/libstand/bootp.c
index 328a45f9b5..2e8773ca46 100644
--- a/usr/src/boot/lib/libstand/bootp.c
+++ b/usr/src/boot/lib/libstand/bootp.c
@@ -729,7 +729,7 @@ setenv_(u_char *cp, u_char *ep, struct dhcp_opt *opts)
bcopy(cp, buf, size); /* cannot overflow */
buf[size] = '\0';
for (endv = buf; endv; endv = vp) {
- u_char *s = NULL; /* semicolon ? */
+ char *s = NULL; /* semicolon ? */
/* skip leading whitespace */
while (*endv && strchr(" \t\n\r", *endv))
diff --git a/usr/src/boot/lib/libstand/bootp.h b/usr/src/boot/lib/libstand/bootp.h
index 3118c8c653..4fbb712e7d 100644
--- a/usr/src/boot/lib/libstand/bootp.h
+++ b/usr/src/boot/lib/libstand/bootp.h
@@ -37,7 +37,7 @@ struct bootp {
struct in_addr bp_giaddr; /* gateway IP address */
unsigned char bp_chaddr[16]; /* client hardware address */
unsigned char bp_sname[64]; /* server host name */
- unsigned char bp_file[128]; /* boot file name */
+ char bp_file[128]; /* boot file name */
#ifdef SUPPORT_DHCP
#define BOOTP_VENDSIZE 312
#else
diff --git a/usr/src/boot/lib/libstand/cd9660.c b/usr/src/boot/lib/libstand/cd9660.c
index 845df147cd..9a780b44f7 100644
--- a/usr/src/boot/lib/libstand/cd9660.c
+++ b/usr/src/boot/lib/libstand/cd9660.c
@@ -303,7 +303,7 @@ cd9660_open(const char *path, struct open_file *f)
if (isonum_723(vd->logical_block_size) != ISO_DEFAULT_BLOCK_SIZE)
goto out;
- rec = *(struct iso_directory_record *) vd->root_directory_record;
+ bcopy(vd->root_directory_record, &rec, sizeof (rec));
if (*path == '/') path++; /* eat leading '/' */
first = 1;
diff --git a/usr/src/boot/lib/libstand/dosfs.c b/usr/src/boot/lib/libstand/dosfs.c
index 617041566e..8d5adb4cc9 100644
--- a/usr/src/boot/lib/libstand/dosfs.c
+++ b/usr/src/boot/lib/libstand/dosfs.c
@@ -403,7 +403,7 @@ dos_stat(struct open_file *fd, struct stat *sb)
}
static int
-dos_checksum(char *name, char *ext)
+dos_checksum(unsigned char *name, unsigned char *ext)
{
int x, i;
char buf[11];
diff --git a/usr/src/boot/lib/libstand/gzipfs.c b/usr/src/boot/lib/libstand/gzipfs.c
index 6cc752bf0e..a658f90755 100644
--- a/usr/src/boot/lib/libstand/gzipfs.c
+++ b/usr/src/boot/lib/libstand/gzipfs.c
@@ -39,7 +39,7 @@ struct z_file
int zf_rawfd;
off_t zf_dataoffset;
z_stream zf_zstream;
- char zf_buf[Z_BUFSIZE];
+ unsigned char zf_buf[Z_BUFSIZE];
int zf_endseen;
};
@@ -325,7 +325,7 @@ static int
zf_stat(struct open_file *f, struct stat *sb)
{
struct z_file *zf = (struct z_file *)f->f_fsdata;
- int result, res;
+ int result;
off_t pos1, pos2;
uint32_t size;
diff --git a/usr/src/boot/lib/libstand/net.c b/usr/src/boot/lib/libstand/net.c
index 7d775faf17..ae2590a327 100644
--- a/usr/src/boot/lib/libstand/net.c
+++ b/usr/src/boot/lib/libstand/net.c
@@ -266,7 +266,7 @@ intoa(n_long addr)
}
static char *
-number(char *s, int *n)
+number(char *s, uint32_t *n)
{
for (*n = 0; isdigit(*s); s++)
*n = (*n * 10) + *s - '0';
@@ -277,7 +277,7 @@ n_long
ip_convertaddr(char *p)
{
#define IP_ANYADDR 0
- n_long addr = 0, n;
+ uint32_t addr = 0, n;
if (p == NULL || *p == '\0')
return (IP_ANYADDR);
diff --git a/usr/src/boot/lib/libstand/netif.c b/usr/src/boot/lib/libstand/netif.c
index e5eb603e5e..51bc5aa125 100644
--- a/usr/src/boot/lib/libstand/netif.c
+++ b/usr/src/boot/lib/libstand/netif.c
@@ -90,7 +90,7 @@ netif_match(struct netif *nif, void *machdep_hint)
struct netif *
netif_select(void *machdep_hint)
{
- int d, u, unit_done, s;
+ int d, u, s;
struct netif_driver *drv;
struct netif cur_if;
static struct netif best_if;
@@ -106,8 +106,6 @@ netif_select(void *machdep_hint)
for (u = 0; u < drv->netif_nifs; u++) {
cur_if.nif_unit = u;
- unit_done = 0;
-
#ifdef NETIF_DEBUG
if (netif_debug)
printf("\t%s%d:", drv->netif_bname,
diff --git a/usr/src/boot/lib/libstand/nfs.c b/usr/src/boot/lib/libstand/nfs.c
index d1a941656f..1ca0547c9d 100644
--- a/usr/src/boot/lib/libstand/nfs.c
+++ b/usr/src/boot/lib/libstand/nfs.c
@@ -826,7 +826,7 @@ nfs_readdir(struct open_file *f, struct dirent *d)
fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos]) << 32) |
ntohl(rent->nameplus[pos + 1]);
pos += 2;
- buf = (u_char *)&rent->nameplus[pos];
+ buf = (char *)&rent->nameplus[pos];
return (0);
err: