all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob e2c7328bfa7c938853dd0604a17531057e1e5ae6 1847 bytes (raw)
name: gnu/packages/patches/rkdeveloptool-pine64-dump-over-2gib.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
diff --git a/main.cpp b/main.cpp
index 029f0e2..e40bce2 100644
--- a/main.cpp
+++ b/main.cpp
@@ -2455,12 +2455,6 @@ bool read_lba(
 
 	if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM))
 		return false;
-	if (uiLen % 512) {
-		fprintf(stderr, "Length must be a multiple of sector size (%d)\n",
-				SECTOR_SIZE);
-		return false;
-	}
-	uiLen /= 512;
 
 	if (!bRet) {
 		fprintf(stderr, "Read LBA quit, creating comm object failed!\n");
@@ -3265,7 +3259,7 @@ bool handle_command(int argc, char *argv[], CRKScan *pScan) {
 				bRet = get_lba_from_gpt(master_gpt, argv[2], &lba, &lba_end);
 				if (bRet) {
 					bSuccess = read_lba(dev, (u32)lba,
-							((u32)(lba_end - lba + 1)) * 512, argv[3]);
+							(u32)(lba_end - lba + 1), argv[3]);
 				} else {
 					fprintf(stderr, "Could not find the %s partition\n", argv[2]);
 				}
@@ -3276,7 +3270,7 @@ bool handle_command(int argc, char *argv[], CRKScan *pScan) {
 	} else if (strcmp(strCmd.c_str(), "RL") == 0 ||
 			strcmp(strCmd.c_str(), "READ") == 0) {
 		char *pszEnd;
-		UINT uiBegin, uiLen;
+		UINT uiBegin;
 		if (argc != 5)
 			fprintf(stderr, "Usage: rkdeveloptool read start-sector num-bytes "
 				   "filename\n");
@@ -3285,11 +3279,15 @@ bool handle_command(int argc, char *argv[], CRKScan *pScan) {
 			if (*pszEnd)
 				fprintf(stderr, "Begin is invalid, please check!\n");
 			else {
-				uiLen = strtoul(argv[3], &pszEnd, 0);
+				unsigned long long len = strtoull(argv[3], &pszEnd, 0);
 				if (*pszEnd)
 					fprintf(stderr, "Len is invalid, please check!\n");
-				else {
-					bSuccess = read_lba(dev, uiBegin, uiLen, argv[4]);
+				else if (len % 512) {
+					fprintf(stderr, "Length must be a multiple of sector size (%d)\n",
+                		SECTOR_SIZE);
+				} else {
+					len /= 512;
+					bSuccess = read_lba(dev, uiBegin, len, argv[4]);
 				}
 			}
 		}

debug log:

solving e2c7328bfa ...
found e2c7328bfa in https://yhetil.org/guix/6XwlW0pv9PKJRs5EpjYqiuxGyWHP4CkN6LgVyRTWr2sckdnqv2IN4t4CXdwTMWobju8YsW1X1OdeFPm4hbc_Pl0-a2vQg9emVleqQsZ1GCY=@protonmail.com/ ||
	https://yhetil.org/guix/9bQQgGpGjEpK7TZ2fb-yyHVRE5iY_PwlW7-do2Vk-7GwTPccqK2gx8ZQxETFeCXM6RmGa8352V9dxCWEKLUc5UhLScl67ZdLVQk3FyUQFp8=@protonmail.com/

applying [1/1] https://yhetil.org/guix/6XwlW0pv9PKJRs5EpjYqiuxGyWHP4CkN6LgVyRTWr2sckdnqv2IN4t4CXdwTMWobju8YsW1X1OdeFPm4hbc_Pl0-a2vQg9emVleqQsZ1GCY=@protonmail.com/
diff --git a/gnu/packages/patches/rkdeveloptool-pine64-dump-over-2gib.patch b/gnu/packages/patches/rkdeveloptool-pine64-dump-over-2gib.patch
new file mode 100644
index 0000000000..e2c7328bfa

1:12: trailing whitespace.
 
1:13: space before tab in indent.
 	if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM))
1:14: space before tab in indent.
 		return false;
1:21: trailing whitespace.
 
1:22: space before tab in indent.
 	if (!bRet) {
Checking patch gnu/packages/patches/rkdeveloptool-pine64-dump-over-2gib.patch...
Applied patch gnu/packages/patches/rkdeveloptool-pine64-dump-over-2gib.patch cleanly.
warning: squelched 21 whitespace errors
warning: 26 lines add whitespace errors.

skipping https://yhetil.org/guix/9bQQgGpGjEpK7TZ2fb-yyHVRE5iY_PwlW7-do2Vk-7GwTPccqK2gx8ZQxETFeCXM6RmGa8352V9dxCWEKLUc5UhLScl67ZdLVQk3FyUQFp8=@protonmail.com/ for e2c7328bfa
index at:
100644 e2c7328bfa7c938853dd0604a17531057e1e5ae6	gnu/packages/patches/rkdeveloptool-pine64-dump-over-2gib.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.