Commit df652252 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Stamp fuse library with commit and timestamp.

Print version number in Unionfs and AutoUnionFs.
parent 708a5d57
#!/bin/sh
set -eux
rm -f fuse/version.gen.go
for d in fuse zipfs unionfs example/loopback example/zipfs \
example/bulkstat example/multizip example/unionfs \
......
......@@ -43,7 +43,7 @@ func main() {
conn.Debug = *debug
mountState := fuse.NewMountState(conn)
mountState.Debug = *debug
fmt.Printf("Mounting...\n")
fmt.Printf("Go-FUSE %v Mounting AutoUnionFs...\n", fuse.Version())
err := mountState.Mount(mountpoint)
if err != nil {
fmt.Printf("Mount fail: %v\n", err)
......
......@@ -33,7 +33,7 @@ func main() {
conn := fuse.NewFileSystemConnector(ufs, nil)
mountState := fuse.NewMountState(conn)
mountState.Debug = *debug
fmt.Printf("Mounting...\n")
fmt.Printf("Go-FUSE Version %v.\nMounting UnionFs...\n", fuse.Version())
err := mountState.Mount(mountpoint)
if err != nil {
fmt.Printf("Mount fail: %v\n", err)
......
version.gen.go
......@@ -23,7 +23,12 @@ GOFILES=api.go \
opcode.go \
pathops.go \
latencymap.go \
loggingfs.go
loggingfs.go \
version.gen.go
version.gen.go:
echo "package fuse" > $@
git log -n1 --pretty=format:'const version = "%h (%cd)"' --date=iso >> $@
include $(GOROOT)/src/Make.pkg
......@@ -166,3 +166,7 @@ func ioctl(fd int, cmd int, arg uintptr) (int, int) {
errno := int(e1)
return val, errno
}
func Version() string {
return version
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment