Files
s390-tools/ipl_tools/Makefile
T
Jan Höppner 9f8d245f92 ipl_tools: Copy strings correctly
Use util_strlcpy() to copy strings correctly and get rid of the
following GCC8 compile warnings:

main.c: In function ‘main’:
main.c:34:2: warning: ‘strncpy’ specified bound 256 equals destination
size [-Wstringop-truncation]
  strncpy(g.prog_name, argv[0], sizeof(g.prog_name));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In function ‘set_bootprog’,
    inlined from ‘parse_chreipl_options’ at cmd_chreipl.c:510:4:
cmd_chreipl.c:185:2: warning: ‘strncpy’ specified bound 11 equals
destination size [-Wstringop-truncation]
  strncpy(l.bootprog, bootprog, sizeof(l.bootprog));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cmd_chreipl.c: In function ‘set_reipl_type’:
cmd_chreipl.c:297:2: warning: ‘strncpy’ specified bound 15 equals
destination size [-Wstringop-tr uncation]
  strncpy(l.dev, dev_name, sizeof(l.dev));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2018-11-16 15:03:02 +01:00

42 lines
1.0 KiB
Makefile

include ../common.mak
libs = $(rootdir)/libutil/libutil.a
all: chreipl lsreipl chshut lsshut
objects = main.o ccw.o fcp.o system.o shutdown.o \
cmd_lsshut.o cmd_chshut.o cmd_lsreipl.o cmd_chreipl.o proc.o
chreipl: $(objects) $(libs)
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
lsreipl:
ln -sf chreipl lsreipl
chshut:
ln -sf chreipl chshut
lsshut:
ln -sf chreipl lsshut
clean:
rm -f *.o lsreipl chreipl chshut lsshut
install: all
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 chreipl \
$(DESTDIR)$(USRSBINDIR)
ln -f -s chreipl $(DESTDIR)$(USRSBINDIR)/lsreipl
ln -f -s chreipl $(DESTDIR)$(USRSBINDIR)/chshut
ln -f -s chreipl $(DESTDIR)$(USRSBINDIR)/lsshut
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 man/chreipl.8 \
$(DESTDIR)$(MANDIR)/man8
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 man/lsreipl.8 \
$(DESTDIR)$(MANDIR)/man8
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 man/lsshut.8 \
$(DESTDIR)$(MANDIR)/man8
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 man/chshut.8 \
$(DESTDIR)$(MANDIR)/man8
.PHONY: all install clean