]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - VtoyTool/vtoydm.c
1. Fix some bugs when do update after non-destructive installation.
[Ventoy.git] / VtoyTool / vtoydm.c
index 8e748c255533238884577e785caf0b771ae176d3..e830ce7364e884d7c7cd20a7c501f8dee7a5280a 100644 (file)
@@ -41,7 +41,9 @@
 #endif
 
 #ifndef USE_DIET_C
+#ifndef __mips__
 typedef unsigned long long uint64_t;
+#endif
 typedef unsigned int    uint32_t;
 #endif
 
@@ -507,9 +509,18 @@ static int vtoydm_print_linear_table(const char *img_map_file, const char *diskn
                (sector_start << 2), disk_sector_num, 
                diskname, (unsigned long long)chunk[i].disk_start_sector);
         #else
-        printf("%u %u linear %s1 %llu\n", 
+        if (strstr(diskname, "nvme") || strstr(diskname, "mmc") || strstr(diskname, "nbd"))
+        {
+            printf("%u %u linear %sp1 %llu\n", 
+               (sector_start << 2), disk_sector_num, 
+               diskname, (unsigned long long)chunk[i].disk_start_sector - 2048);
+        }
+        else
+        {
+            printf("%u %u linear %s1 %llu\n", 
                (sector_start << 2), disk_sector_num, 
                diskname, (unsigned long long)chunk[i].disk_start_sector - 2048);
+        }
         #endif
     }