(loopdev string)
| 216 | } |
| 217 | |
| 218 | func removeLoop(loopdev string) error { |
| 219 | file, err := os.Open(loopdev) |
| 220 | if err != nil { |
| 221 | return err |
| 222 | } |
| 223 | defer file.Close() |
| 224 | |
| 225 | return unix.IoctlSetInt(int(file.Fd()), unix.LOOP_CLR_FD, 0) |
| 226 | } |
| 227 | |
| 228 | // AttachLoopDevice attaches a specified backing file to a loop device |
| 229 | func AttachLoopDevice(backingFile string) (string, error) { |
searching dependent graphs…