Sat Apr 18 12:54:38 2020 UTC ()
add NO_IOBUF_ALIGNED to not pull aligned_alloc() for really constrained
boot media


(jdolecek)
diff -r1.54 -r1.55 src/sbin/fsck_ffs/fsck.h
diff -r1.18 -r1.19 src/sbin/newfs/extern.h

cvs diff -r1.54 -r1.55 src/sbin/fsck_ffs/fsck.h (expand / switch to unified diff)

--- src/sbin/fsck_ffs/fsck.h 2020/04/05 15:25:40 1.54
+++ src/sbin/fsck_ffs/fsck.h 2020/04/18 12:54:38 1.55
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: fsck.h,v 1.54 2020/04/05 15:25:40 joerg Exp $ */ 1/* $NetBSD: fsck.h,v 1.55 2020/04/18 12:54:38 jdolecek Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1980, 1986, 1993 4 * Copyright (c) 1980, 1986, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * 7 *
8 * This software was developed for the FreeBSD Project by Marshall 8 * This software was developed for the FreeBSD Project by Marshall
9 * Kirk McKusick and Network Associates Laboratories, the Security 9 * Kirk McKusick and Network Associates Laboratories, the Security
10 * Research Division of Network Associates, Inc. under DARPA/SPAWAR 10 * Research Division of Network Associates, Inc. under DARPA/SPAWAR
11 * contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS 11 * contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS
12 * research program 12 * research program
13 * 13 *
14 * Redistribution and use in source and binary forms, with or without 14 * Redistribution and use in source and binary forms, with or without
@@ -384,13 +384,17 @@ iswap32(u_int32_t x) @@ -384,13 +384,17 @@ iswap32(u_int32_t x)
384 384
385static inline u_int64_t 385static inline u_int64_t
386iswap64(u_int64_t x) 386iswap64(u_int64_t x)
387{ 387{
388 if (needswap) 388 if (needswap)
389 return bswap64(x); 389 return bswap64(x);
390 else return x; 390 else return x;
391} 391}
392#else 392#else
393#define iswap16(x) (x) 393#define iswap16(x) (x)
394#define iswap32(x) (x) 394#define iswap32(x) (x)
395#define iswap64(x) (x) 395#define iswap64(x) (x)
396#endif /* NO_FFS_EI */ 396#endif /* NO_FFS_EI */
 397
 398#ifdef NO_IOBUF_ALIGNED
 399#define aligned_alloc(align, size) malloc((size))
 400#endif

cvs diff -r1.18 -r1.19 src/sbin/newfs/extern.h (expand / switch to unified diff)

--- src/sbin/newfs/extern.h 2017/02/08 18:05:25 1.18
+++ src/sbin/newfs/extern.h 2020/04/18 12:54:38 1.19
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: extern.h,v 1.18 2017/02/08 18:05:25 rin Exp $ */ 1/* $NetBSD: extern.h,v 1.19 2020/04/18 12:54:38 jdolecek Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997 Christos Zoulas. All rights reserved. 4 * Copyright (c) 1997 Christos Zoulas. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 14 *
@@ -62,13 +62,18 @@ extern int needswap; /* Filesystem not i @@ -62,13 +62,18 @@ extern int needswap; /* Filesystem not i
62#define ffs_cg_swap(a, b, c) __nothing 62#define ffs_cg_swap(a, b, c) __nothing
63#define ffs_csum_swap(a, b, c) __nothing 63#define ffs_csum_swap(a, b, c) __nothing
64#define ffs_dinode1_swap(a, b) __nothing 64#define ffs_dinode1_swap(a, b) __nothing
65#define ffs_sb_swap(a, b) __nothing 65#define ffs_sb_swap(a, b) __nothing
66#endif 66#endif
67 67
68#ifndef NO_APPLE_UFS 68#ifndef NO_APPLE_UFS
69extern int isappleufs; /* Filesystem is Apple UFS */ 69extern int isappleufs; /* Filesystem is Apple UFS */
70extern char *appleufs_volname; /* Apple UFS volume name */ 70extern char *appleufs_volname; /* Apple UFS volume name */
71#else 71#else
72/* Disable Apple UFS support for install media */ 72/* Disable Apple UFS support for install media */
73#define isappleufs (0) 73#define isappleufs (0)
74#endif 74#endif
 75
 76#ifdef NO_IOBUF_ALIGNED
 77#define aligned_alloc(align, size) malloc((size))
 78#endif
 79