Exists() and HasDevice() just check if device file exists or not. It does
not say anything about if device is mounted or not. Fix comments.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
| ... | ... |
@@ -1786,7 +1786,7 @@ func (devices *DeviceSet) UnmountDevice(hash string) error {
|
| 1786 | 1786 |
return nil |
| 1787 | 1787 |
} |
| 1788 | 1788 |
|
| 1789 |
-// HasDevice returns true if the device is in the hash and mounted. |
|
| 1789 |
+// HasDevice returns true if the device metadata exists. |
|
| 1790 | 1790 |
func (devices *DeviceSet) HasDevice(hash string) bool {
|
| 1791 | 1791 |
devices.Lock() |
| 1792 | 1792 |
defer devices.Unlock() |
| ... | ... |
@@ -196,7 +196,7 @@ func (d *Driver) Put(id string) error {
|
| 196 | 196 |
return err |
| 197 | 197 |
} |
| 198 | 198 |
|
| 199 |
-// Exists checks to see if the device is mounted. |
|
| 199 |
+// Exists checks to see if the device exists. |
|
| 200 | 200 |
func (d *Driver) Exists(id string) bool {
|
| 201 | 201 |
return d.DeviceSet.HasDevice(id) |
| 202 | 202 |
} |