0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-03-02 20:05:55 +00:00
Lakka-LibreELEC/projects/L4T/packages/gptfdisk/patches/0006-Allow-partition-dynamically-allocated-by-largest-new.patch
GavinDarkglider 600e246a94 L4T/Ayn: upstream changes from 5.x
Lakka 5.x Switch changes (#1853)
Lakka v5.x switchroot 5.1.2 (#1871)
Fix Switch Issue's in upstream 5.x (#1888)
Minor Switch Changes (#1893)
Lakka v5.x switch 3 (#1895)
Lakka v5.x switch 4 (#1898)
L4T: Xorg-server: Fix build issue (#1924)
Switch: remove ra patch
Lakka v5.x switch 6 (#1926)
Cleanups, More LibreELEC Stuff, more permission fixes, Misc switch stuff. (#1930)
Switch: U-Boot: bump version to 2024-NX02 (#1946)

L4T/Ayn post-upstreaming fixes
- retroarch_joypad_autoconfig: remove spaces from file names
- retroarch: remove Switch specific patch merged upstream
- libXv: move to L4T packages folder (package removed in upstream)
- bring some packages from v5.x to L4T packages
- ffmpeg: remove vulkan
- remove stella core from Switch build (missing C++ headers)
- Ayn/Odin: use proper kernel arg to not hide kernel messages in console
- connman: add wpa_supplicant support back
2024-05-21 15:41:36 +02:00

39 lines
1.5 KiB
Diff

From caf30c022c5f659bb7a5e52272c6aeca94098c70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Joaqu=C3=ADn=20Shourabi=20Porcel?= <david@djsp.eu>
Date: Sat, 28 Jan 2023 16:19:16 +0100
Subject: [PATCH 06/12] Allow partition dynamically allocated by --largest-new
to be referenced by other options
The documentation for the option --new explains that:
> [a] partnum value of 0 causes the program to use the first available
> partition number. Subsequent uses of the -A (--attributes), -c
> (--change-name), -t (--typecode), and -u (--partition-guid) options
> may also use 0 to refer to the same partition.
Although the documentation for the option --largest-new does not mention
such functionality, I expected it, and was puzzled when it didn't work.
---
gptcl.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gptcl.cc b/gptcl.cc
index 0d578eb..e8d394a 100644
--- a/gptcl.cc
+++ b/gptcl.cc
@@ -331,8 +331,10 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
startSector = FindFirstInLargest();
Align(&startSector);
endSector = FindLastInFree(startSector, alignEnd);
- if (largestPartNum <= 0)
+ if (largestPartNum <= 0) {
largestPartNum = FindFirstFreePart() + 1;
+ newPartNum = largestPartNum - 1;
+ }
if (CreatePartition(largestPartNum - 1, startSector, endSector)) {
saveData = 1;
} else {
--
2.31.1