unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 20170557443d44d572d2bde22a69647b43c28579 5681 bytes (raw)
name: gnu/packages/patches/hfsplus-tools-no-blocks.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
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
 
diff -up diskdev_cmds-540.1.linux3/fsck_hfs.tproj/dfalib/SControl.c.jx diskdev_cmds-540.1.linux3/fsck_hfs.tproj/dfalib/SControl.c
--- diskdev_cmds-540.1.linux3/fsck_hfs.tproj/dfalib/SControl.c.jx	2012-02-02 17:16:56.000000000 -0500
+++ diskdev_cmds-540.1.linux3/fsck_hfs.tproj/dfalib/SControl.c	2014-06-18 13:01:42.716781467 -0400
@@ -200,6 +200,22 @@ isMinorError(int msg, int *counts)
 	}
 }
 
+static int *msgCounts = NULL;
+static jmp_buf envBuf;
+
+static fsck_block_status_t
+fsckAfterCallback(fsck_ctx_t c, int msgNum, va_list args)
+{
+	if (abs(msgNum) > E_FirstError && abs(msgNum) < E_LastError) {
+		if (isMinorError(abs(msgNum), msgCounts) == 1)
+			return fsckBlockContinue;
+		longjmp(envBuf, 1);
+		return fsckBlockAbort;
+	} else {
+		return fsckBlockContinue;
+	}
+}
+
 /*------------------------------------------------------------------------------
 
 External
@@ -207,7 +223,6 @@ External
 
 ------------------------------------------------------------------------------*/
 
