From 8fb2b70ed5bd7ef9b5a686002d0d0c0260afdefd Mon Sep 17 00:00:00 2001 From: Brett Gordon Date: Tue, 22 Dec 2015 09:34:58 -0500 Subject: [PATCH] ucp.c: bugfix: attempt to compare swizzled data with unswizzled constant. This fixes 'rm' segfault. --- Standalone/ucp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Standalone/ucp.c b/Standalone/ucp.c index 41fd54a3..1e57212d 100644 --- a/Standalone/ucp.c +++ b/Standalone/ucp.c @@ -1930,7 +1930,7 @@ static void blk_free(int devno, blkno_t blk) validblk(devno, blk); - if (dev->s_nfree == 50) { + if (dev->s_nfree == swizzle16(50) ) { buf = bread(devno, blk, 1); bcopy((char *) &(dev->s_nfree), buf, 512); bawrite((bufptr) buf); -- 2.34.1