dir: make dtest buildable again 94/13794/6
authorMark Vitale <mvitale@sinenomine.net>
Wed, 6 Mar 2019 04:11:38 +0000 (23:11 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 8 Oct 2020 04:13:53 +0000 (00:13 -0400)
Commit 7fe4125fe3435092b75ed29b884d8d3c2d1a2cad 'dir/vol: Die() really
does' overlooked src/dir/test/dtest.c, breaking its build.

Fix the signature of Die() and the makefile so dtest can be built.
In addition, change the Makefile so it is always built.

Change-Id: I18129acbfdaa770987c7f0b8055ff593f776e518
Reviewed-on: https://gerrit.openafs.org/13794
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/dir/Makefile.in
src/dir/test/Makefile.in
src/dir/test/dtest.c

index 34c63f5..729083d 100644 (file)
@@ -12,7 +12,8 @@ include @TOP_OBJDIR@/src/config/Makefile.lwp
 
 all: \
        ${TOP_LIBDIR}/libdir.a \
-       depinstall
+       depinstall \
+       test
 
 depinstall: \
        ${TOP_INCDIR}/afs/dir.h
@@ -29,7 +30,7 @@ libdir.a: buffer.o dir.o salvage.o AFS_component_version_number.o
        $(RANLIB) $@
 
 .PHONY: test
-test:
+test: ${TOP_LIBDIR}/libdir.a
        cd test && $(MAKE)
 
 buffer.o: buffer.c dir.h
index def077f..d2a1eb8 100644 (file)
@@ -10,7 +10,8 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 include @TOP_OBJDIR@/src/config/Makefile.lwp
 
 
-LIBS = ${srcdir}/lib/libdir.a ${srcdir}/lib/util.a  ${srcdir}/lib/liblwp.a
+LIBS = ${srcdir}/lib/libdir.a ${srcdir}/lib/liblwp.a \
+          ${srcdir}/lib/libopr.a
 
 all:   dtest
 
index e881c67..d2d3d38 100644 (file)
@@ -14,6 +14,7 @@
 #include <roken.h>
 
 #include <afs/dir.h>
+#include <afs/opr.h>
 
 long fidCounter = 0;
 
@@ -244,9 +245,10 @@ FidCpy(dirhandle *todir, dirhandle *fromdir)
 }
 
 void
-Die(char *msg)
+Die(const char *msg)
 {
     printf("Something died with this message:  %s\n", msg);
+    opr_abort();
 }
 
 void