-static jmp_buf				envBuf;
 int
 CheckHFS( const char *rdevnode, int fsReadRef, int fsWriteRef, int checkLevel, 
 	  int repairLevel, fsck_ctx_t fsckContext, int lostAndFoundMode, 
@@ -222,7 +237,6 @@ CheckHFS( const char *rdevnode, int fsRe
 	int					isJournaled = 0;
 	Boolean 			autoRepair;
 	Boolean				exitEarly = 0;
-	__block int *msgCounts = NULL;
 	Boolean				majorErrors = 0;
 
 	if (checkLevel == kMajorCheck) {
@@ -292,16 +306,7 @@ CheckHFS( const char *rdevnode, int fsRe
 			 * the message in question corresponds to a major or a minor error.  If it's
 			 * major, we longjmp just above, which causes us to exit out early.
 			 */
-			fsckSetBlock(fsckContext, fsckPhaseAfterMessage, (fsckBlock_t) ^(fsck_ctx_t c, int msgNum, va_list args) {
-				if (abs(msgNum) > E_FirstError && abs(msgNum) < E_LastError) {
-					if (isMinorError(abs(msgNum), msgCounts) == 1)
-						return fsckBlockContinue;
-					longjmp(envBuf, 1);
-					return fsckBlockAbort;
-				} else {
-					return fsckBlockContinue;
-				}
-			});
+			fsckSetBlock(fsckContext, fsckPhaseAfterMessage, fsckAfterCallback);
 		}
 	}
 DoAgain:
diff -up diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.c.jx diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.c
--- diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.c.jx	2012-02-02 17:42:58.000000000 -0500
+++ diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.c	2014-06-18 12:57:01.110952333 -0400
@@ -29,7 +29,6 @@
 #include <stdarg.h>
 #include <string.h>
 #include <assert.h>
-#include <Block.h>
 
 #include "fsck_messages.h"
 #include "fsck_keys.h"
@@ -287,20 +286,10 @@ fsckSetBlock(fsck_ctx_t c, fsck_block_ph
 	if (c != NULL) {
 		switch (phase) {
 		case fsckPhaseBeforeMessage:
-			if (ctx->preMessage) {
-				Block_release(ctx->preMessage);
-				ctx->preMessage = NULL;
-			}
-			if (bp)
-				ctx->preMessage = (fsckBlock_t)Block_copy(bp);
+			ctx->preMessage = bp;
 			break;
 		case fsckPhaseAfterMessage:
-			if (ctx->postMessage) {
-				Block_release(ctx->postMessage);
-				ctx->postMessage = NULL;
-			}
-			if (bp)
-				ctx->postMessage = (fsckBlock_t)Block_copy(bp);
+			ctx->postMessage = bp;
 			break;
 		case fsckPhaseNone:
 			/* Just here for compiler warnings */
@@ -591,12 +580,6 @@ fsckDestroy(fsck_ctx_t c)
 	if (ctx->flags & cfFromFD) {
 		fclose(ctx->fp);
 	}
-	if (ctx->preMessage) {
-		Block_release(ctx->preMessage);
-	}
-	if (ctx->postMessage) {
-		Block_release(ctx->postMessage);
-	}
 
 	free(ctx);
 	return;
diff -up diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.h.jx diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.h
--- diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.h.jx	2012-02-02 17:54:40.000000000 -0500
+++ diskdev_cmds-540.1.linux3/fsck_hfs.tproj/fsck_messages.h	2014-06-18 12:31:48.602094998 -0400
@@ -139,7 +139,7 @@ typedef enum fsck_block_phase_type fsck_
  * the third is a va_list of the arguments for the message.
  */
 
-typedef fsck_block_status_t (^fsckBlock_t)(fsck_ctx_t, int, va_list);
+typedef fsck_block_status_t (*fsckBlock_t)(fsck_ctx_t, int, va_list);
 
 extern fsckBlock_t fsckGetBlock(fsck_ctx_t, fsck_block_phase_t);
 extern void fsckSetBlock(fsck_ctx_t, fsck_block_phase_t, fsckBlock_t);
diff -up diskdev_cmds-540.1.linux3/fsck_hfs.tproj/Makefile.lnx.jx diskdev_cmds-540.1.linux3/fsck_hfs.tproj/Makefile.lnx
--- diskdev_cmds-540.1.linux3/fsck_hfs.tproj/Makefile.lnx.jx	2012-02-03 11:25:21.000000000 -0500
+++ diskdev_cmds-540.1.linux3/fsck_hfs.tproj/Makefile.lnx	2014-06-18 12:52:03.146015370 -0400
@@ -4,7 +4,7 @@ OFILES = $(CFILES:.c=.o)
 all: fsck_hfs
 
 fsck_hfs: $(OFILES) dfalib/libdfa.a
-	  $(CC) $(CFLAGS) $(LDFLAGS) $(OFILES) dfalib/libdfa.a -o fsck_hfs -lBlocksRunTime -lpthread
+	  $(CC) $(CFLAGS) $(LDFLAGS) $(OFILES) dfalib/libdfa.a -o fsck_hfs -lpthread
 
 dfalib/libdfa.a: FORCE
 	$(MAKE) -C dfalib -f Makefile.lnx libdfa.a
diff -up diskdev_cmds-540.1.linux3/Makefile.jx diskdev_cmds-540.1.linux3/Makefile
--- diskdev_cmds-540.1.linux3/Makefile.jx	2012-02-16 15:00:18.000000000 -0500
+++ diskdev_cmds-540.1.linux3/Makefile	2014-06-18 12:42:59.015463500 -0400
@@ -1,9 +1,8 @@
 VERSION=540.1.linux3
 
-CC := clang
-CFLAGS := -g3 -Wall -fblocks -I$(PWD)/BlocksRunTime -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1 -D VERSION=\"$(VERSION)\"
-LDFLAGS := -Wl,--build-id -L$(PWD)/BlocksRunTime
-SUBDIRS := BlocksRunTime newfs_hfs.tproj fsck_hfs.tproj
+CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1 -D VERSION=\"$(VERSION)\"
+LDFLAGS := -Wl,--build-id
+SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
 
 all clean:
 	for d in $(SUBDIRS); do $(MAKE) -C $$d -f Makefile.lnx $@; done

debug log:

solving 2017055744 ...
found 2017055744 in https://yhetil.org/guix-patches/20190404164954.26854-1-mail@ambrevar.xyz/

applying [1/1] https://yhetil.org/guix-patches/20190404164954.26854-1-mail@ambrevar.xyz/
diff --git a/gnu/packages/patches/hfsplus-tools-no-blocks.patch b/gnu/packages/patches/hfsplus-tools-no-blocks.patch
new file mode 100644
index 0000000000..2017055744

1:11: space before tab in indent.
 	}
1:13: trailing whitespace.
 
1:31: trailing whitespace.
 
1:34: trailing whitespace.
 
1:36: trailing whitespace.
 
Checking patch gnu/packages/patches/hfsplus-tools-no-blocks.patch...
Applied patch gnu/packages/patches/hfsplus-tools-no-blocks.patch cleanly.
warning: squelched 36 whitespace errors
warning: 41 lines add whitespace errors.

index at:
100644 20170557443d44d572d2bde22a69647b43c28579	gnu/packages/patches/hfsplus-tools-no-blocks.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).