Move pathfs_frontend to internal/fusefrontend

"git status" for reference:

renamed:    pathfs_frontend/args.go -> internal/fusefrontend/args.go
renamed:    pathfs_frontend/compat_darwin.go -> internal/fusefrontend/compat_darwin.go
renamed:    pathfs_frontend/compat_linux.go -> internal/fusefrontend/compat_linux.go
renamed:    pathfs_frontend/file.go -> internal/fusefrontend/file.go
renamed:    pathfs_frontend/file_holes.go -> internal/fusefrontend/file_holes.go
renamed:    pathfs_frontend/fs.go -> internal/fusefrontend/fs.go
renamed:    pathfs_frontend/fs_dir.go -> internal/fusefrontend/fs_dir.go
renamed:    pathfs_frontend/names.go -> internal/fusefrontend/names.go
renamed:    pathfs_frontend/write_lock.go -> internal/fusefrontend/write_lock.go
modified:   main.go
This commit is contained in:
Jakob Unterwurzacher 2016-02-06 19:27:59 +01:00
parent 2b8cbd9441
commit 9078a77850
10 changed files with 16 additions and 16 deletions

View File

@ -1,6 +1,6 @@
package pathfs_frontend package fusefrontend
// Container for arguments that are passed from main() to pathfs_frontend // Container for arguments that are passed from main() to fusefrontend
type Args struct { type Args struct {
Masterkey []byte Masterkey []byte
Cipherdir string Cipherdir string

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
// prealloc - preallocate space without changing the file size. This prevents // prealloc - preallocate space without changing the file size. This prevents
// us from running out of space in the middle of an operation. // us from running out of space in the middle of an operation.

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
import "syscall" import "syscall"

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
// FUSE operations on file handles // FUSE operations on file handles

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
// Helper functions for sparse files (files with holes) // Helper functions for sparse files (files with holes)

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
// FUSE operations on paths // FUSE operations on paths

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
// Mkdir and Rmdir // Mkdir and Rmdir

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
// This file forwards file encryption operations to cryptfs // This file forwards file encryption operations to cryptfs

View File

@ -1,4 +1,4 @@
package pathfs_frontend package fusefrontend
import ( import (
"sync" "sync"

12
main.go
View File

@ -20,7 +20,7 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs" "github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/rfjakob/gocryptfs/pathfs_frontend" "github.com/rfjakob/gocryptfs/internal/fusefrontend"
"github.com/rfjakob/gocryptfs/internal/configfile" "github.com/rfjakob/gocryptfs/internal/configfile"
"github.com/rfjakob/gocryptfs/internal/toggledlog" "github.com/rfjakob/gocryptfs/internal/toggledlog"
"github.com/rfjakob/gocryptfs/internal/nametransform" "github.com/rfjakob/gocryptfs/internal/nametransform"
@ -304,7 +304,7 @@ func main() {
} }
// Initialize FUSE server // Initialize FUSE server
toggledlog.Debug.Printf("cli args: %v", args) toggledlog.Debug.Printf("cli args: %v", args)
srv := pathfsFrontend(masterkey, args, confFile) srv := initFuseFrontend(masterkey, args, confFile)
toggledlog.Info.Println(colorGreen + "Filesystem mounted and ready." + colorReset) toggledlog.Info.Println(colorGreen + "Filesystem mounted and ready." + colorReset)
// We are ready - send USR1 signal to our parent and switch to syslog // We are ready - send USR1 signal to our parent and switch to syslog
if args.notifypid > 0 { if args.notifypid > 0 {
@ -324,13 +324,13 @@ func main() {
// main exits with code 0 // main exits with code 0
} }
// pathfsFrontend - initialize gocryptfs/pathfs_frontend // initFuseFrontend - initialize gocryptfs/fusefrontend
// Calls os.Exit on errors // Calls os.Exit on errors
func pathfsFrontend(key []byte, args argContainer, confFile *configfile.ConfFile) *fuse.Server { func initFuseFrontend(key []byte, args argContainer, confFile *configfile.ConfFile) *fuse.Server {
// Reconciliate CLI and config file arguments into a Args struct that is passed to the // Reconciliate CLI and config file arguments into a Args struct that is passed to the
// filesystem implementation // filesystem implementation
frontendArgs := pathfs_frontend.Args{ frontendArgs := fusefrontend.Args{
Cipherdir: args.cipherdir, Cipherdir: args.cipherdir,
Masterkey: key, Masterkey: key,
OpenSSL: args.openssl, OpenSSL: args.openssl,
@ -359,7 +359,7 @@ func pathfsFrontend(key []byte, args argContainer, confFile *configfile.ConfFile
jsonBytes, _ := json.MarshalIndent(frontendArgs, "", "\t") jsonBytes, _ := json.MarshalIndent(frontendArgs, "", "\t")
toggledlog.Debug.Printf("frontendArgs: %s", string(jsonBytes)) toggledlog.Debug.Printf("frontendArgs: %s", string(jsonBytes))
finalFs := pathfs_frontend.NewFS(frontendArgs) finalFs := fusefrontend.NewFS(frontendArgs)
pathFsOpts := &pathfs.PathNodeFsOptions{ClientInodes: true} pathFsOpts := &pathfs.PathNodeFsOptions{ClientInodes: true}
pathFs := pathfs.NewPathNodeFs(finalFs, pathFsOpts) pathFs := pathfs.NewPathNodeFs(finalFs, pathFsOpts)
fuseOpts := &nodefs.Options{ fuseOpts := &nodefs.Options{