Skip to content

Commit

Permalink
Ensure .gitignore ignores bin/ directory
Browse files Browse the repository at this point in the history
I'm not sure why there was a . in front of the ignore pattern,
but it prevented my Git from recognizing the bin/ directory as
being ignored. Removing the leading . fixed the issue.

Signed-off-by: Matthew Heon <[email protected]>
  • Loading branch information
mheon committed Oct 3, 2023
1 parent 2bdf976 commit d2e5bdc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
./bin/
/bin/
capture.pcap
tmp/
test/qcon.log
1 change: 0 additions & 1 deletion cmd/gvproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ var (
sshPort int
pidFile string
shareVolumes arrayFlags
vsockShares map[string]uint64
exitCode int
)

Expand Down
10 changes: 5 additions & 5 deletions pkg/fileserver/plan9/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/sirupsen/logrus"
)

type Plan9Server struct {
type Server struct {
server *p9.Server
// TODO: Once server has a proper Close() we don't need this.
// This is basically just a short-circuit to actually close the server
Expand All @@ -23,7 +23,7 @@ type Plan9Server struct {

// Expose a single directory (and all children) via the given net.Listener.
// Directory given must be an absolute path and must exist.
func New9pServer(listener net.Listener, exposeDir string) (*Plan9Server, error) {
func New9pServer(listener net.Listener, exposeDir string) (*Server, error) {
// Verify that exposeDir makes sense.
if !filepath.IsAbs(exposeDir) {
return nil, fmt.Errorf("path to expose to machine must be absolute: %s", exposeDir)
Expand All @@ -50,7 +50,7 @@ func New9pServer(listener net.Listener, exposeDir string) (*Plan9Server, error)
close(errChan)
}()

toReturn := new(Plan9Server)
toReturn := new(Server)
toReturn.listener = listener
toReturn.server = server
toReturn.errChan = errChan
Expand All @@ -71,7 +71,7 @@ func New9pServer(listener net.Listener, exposeDir string) (*Plan9Server, error)
// Please note that this does *BAD THINGS* to clients if they are still running
// when the server stops. Processes get stuck in I/O deep sleep and zombify, and
// nothing I do save restarting the VM can remove the zombies.
func (s *Plan9Server) Stop() error {
func (s *Server) Stop() error {
if s.server != nil {
if err := s.listener.Close(); err != nil {
return err
Expand All @@ -83,7 +83,7 @@ func (s *Plan9Server) Stop() error {
}

// Wait for an error from a running server.
func (s *Plan9Server) WaitForError() error {
func (s *Server) WaitForError() error {
if s.server != nil {
err := <-s.errChan
return err
Expand Down
4 changes: 4 additions & 0 deletions pkg/fileserver/server_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ import (
)

func StartShares(mounts map[string]uint64) error {
if len(mounts) == 0 {
return nil
}

return fmt.Errorf("this platform does not support sharing directories")
}

0 comments on commit d2e5bdc

Please sign in to comment.