Made a few straggler functions private

This commit is contained in:
Caleb Gardner
2020-11-25 08:31:24 -06:00
parent afbc991f60
commit c0291e3ac7
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ var (
func (r *Reader) ReadFile(location string) (*FileReader, error) { func (r *Reader) ReadFile(location string) (*FileReader, error) {
var rdr FileReader var rdr FileReader
rdr.r = r rdr.r = r
in, err := r.GetInodeFromPath(location) in, err := r.getInodeFromPath(location)
if err != nil { if err != nil {
return nil, err return nil, err
} }
+2 -2
View File
@@ -9,7 +9,7 @@ import (
) )
//FragmentEntry is an entry in the fragment table //FragmentEntry is an entry in the fragment table
type FragmentEntry struct { type fragmentEntry struct {
Start uint64 Start uint64
Size uint32 Size uint32
Unused uint32 Unused uint32
@@ -57,7 +57,7 @@ func (r *Reader) getFragmentDataFromInode(in *inode.Inode) ([]byte, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
var entry FragmentEntry var entry fragmentEntry
err = binary.Read(fragEntryRdr, binary.LittleEndian, &entry) err = binary.Read(fragEntryRdr, binary.LittleEndian, &entry)
if err != nil { if err != nil {
return nil, err return nil, err
+1 -1
View File
@@ -77,7 +77,7 @@ func (r *Reader) getInodeFromEntry(en *directory.Entry) (*inode.Inode, error) {
//GetInodeFromPath returns the inode at the given path, relative to root. //GetInodeFromPath returns the inode at the given path, relative to root.
//The given path can start with or without "/" //The given path can start with or without "/"
func (r *Reader) GetInodeFromPath(path string) (*inode.Inode, error) { func (r *Reader) getInodeFromPath(path string) (*inode.Inode, error) {
path = strings.TrimSuffix(strings.TrimPrefix(path, "/"), "/") path = strings.TrimSuffix(strings.TrimPrefix(path, "/"), "/")
pathDirs := strings.Split(path, "/") pathDirs := strings.Split(path, "/")
rdr, err := r.newMetadataReaderFromInodeRef(r.super.RootInodeRef) rdr, err := r.newMetadataReaderFromInodeRef(r.super.RootInodeRef)