| ... | ... |
@@ -44,7 +44,7 @@ func openNextAvailableLoopback(index int, sparseFile *osFile) (loopFile *osFile, |
| 44 | 44 |
continue |
| 45 | 45 |
} |
| 46 | 46 |
|
| 47 |
- // Open the targeted loopback (use OpenFile because Open sets O_CLOEXEC) |
|
| 47 |
+ // OpenFile adds O_CLOEXEC |
|
| 48 | 48 |
loopFile, err = osOpenFile(target, osORdWr, 0644) |
| 49 | 49 |
if err != nil {
|
| 50 | 50 |
utils.Errorf("Error openning loopback device: %s", err)
|
| ... | ... |
@@ -89,7 +89,7 @@ func attachLoopDevice(sparseName string) (loop *osFile, err error) {
|
| 89 | 89 |
utils.Debugf("Error retrieving the next available loopback: %s", err)
|
| 90 | 90 |
} |
| 91 | 91 |
|
| 92 |
- // Open the given sparse file (use OpenFile because Open sets O_CLOEXEC) |
|
| 92 |
+ // OpenFile adds O_CLOEXEC |
|
| 93 | 93 |
sparseFile, err := osOpenFile(sparseName, osORdWr, 0644) |
| 94 | 94 |
if err != nil {
|
| 95 | 95 |
utils.Errorf("Error openning sparse file %s: %s", sparseName, err)
|
| ... | ... |
@@ -34,9 +34,7 @@ var ( |
| 34 | 34 |
osRename = os.Rename |
| 35 | 35 |
osReadlink = os.Readlink |
| 36 | 36 |
|
| 37 |
- execRun = func(name string, args ...string) error {
|
|
| 38 |
- return exec.Command(name, args...).Run() |
|
| 39 |
- } |
|
| 37 |
+ execRun = func(name string, args ...string) error { return exec.Command(name, args...).Run() }
|
|
| 40 | 38 |
) |
| 41 | 39 |
|
| 42 | 40 |
const ( |