-grep "^$DISK" /proc/mounts | while read mtline; do
- mtpnt=$(echo $mtline | awk '{print $2}')
- vtdebug "Trying to umount $mtpnt ..."
- umount $mtpnt >/dev/null 2>&1
-done
-
-if swapon -s | grep -q "^${DISK}[0-9]"; then
- swapon -s | grep "^${DISK}[0-9]" | awk '{print $1}' | while read line; do
- vtdebug "Trying to swapoff $line ..."
- swapoff $line
- done
+if [ "$MODE" = "list" ]; then
+ version=$(get_disk_ventoy_version $DISK)
+ if [ $? -eq 0 ]; then
+ echo "Ventoy Version in Disk: $version"
+
+ vtPart1Type=$(dd if=$DISK bs=1 count=1 skip=450 status=none | hexdump -n1 -e '1/1 "%02X"')
+ if [ "$vtPart1Type" = "EE" ]; then
+ echo "Disk Partition Style : GPT"
+ else
+ echo "Disk Partition Style : MBR"
+ fi
+
+ if check_disk_secure_boot $DISK; then
+ echo "Secure Boot Support : YES"
+ else
+ echo "Secure Boot Support : NO"
+ fi
+ else
+ echo "Ventoy Version: NA"
+ fi
+ echo ""
+ exit 0