* 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) {
+ fsckSetBlock(fsckContext, fsckPhaseAfterMessage, __lambda(fsck_block_status_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;
} else {
return fsckBlockContinue;
}
- });
+ }));
}
}
DoAgain:
blockSize,
0,
jnlInfo.name,
- ^(off_t start, void *data, size_t len) {
+ __lambda(int, (off_t start, void *data, size_t len), {
Buf_t *buf;
int rv;
rv = CacheRead(&fscache, start, (int)len, &buf);
rv = CacheWrite(&fscache, buf, 0, kLockWrite);
if (rv != 0)
abort();
- return 0;}
+ return 0;})
) == -1) {
fsckPrint(GPtr->context, E_DirtyJournal);
GPtr->JStat |= S_DirtyJournal;
^(uint64_t x) { return OSSwapInt64(x); }
};
-typedef int (^journal_write_block_t)(off_t, void *, size_t);
+typedef int (__lambda_ journal_write_block_t)(off_t, void *, size_t);
//
// this isn't a great checksum routine but it will do for now.
size_t min_fs_blksize, // Blocksize of the data filesystem, journal blocksize must be at least this size
uint32_t flags __unused, // Not used in this implementation
const char *jdev_name, // The name of the journal device, for logging
- int (^do_write_b)(off_t, void*, size_t))
+ int (__lambda_ do_write_b)(off_t, void*, size_t))
{
journal_header jhdr = { 0 };
swapper_t *jnlSwap; // Used to swap fields of the journal
size_t min_fs_block_size,
uint32_t flags,
const char *jdev_name,
- int (^do_write_b)(off_t, void *, size_t));
+ int (__lambda_ do_write_b)(off_t, void *, size_t));
#endif /* !_FSCK_JOURNAL_H */
* 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 (__lambda_ 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);