| ... | ... |
@@ -20,6 +20,7 @@ Antony Messerli <amesserl@rackspace.com> |
| 20 | 20 |
Asbjørn Enge <asbjorn@hanafjedle.net> |
| 21 | 21 |
Barry Allard <barry.allard@gmail.com> |
| 22 | 22 |
Ben Toews <mastahyeti@gmail.com> |
| 23 |
+Ben Wiklund <ben@daisyowl.com> |
|
| 23 | 24 |
Benoit Chesneau <bchesneau@gmail.com> |
| 24 | 25 |
Bhiraj Butala <abhiraj.butala@gmail.com> |
| 25 | 26 |
Bouke Haarsma <bouke@webatoom.nl> |
| ... | ... |
@@ -11,9 +11,9 @@ import ( |
| 11 | 11 |
"time" |
| 12 | 12 |
) |
| 13 | 13 |
|
| 14 |
-// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes |
|
| 15 |
-// The lower 8 bit is the lower 8 bit in the minor, the following 12 bits are the major, |
|
| 16 |
-// and then there is the top 12 bits of then minor |
|
| 14 |
+// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes. |
|
| 15 |
+// They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major, |
|
| 16 |
+// then the top 12 bits of the minor |
|
| 17 | 17 |
func mkdev(major int64, minor int64) uint32 {
|
| 18 | 18 |
return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff)) |
| 19 | 19 |
} |
| ... | ... |
@@ -58,9 +58,9 @@ func ApplyLayer(dest string, layer Archive) error {
|
| 58 | 58 |
hdr.Name = filepath.Clean(hdr.Name) |
| 59 | 59 |
|
| 60 | 60 |
if !strings.HasSuffix(hdr.Name, "/") {
|
| 61 |
- // Not the root directory, ensure that the parent directory exists |
|
| 61 |
+ // Not the root directory, ensure that the parent directory exists. |
|
| 62 | 62 |
// This happened in some tests where an image had a tarfile without any |
| 63 |
- // parent directories |
|
| 63 |
+ // parent directories. |
|
| 64 | 64 |
parent := filepath.Dir(hdr.Name) |
| 65 | 65 |
parentPath := filepath.Join(dest, parent) |
| 66 | 66 |
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
|
| ... | ... |
@@ -85,7 +85,7 @@ func ApplyLayer(dest string, layer Archive) error {
|
| 85 | 85 |
return err |
| 86 | 86 |
} |
| 87 | 87 |
} else {
|
| 88 |
- // If path exits we almost always just want to remove and replace it |
|
| 88 |
+ // If path exits we almost always just want to remove and replace it. |
|
| 89 | 89 |
// The only exception is when it is a directory *and* the file from |
| 90 | 90 |
// the layer is also a directory. Then we want to merge them (i.e. |
| 91 | 91 |
// just apply the metadata from the layer). |
| ... | ... |
@@ -155,7 +155,7 @@ func ApplyLayer(dest string, layer Archive) error {
|
| 155 | 155 |
return err |
| 156 | 156 |
} |
| 157 | 157 |
|
| 158 |
- // There is no LChmod, so ignore mode for symlink. Also, this |
|
| 158 |
+ // There is no LChmod, so ignore mode for symlink. Also, this |
|
| 159 | 159 |
// must happen after chown, as that can modify the file mode |
| 160 | 160 |
if hdr.Typeflag != tar.TypeSymlink {
|
| 161 | 161 |
err = syscall.Chmod(path, uint32(hdr.Mode&07777)) |
| ... | ... |
@@ -14,7 +14,7 @@ func getLastModification(stat *syscall.Stat_t) syscall.Timespec {
|
| 14 | 14 |
} |
| 15 | 15 |
|
| 16 | 16 |
func LUtimesNano(path string, ts []syscall.Timespec) error {
|
| 17 |
- // These are not currently availible in syscall |
|
| 17 |
+ // These are not currently available in syscall |
|
| 18 | 18 |
AT_FDCWD := -100 |
| 19 | 19 |
AT_SYMLINK_NOFOLLOW := 0x100 |
| 20 | 20 |
|
| ... | ... |
@@ -163,7 +163,7 @@ func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, e |
| 163 | 163 |
|
| 164 | 164 |
loginAgainstOfficialIndex := serverAddress == IndexServerAddress() |
| 165 | 165 |
|
| 166 |
- // to avoid sending the server address to the server it should be removed before marshalled |
|
| 166 |
+ // to avoid sending the server address to the server it should be removed before being marshalled |
|
| 167 | 167 |
authCopy := *authConfig |
| 168 | 168 |
authCopy.ServerAddress = "" |
| 169 | 169 |
|
| ... | ... |
@@ -254,11 +254,11 @@ func (config *ConfigFile) ResolveAuthConfig(registry string) AuthConfig {
|
| 254 | 254 |
// default to the index server |
| 255 | 255 |
return config.Configs[IndexServerAddress()] |
| 256 | 256 |
} |
| 257 |
- // if its not the index server there are three cases: |
|
| 257 |
+ // if it's not the index server there are three cases: |
|
| 258 | 258 |
// |
| 259 |
- // 1. this is a full config url -> it should be used as is |
|
| 260 |
- // 2. it could be a full url, but with the wrong protocol |
|
| 261 |
- // 3. it can be the hostname optionally with a port |
|
| 259 |
+ // 1. a full config url -> it should be used as is |
|
| 260 |
+ // 2. a full url, but with the wrong protocol |
|
| 261 |
+ // 3. a hostname, with an optional port |
|
| 262 | 262 |
// |
| 263 | 263 |
// as there is only one auth entry which is fully qualified we need to start |
| 264 | 264 |
// parsing and matching |
| ... | ... |
@@ -18,7 +18,7 @@ func TestRegister(t *testing.T) {
|
| 18 | 18 |
|
| 19 | 19 |
eng := newTestEngine(t) |
| 20 | 20 |
|
| 21 |
- //Should fail because globan handlers are copied |
|
| 21 |
+ //Should fail because global handlers are copied |
|
| 22 | 22 |
//at the engine creation |
| 23 | 23 |
if err := eng.Register("dummy1", nil); err == nil {
|
| 24 | 24 |
t.Fatalf("Expecting error, got none")
|