Skip to content

Commit

Permalink
[DeviceManager]
Browse files Browse the repository at this point in the history
* add more debug
  • Loading branch information
jbleyel committed Jan 8, 2025
1 parent 781f8d4 commit bebc0dd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/python/Screens/DeviceManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,10 @@ def keyMountPointCallback(needsReboot=False):
return
elif storageDevice.get("fsType") == "swap":
def swapCallback(data, retVal, extraArgs):
if retVal:
print(f"[DeviceManager] swap failed / RC:{retVal}")
if config.crash.debugStorage.value:
print(data)
self.updateDevices()
command = "swapoff" if storageDevice.get("swapState") else "swapon"
self.console.ePopen(f"{command} {storageDevice.get("devicePoint")}", swapCallback)
Expand Down Expand Up @@ -697,6 +701,10 @@ def checkMount(data, retVal, extraArgs):
storageDevice = current[self.LIST_DATA]
if storageDevice.get("fsType") == "swap":
def swapCallback(data, retVal, extraArgs):
if retVal:
print(f"[DeviceManager] swap failed / RC:{retVal}")
if config.crash.debugStorage.value:
print(data)
self.updateDevices()
command = "swapoff" if storageDevice.get("swapState") else "swapon"
self.console.ePopen(f"{command} {storageDevice.get("devicePoint")}", swapCallback)
Expand Down Expand Up @@ -768,7 +776,12 @@ def getActionFunction(self, action, storageDevice):
}.get(action)

def keyActions(self):
def renameActionCallback(result=None, retval=None, extra_args=None):
def renameActionCallback(data, retVal, extraArgs):
if retVal:
print(f"[DeviceManager] rename failed / RC:{retVal}")
if config.crash.debugStorage.value:
print(data)

def renameActionCallback2():
self.reloadTimer = None
self.updateDevices()
Expand Down

0 comments on commit bebc0dd

Please sign in to comment.