From: Ben Gras Date: Wed, 2 Jun 2010 22:58:29 +0000 (+0000) Subject: move drivers/random SHA implementation to libutil and header to X-Git-Tag: v3.1.7~9 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=035c5a369cd91369529197ef8456953bf7b37ca5;p=minix.git move drivers/random SHA implementation to libutil and header to --- diff --git a/drivers/random/Makefile b/drivers/random/Makefile index a6f474146..21fccde02 100644 --- a/drivers/random/Makefile +++ b/drivers/random/Makefile @@ -1,11 +1,11 @@ # Makefile for random driver (RANDOM) PROG= random -SRCS= main.c random.c sha2.c rijndael_api.c rijndael_alg.c +SRCS= main.c random.c rijndael_api.c rijndael_alg.c .PATH: ${.CURDIR}/aes DPADD+= ${LIBDRIVER} ${LIBSYS} -LDADD+= -ldriver -lsys +LDADD+= -ldriver -lsys -lutil MAN= diff --git a/drivers/random/random.c b/drivers/random/random.c index 9e74ea4f7..eb794a20c 100644 --- a/drivers/random/random.c +++ b/drivers/random/random.c @@ -12,7 +12,7 @@ that data into a seed for a psuedo random number generator. #include "assert.h" #include "random.h" -#include "sha2.h" +#include #include "aes/rijndael.h" #define N_DERIV 16 diff --git a/include/Makefile b/include/Makefile index c74569275..70a5067d1 100644 --- a/include/Makefile +++ b/include/Makefile @@ -24,7 +24,7 @@ INCS+= minix/a.out.h minix/bitmap.h minix/callnr.h minix/cdrom.h \ minix/sys_config.h minix/sysinfo.h minix/syslib.h \ minix/sysutil.h minix/tty.h minix/type.h minix/types.h \ minix/u64.h minix/vfsif.h minix/vm.h \ - minix/compiler.h minix/compiler-ack.h + minix/compiler.h minix/compiler-ack.h minix/sha2.h INCS+= net/hton.h net/if.h net/ioctl.h net/netlib.h INCS+= net/gen/arp_io.h net/gen/dhcp.h net/gen/ether.h \ net/gen/eth_hdr.h net/gen/eth_io.h net/gen/icmp.h \ diff --git a/drivers/random/sha2.h b/include/minix/sha2.h similarity index 100% rename from drivers/random/sha2.h rename to include/minix/sha2.h diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 87b0cc488..9b5dba921 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -4,6 +4,6 @@ CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE LIB= util -SRCS= openpty.c +SRCS= openpty.c sha2.c .include diff --git a/drivers/random/sha2.c b/lib/libutil/sha2.c similarity index 99% rename from drivers/random/sha2.c rename to lib/libutil/sha2.c index 5691dc8aa..33ba0e7e1 100644 --- a/drivers/random/sha2.c +++ b/lib/libutil/sha2.c @@ -40,7 +40,7 @@ /* #include */ /* #include */ /* #include */ -#include "sha2.h" +#include /* * ASSERT NOTE: