Skip to content

Commit e8dfc90

Browse files
committed
PR: remove leftover code, fix linter, extra comment
Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
1 parent c74af82 commit e8dfc90

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

internal/tools/rootfs/main.go

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import (
1414
"github.com/Microsoft/hcsshim/internal/oc"
1515
)
1616

17-
// TODO: tests ...............
17+
// TODO: add tests for:
18+
// - general functionality (Windows + Linux)
19+
// - adding `./` prefix
20+
// - adding `/` suffix
21+
// - overriding UID and GUID
22+
// TODO: output CPIO archive?
1823

1924
func main() {
2025
logrus.SetFormatter(&logrus.TextFormatter{FullTimestamp: true})
@@ -72,17 +77,3 @@ func run() error {
7277

7378
return app.Run(args)
7479
}
75-
76-
// TODO: output CPIO archive
77-
78-
// see "github.com/u-root/mkuimage/cpio".fs_windows.go
79-
type tarRecorder struct {
80-
inumber uint64
81-
}
82-
83-
func newTarRecorder() *tarRecorder { return &tarRecorder{inumber: 2} }
84-
85-
func (r *tarRecorder) inode() uint64 {
86-
r.inumber++
87-
return r.inumber - 1
88-
}

internal/tools/rootfs/merge.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,7 @@ func (c *mergeCommand) writeLayer(
287287
continue
288288
}
289289

290-
//
291290
// update header (as needed)
292-
//
293291

294292
if c.RelativePathPrefix && !(strings.HasPrefix(header.Name, `./`) || (c.OS == windowsOS && strings.HasPrefix(header.Name, `.\`))) {
295293
stats.numRelPrepend++

0 commit comments

Comments
 (0)