mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
STABLE14-namei_mapper-20060731
add chaskiel's namei mapping tool to cvs and make a rule to build it (cherry picked from commit 8c4496602badc1b0aa2642e061a720d4d1f108b8)
This commit is contained in:
parent
64ba11890f
commit
e2a3556e49
@ -163,6 +163,9 @@ gi: ${TOP_LIBDIR}/libsys.a
|
||||
${CC} ${LDFLAGS} -o gi gi.o ${TOP_LIBDIR}/libsys.a;; \
|
||||
esac
|
||||
|
||||
namei_map: ${TOP_LIBDIR}/libsys.a namei_map.o
|
||||
${CC} ${CFLAGS} -o namei_map namei_map.o ${TOP_LIBDIR}/libafsutil.a ${LIBS} ${XLIBS}
|
||||
|
||||
volinfo: vol-info.o physio.o ihandle.o ${LIBS}
|
||||
${CC} ${CFLAGS} -o volinfo vol-info.o physio.o \
|
||||
ihandle.o ${LIBS} ${XLIBS}
|
||||
|
20
src/vol/namei_map.c
Normal file
20
src/vol/namei_map.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <afs/param.h>
|
||||
#include <afs/afsutil.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
lb64_string_t tmp;
|
||||
|
||||
unsigned long vol;
|
||||
if (argc < 2) { fprintf(stderr, "Usage: nametodir vol\n"); exit(1); }
|
||||
vol=strtoul(argv[1], NULL, 0);
|
||||
(void)int32_to_flipbase64(tmp, (int64_t) (vol & 0xff));
|
||||
printf("Component is %s\n", tmp);
|
||||
(void)int32_to_flipbase64(tmp, (int64_t) vol);
|
||||
printf("Component is %s\n", tmp);
|
||||
|
||||
exit(0);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user