From b993bb87ded5c733e1f0213efbef1be2660b2536 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 21 Oct 2011 04:09:25 +0200 Subject: [PATCH] kernel: Move GPL'd kernel files to sys/gnu to have them all in one place. This affects files in sys/dev/sound/pci/gnu and sys/vfs/gnu/ext2fs. sys/gnu is analogous to the gnu directory for userland, i.e. below it, we follow the same hierarchy as in /usr/src/sys. This commit changes the location of the ext2fs headers, which are public, so I've bumped __DragonFly_version in order to have something to patch against in pkgsrc, in case this causes build breakage for any packages. --- Makefile_upgrade.inc | 1 + etc/mtree/BSD.include.dist | 10 +- include/Makefile | 3 +- lib/libfsid/ext2.c | 4 +- sys/Makefile.modules | 2 +- sys/conf/files | 30 +-- sys/dev/sound/driver/emu10k1/Makefile | 3 +- sys/dev/sound/pci/csa.c | 2 +- sys/dev/sound/pci/emu10k1.c | 2 +- sys/dev/sound/pci/maestro3.c | 4 +- sys/gnu/Makefile | 3 + .../pci/gnu => gnu/dev/sound/pci}/csaimg.h | 1 - .../gnu => gnu/dev/sound/pci}/emu10k1-ac97.h | 7 +- .../gnu => gnu/dev/sound/pci}/emu10k1-alsa.h | 9 +- .../pci/gnu => gnu/dev/sound/pci}/emu10k1.h | 9 +- .../gnu => gnu/dev/sound/pci}/maestro3_dsp.h | 227 +++++++++--------- .../gnu => gnu/dev/sound/pci}/maestro3_reg.h | 3 +- sys/gnu/vfs/Makefile | 3 + .../gnu => gnu/vfs}/ext2fs/COPYRIGHT.INFO | 2 - sys/{vfs/gnu => gnu/vfs}/ext2fs/Makefile | 0 sys/{vfs/gnu => gnu/vfs}/ext2fs/dinode.h | 1 - sys/{vfs/gnu => gnu/vfs}/ext2fs/dir.h | 3 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_alloc.c | 37 ++- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_balloc.c | 27 +-- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_bitops.h | 1 - sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_bmap.c | 5 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_extern.h | 5 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_fs.h | 7 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_fs_sb.h | 4 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_ihash.c | 2 - sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_inode.c | 3 +- .../gnu => gnu/vfs}/ext2fs/ext2_inode_cnv.c | 11 +- .../vfs}/ext2fs/ext2_linux_balloc.c | 47 ++-- .../vfs}/ext2fs/ext2_linux_ialloc.c | 25 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_lookup.c | 18 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_quota.c | 1 - .../gnu => gnu/vfs}/ext2fs/ext2_readwrite.c | 7 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_subr.c | 2 - sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_vfsops.c | 57 +++-- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_vnops.c | 48 ++-- sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2mount.h | 1 - sys/{vfs/gnu => gnu/vfs}/ext2fs/fs.h | 3 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/i386-bitops.h | 7 +- sys/{vfs/gnu => gnu/vfs}/ext2fs/inode.h | 1 - sys/{vfs/gnu => gnu/vfs}/ext2fs/quota.h | 1 - sys/sys/param.h | 4 +- sys/vfs/Makefile | 3 +- sys/vfs/gnu/Makefile | 6 - 48 files changed, 315 insertions(+), 347 deletions(-) create mode 100644 sys/gnu/Makefile rename sys/{dev/sound/pci/gnu => gnu/dev/sound/pci}/csaimg.h (99%) rename sys/{dev/sound/pci/gnu => gnu/dev/sound/pci}/emu10k1-ac97.h (98%) rename sys/{dev/sound/pci/gnu => gnu/dev/sound/pci}/emu10k1-alsa.h (99%) rename sys/{dev/sound/pci/gnu => gnu/dev/sound/pci}/emu10k1.h (99%) rename sys/{dev/sound/pci/gnu => gnu/dev/sound/pci}/maestro3_dsp.h (71%) rename sys/{dev/sound/pci/gnu => gnu/dev/sound/pci}/maestro3_reg.h (99%) create mode 100644 sys/gnu/vfs/Makefile rename sys/{vfs/gnu => gnu/vfs}/ext2fs/COPYRIGHT.INFO (95%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/Makefile (100%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/dinode.h (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/dir.h (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_alloc.c (96%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_balloc.c (92%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_bitops.h (96%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_bmap.c (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_extern.h (96%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_fs.h (99%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_fs_sb.h (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_ihash.c (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_inode.c (99%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_inode_cnv.c (94%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_linux_balloc.c (95%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_linux_ialloc.c (96%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_lookup.c (99%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_quota.c (99%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_readwrite.c (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_subr.c (97%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_vfsops.c (97%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2_vnops.c (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/ext2mount.h (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/fs.h (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/i386-bitops.h (96%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/inode.h (98%) rename sys/{vfs/gnu => gnu/vfs}/ext2fs/quota.h (98%) delete mode 100644 sys/vfs/gnu/Makefile diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index 1a09924e85..8af9ff638e 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -1726,6 +1726,7 @@ TO_REMOVE+=/usr/share/misc/gprof.callg TO_REMOVE+=/usr/share/misc/gprof.flat TO_REMOVE+=/usr/share/man/cat4/i386/ndis.4.gz TO_REMOVE+=/usr/share/man/man4/i386/ndis.4.gz +TO_REMOVE+=/usr/include/vfs/gnu .if ${MACHINE_ARCH} == "x86_64" TO_REMOVE+=/usr/libdata/stallion/2681.sys diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index e829d129e8..4cecf66360 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -97,6 +97,12 @@ linux .. .. + gnu + vfs + ext2fs + .. + .. + .. i4b_machine .. libmilter @@ -270,10 +276,6 @@ .. smbfs .. - gnu - ext2fs - .. - .. isofs cd9660 .. diff --git a/include/Makefile b/include/Makefile index ae7d1292c4..6e73459bb6 100644 --- a/include/Makefile +++ b/include/Makefile @@ -54,7 +54,8 @@ LDIRS= net netbt netgraph netinet netinet6 sys vm # LSUBDIRS= bus/cam bus/cam/scsi \ emulation/linux \ - vfs/msdosfs vfs/nfs vfs/ntfs vfs/nwfs vfs/gnu/ext2fs \ + gnu/vfs/ext2fs \ + vfs/msdosfs vfs/nfs vfs/ntfs vfs/nwfs \ vfs/smbfs vfs/udf vfs/ufs vfs/hammer \ net/vlan net/ipfw net/ip6fw net/dummynet net/sppp net/ip_mroute \ net/bridge net/tap net/tun net/ppp net/ppp_layer net/sl \ diff --git a/lib/libfsid/ext2.c b/lib/libfsid/ext2.c index 26ce9fa1e4..68391f3824 100644 --- a/lib/libfsid/ext2.c +++ b/lib/libfsid/ext2.c @@ -32,8 +32,8 @@ * SUCH DAMAGE. */ -#include -#include +#include +#include #include "libfsid.h" diff --git a/sys/Makefile.modules b/sys/Makefile.modules index bd5f3ba32a..242fbbe63c 100644 --- a/sys/Makefile.modules +++ b/sys/Makefile.modules @@ -7,7 +7,7 @@ SUBDIR=${MODULES_OVERRIDE} .if ${MACHINE_PLATFORM} != "vkernel" && ${MACHINE_PLATFORM} != "vkernel64" SUBDIR=bus .endif -SUBDIR+=crypto emulation dev kern net netbt netgraph netproto vfs +SUBDIR+=crypto emulation dev gnu kern net netbt netgraph netproto vfs SUBDIR+=libiconv .endif diff --git a/sys/conf/files b/sys/conf/files index 3eea9ad5d8..77c6506642 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -31,8 +31,8 @@ aic79xx_reg_print.o optional ahd pci ahd_reg_pretty_print \ compile-with "${NORMAL_C} ${WERROR}" \ no-implicit-rule local emu10k1-alsa%diked.h optional snd_emu10k1 pci \ - dependency "$S/tools/emu10k1-mkalsa.sh $S/dev/sound/pci/gnu/emu10k1-alsa.h" \ - compile-with "CC=${CC} AWK=${AWK} sh $S/tools/emu10k1-mkalsa.sh $S/dev/sound/pci/gnu/emu10k1-alsa.h emu10k1-alsa%diked.h" \ + dependency "$S/tools/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h" \ + compile-with "CC=${CC} AWK=${AWK} sh $S/tools/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h emu10k1-alsa%diked.h" \ no-obj no-implicit-rule before-depend \ clean "emu10k1-alsa%diked.h" kern/device_if.m standard @@ -773,19 +773,19 @@ dev/netif/rtw/smc93cx6.c optional rtw dev/netif/rtw/if_rtw_pci.c optional rtw pci dev/netif/xe/if_xe.c optional xe dev/netif/xe/if_xe_pccard.c optional xe pccard -vfs/gnu/ext2fs/ext2_alloc.c optional ext2fs -vfs/gnu/ext2fs/ext2_balloc.c optional ext2fs -vfs/gnu/ext2fs/ext2_bmap.c optional ext2fs -vfs/gnu/ext2fs/ext2_inode.c optional ext2fs -vfs/gnu/ext2fs/ext2_inode_cnv.c optional ext2fs -vfs/gnu/ext2fs/ext2_linux_balloc.c optional ext2fs -vfs/gnu/ext2fs/ext2_linux_ialloc.c optional ext2fs -vfs/gnu/ext2fs/ext2_lookup.c optional ext2fs -vfs/gnu/ext2fs/ext2_subr.c optional ext2fs -vfs/gnu/ext2fs/ext2_vfsops.c optional ext2fs -vfs/gnu/ext2fs/ext2_vnops.c optional ext2fs -vfs/gnu/ext2fs/ext2_ihash.c optional ext2fs -vfs/gnu/ext2fs/ext2_quota.c optional ext2fs +gnu/vfs/ext2fs/ext2_alloc.c optional ext2fs +gnu/vfs/ext2fs/ext2_balloc.c optional ext2fs +gnu/vfs/ext2fs/ext2_bmap.c optional ext2fs +gnu/vfs/ext2fs/ext2_inode.c optional ext2fs +gnu/vfs/ext2fs/ext2_inode_cnv.c optional ext2fs +gnu/vfs/ext2fs/ext2_linux_balloc.c optional ext2fs +gnu/vfs/ext2fs/ext2_linux_ialloc.c optional ext2fs +gnu/vfs/ext2fs/ext2_lookup.c optional ext2fs +gnu/vfs/ext2fs/ext2_subr.c optional ext2fs +gnu/vfs/ext2fs/ext2_vfsops.c optional ext2fs +gnu/vfs/ext2fs/ext2_vnops.c optional ext2fs +gnu/vfs/ext2fs/ext2_ihash.c optional ext2fs +gnu/vfs/ext2fs/ext2_quota.c optional ext2fs # # isdn4bsd device drivers # diff --git a/sys/dev/sound/driver/emu10k1/Makefile b/sys/dev/sound/driver/emu10k1/Makefile index 2e07b2e827..98f59224cb 100644 --- a/sys/dev/sound/driver/emu10k1/Makefile +++ b/sys/dev/sound/driver/emu10k1/Makefile @@ -1,8 +1,7 @@ # $FreeBSD: src/sys/modules/sound/driver/emu10k1/Makefile,v 1.4 2004/01/11 10:30:56 obrien Exp $ -# $DragonFly: src/sys/dev/sound/driver/emu10k1/Makefile,v 1.3 2007/01/04 21:47:01 corecode Exp $ .PATH: ${.CURDIR}/../../pci \ - ${.CURDIR}/../../pci/gnu + ${.CURDIR}/../../../../gnu/dev/sound/pci KMOD= snd_emu10k1 SRCS= device_if.h bus_if.h pci_if.h emu10k1-alsa%diked.h diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 94830fe460..e1fafad031 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -47,7 +47,7 @@ #include #include -#include +#include SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/csa.c,v 1.8 2007/01/04 21:47:02 corecode Exp $"); diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index 89dc886a99..15d33b76fc 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include "emu10k1-alsa%diked.h" #include diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index 603fa21797..587af38b16 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -60,8 +60,8 @@ #include #include -#include -#include +#include +#include /* -------------------------------------------------------------------- */ diff --git a/sys/gnu/Makefile b/sys/gnu/Makefile new file mode 100644 index 0000000000..9cd3fece14 --- /dev/null +++ b/sys/gnu/Makefile @@ -0,0 +1,3 @@ +SUBDIR= vfs + +.include diff --git a/sys/dev/sound/pci/gnu/csaimg.h b/sys/gnu/dev/sound/pci/csaimg.h similarity index 99% rename from sys/dev/sound/pci/gnu/csaimg.h rename to sys/gnu/dev/sound/pci/csaimg.h index 8a2afff310..6d87f3ae83 100644 --- a/sys/dev/sound/pci/gnu/csaimg.h +++ b/sys/gnu/dev/sound/pci/csaimg.h @@ -20,7 +20,6 @@ * USA. * * $FreeBSD: src/sys/gnu/dev/sound/pci/csaimg.h,v 1.2 2005/01/06 18:27:30 imp Exp $ - * $DragonFly: src/sys/dev/sound/pci/gnu/csaimg.h,v 1.3 2007/01/04 21:47:03 corecode Exp $ * ***************************************************************************/ diff --git a/sys/dev/sound/pci/gnu/emu10k1-ac97.h b/sys/gnu/dev/sound/pci/emu10k1-ac97.h similarity index 98% rename from sys/dev/sound/pci/gnu/emu10k1-ac97.h rename to sys/gnu/dev/sound/pci/emu10k1-ac97.h index 65b1be74c9..3cf3c8487e 100644 --- a/sys/dev/sound/pci/gnu/emu10k1-ac97.h +++ b/sys/gnu/dev/sound/pci/emu10k1-ac97.h @@ -1,5 +1,4 @@ /* $FreeBSD: src/sys/gnu/dev/sound/pci/emu10k1-ac97.h,v 1.2 2004/01/09 05:08:32 obrien Exp $ */ -/* $DragonFly: src/sys/dev/sound/pci/gnu/emu10k1-ac97.h,v 1.1 2007/01/04 21:47:03 corecode Exp $ */ #ifndef _AC97_CODEC_H_ #define _AC97_CODEC_H_ @@ -12,7 +11,7 @@ /* AC97 1.0 */ #define AC97_RESET 0x0000 // #define AC97_MASTER_VOL_STEREO 0x0002 // Line Out -#define AC97_HEADPHONE_VOL 0x0004 // +#define AC97_HEADPHONE_VOL 0x0004 // #define AC97_MASTER_VOL_MONO 0x0006 // TAD Output #define AC97_MASTER_TONE 0x0008 // #define AC97_PCBEEP_VOL 0x000a // none @@ -227,7 +226,7 @@ struct ac97_codec { char *name; int id; - int dev_mixer; + int dev_mixer; int type; int modem:1; @@ -269,7 +268,7 @@ struct ac97_codec { /* * Operation structures for each known AC97 chip */ - + struct ac97_ops { /* Initialise */ diff --git a/sys/dev/sound/pci/gnu/emu10k1-alsa.h b/sys/gnu/dev/sound/pci/emu10k1-alsa.h similarity index 99% rename from sys/dev/sound/pci/gnu/emu10k1-alsa.h rename to sys/gnu/dev/sound/pci/emu10k1-alsa.h index 0b1488e1e3..79f3afcccf 100644 --- a/sys/dev/sound/pci/gnu/emu10k1-alsa.h +++ b/sys/gnu/dev/sound/pci/emu10k1-alsa.h @@ -24,7 +24,6 @@ */ /* $FreeBSD: src/sys/gnu/dev/sound/pci/emu10k1-alsa.h,v 1.2 2005/01/06 18:26:37 imp Exp $ */ -/* $DragonFly: src/sys/dev/sound/pci/gnu/emu10k1-alsa.h,v 1.2 2007/06/16 20:07:20 dillon Exp $ */ #include @@ -380,7 +379,7 @@ #define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ #define ENVVOL 0x10 /* Volume envelope register */ -#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ +#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ /* 0x8000-n == 666*n usec delay */ #define ATKHLDV 0x11 /* Volume envelope hold and attack register */ @@ -699,7 +698,7 @@ /* This is the MPU port on the Audigy Drive */ #define A_MUDATA2 0x72 #define A_MUCMD2 0x73 -#define A_MUSTAT2 A_MUCMD2 +#define A_MUSTAT2 A_MUCMD2 /* The next two are the Audigy equivalent of FXWC */ /* the Audigy can record any output (16bit, 48kHz, up to 64 channel simultaneously) */ @@ -966,7 +965,7 @@ struct _snd_emu10k1 { snd_emu10k1_fx8010_t fx8010; /* FX8010 info */ int gpr_base; - + ac97_t *ac97; struct pci_dev *pci; @@ -1206,7 +1205,7 @@ int snd_emu10k1_proc_init(emu10k1_t * emu); #define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */ #define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */ #define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */ -#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */ +#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */ #define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */ #define A_EXTIN_LINE2_R 0x09 /* right */ #define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */ diff --git a/sys/dev/sound/pci/gnu/emu10k1.h b/sys/gnu/dev/sound/pci/emu10k1.h similarity index 99% rename from sys/dev/sound/pci/gnu/emu10k1.h rename to sys/gnu/dev/sound/pci/emu10k1.h index 1853008462..95cc7605fb 100644 --- a/sys/dev/sound/pci/gnu/emu10k1.h +++ b/sys/gnu/dev/sound/pci/emu10k1.h @@ -12,7 +12,7 @@ * line endings * December 8, 1999 Jon Taylor Added lots of new register info * May 16, 2001 Daniel Bertrand Added unofficial DBG register info - * Oct-Nov 2001 D.B. Added unofficial Audigy registers + * Oct-Nov 2001 D.B. Added unofficial Audigy registers * ********************************************************************** * @@ -34,7 +34,6 @@ * ********************************************************************** * $FreeBSD: src/sys/gnu/dev/sound/pci/emu10k1.h,v 1.8 2005/01/06 18:27:30 imp Exp $ - * $DragonFly: src/sys/dev/sound/pci/gnu/emu10k1.h,v 1.4 2007/01/04 21:47:03 corecode Exp $ */ @@ -350,7 +349,7 @@ #define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ #define ENVVOL 0x10 /* Volume envelope register */ -#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ +#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ /* 0x8000-n == 666*n usec delay */ #define ATKHLDV 0x11 /* Volume envelope hold and attack register */ @@ -668,7 +667,7 @@ /* This is the MPU port on the Audigy Drive */ #define A_MUDATA2 0x72 #define A_MUCMD2 0x73 -#define A_MUSTAT2 A_MUCMD2 +#define A_MUSTAT2 A_MUCMD2 /* The next two are the Audigy equivalent of FXWC */ /* the Audigy can record any output (16bit, 48kHz, up to 64 channel simultaneously) */ @@ -731,7 +730,7 @@ /* Audigy Soundcard have a different instruction format */ #define AUDIGY_CODEBASE 0x600 -#define A_LOWORD_OPY_MASK 0x000007ff +#define A_LOWORD_OPY_MASK 0x000007ff #define A_LOWORD_OPX_MASK 0x007ff000 #define A_HIWORD_OPCODE_MASK 0x0f000000 #define A_HIWORD_RESULT_MASK 0x007ff000 diff --git a/sys/dev/sound/pci/gnu/maestro3_dsp.h b/sys/gnu/dev/sound/pci/maestro3_dsp.h similarity index 71% rename from sys/dev/sound/pci/gnu/maestro3_dsp.h rename to sys/gnu/dev/sound/pci/maestro3_dsp.h index 5cd3863c12..5aecad21b0 100644 --- a/sys/dev/sound/pci/gnu/maestro3_dsp.h +++ b/sys/gnu/dev/sound/pci/maestro3_dsp.h @@ -1,5 +1,4 @@ /* $FreeBSD: src/sys/gnu/dev/sound/pci/maestro3_dsp.h,v 1.5 2005/01/06 18:27:30 imp Exp $ */ -/* $DragonFly: src/sys/dev/sound/pci/gnu/maestro3_dsp.h,v 1.3 2007/01/04 21:47:03 corecode Exp $ */ /*- * ESS Technology allegro audio driver. * @@ -27,86 +26,86 @@ */ u_int16_t assp_kernel_image[] = { - 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, - 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, - 0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, - 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x0063, 0x7980, 0x006B, 0x7980, 0x03B4, 0x7980, 0x03B4, - 0xBF80, 0x2C7C, 0x8806, 0x8804, 0xBE40, 0xBC20, 0xAE09, 0x1000, 0xAE0A, 0x0001, 0x6938, 0xEB08, - 0x0053, 0x695A, 0xEB08, 0x00D6, 0x0009, 0x8B88, 0x6980, 0xE388, 0x0036, 0xBE30, 0xBC20, 0x6909, - 0xB801, 0x9009, 0xBE41, 0xBE41, 0x6928, 0xEB88, 0x0078, 0xBE41, 0xBE40, 0x7980, 0x0038, 0xBE41, - 0xBE41, 0x903A, 0x6938, 0xE308, 0x0056, 0x903A, 0xBE41, 0xBE40, 0xEF00, 0x903A, 0x6939, 0xE308, - 0x005E, 0x903A, 0xEF00, 0x690B, 0x660C, 0xEF8C, 0x690A, 0x660C, 0x620B, 0x6609, 0xEF00, 0x6910, - 0x660F, 0xEF04, 0xE388, 0x0075, 0x690E, 0x660F, 0x6210, 0x660D, 0xEF00, 0x690E, 0x660D, 0xEF00, - 0xAE70, 0x0001, 0xBC20, 0xAE27, 0x0001, 0x6939, 0xEB08, 0x005D, 0x6926, 0xB801, 0x9026, 0x0026, - 0x8B88, 0x6980, 0xE388, 0x00CB, 0x9028, 0x0D28, 0x4211, 0xE100, 0x007A, 0x4711, 0xE100, 0x00A0, - 0x7A80, 0x0063, 0xB811, 0x660A, 0x6209, 0xE304, 0x007A, 0x0C0B, 0x4005, 0x100A, 0xBA01, 0x9012, - 0x0C12, 0x4002, 0x7980, 0x00AF, 0x7A80, 0x006B, 0xBE02, 0x620E, 0x660D, 0xBA10, 0xE344, 0x007A, - 0x0C10, 0x4005, 0x100E, 0xBA01, 0x9012, 0x0C12, 0x4002, 0x1003, 0xBA02, 0x9012, 0x0C12, 0x4000, - 0x1003, 0xE388, 0x00BA, 0x1004, 0x7980, 0x00BC, 0x1004, 0xBA01, 0x9012, 0x0C12, 0x4001, 0x0C05, - 0x4003, 0x0C06, 0x4004, 0x1011, 0xBFB0, 0x01FF, 0x9012, 0x0C12, 0x4006, 0xBC20, 0xEF00, 0xAE26, - 0x1028, 0x6970, 0xBFD0, 0x0001, 0x9070, 0xE388, 0x007A, 0xAE28, 0x0000, 0xEF00, 0xAE70, 0x0300, - 0x0C70, 0xB00C, 0xAE5A, 0x0000, 0xEF00, 0x7A80, 0x038A, 0x697F, 0xB801, 0x907F, 0x0056, 0x8B88, - 0x0CA0, 0xB008, 0xAF71, 0xB000, 0x4E71, 0xE200, 0x00F3, 0xAE56, 0x1057, 0x0056, 0x0CA0, 0xB008, - 0x8056, 0x7980, 0x03A1, 0x0810, 0xBFA0, 0x1059, 0xE304, 0x03A1, 0x8056, 0x7980, 0x03A1, 0x7A80, - 0x038A, 0xBF01, 0xBE43, 0xBE59, 0x907C, 0x6937, 0xE388, 0x010D, 0xBA01, 0xE308, 0x010C, 0xAE71, - 0x0004, 0x0C71, 0x5000, 0x6936, 0x9037, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, 0xBF0A, - 0x0560, 0xF500, 0xBF0A, 0x0520, 0xB900, 0xBB17, 0x90A0, 0x6917, 0xE388, 0x0148, 0x0D17, 0xE100, - 0x0127, 0xBF0C, 0x0578, 0xBF0D, 0x057C, 0x7980, 0x012B, 0xBF0C, 0x0538, 0xBF0D, 0x053C, 0x6900, - 0xE308, 0x0135, 0x8B8C, 0xBE59, 0xBB07, 0x90A0, 0xBC20, 0x7980, 0x0157, 0x030C, 0x8B8B, 0xB903, - 0x8809, 0xBEC6, 0x013E, 0x69AC, 0x90AB, 0x69AD, 0x90AB, 0x0813, 0x660A, 0xE344, 0x0144, 0x0309, - 0x830C, 0xBC20, 0x7980, 0x0157, 0x6955, 0xE388, 0x0157, 0x7C38, 0xBF0B, 0x0578, 0xF500, 0xBF0B, - 0x0538, 0xB907, 0x8809, 0xBEC6, 0x0156, 0x10AB, 0x90AA, 0x6974, 0xE388, 0x0163, 0xAE72, 0x0540, - 0xF500, 0xAE72, 0x0500, 0xAE61, 0x103B, 0x7A80, 0x02F6, 0x6978, 0xE388, 0x0182, 0x8B8C, 0xBF0C, - 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA20, 0x8812, 0x733D, 0x7A80, 0x0380, 0x733E, 0x7A80, 0x0380, - 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA2C, 0x8812, 0x733F, 0x7A80, 0x0380, 0x7340, - 0x7A80, 0x0380, 0x6975, 0xE388, 0x018E, 0xAE72, 0x0548, 0xF500, 0xAE72, 0x0508, 0xAE61, 0x1041, - 0x7A80, 0x02F6, 0x6979, 0xE388, 0x01AD, 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA18, - 0x8812, 0x7343, 0x7A80, 0x0380, 0x7344, 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, - 0x0814, 0xBA24, 0x8812, 0x7345, 0x7A80, 0x0380, 0x7346, 0x7A80, 0x0380, 0x6976, 0xE388, 0x01B9, - 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x1047, 0x7A80, 0x02F6, 0x697A, 0xE388, 0x01D8, - 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA08, 0x8812, 0x7349, 0x7A80, 0x0380, 0x734A, - 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA14, 0x8812, 0x734B, 0x7A80, - 0x0380, 0x734C, 0x7A80, 0x0380, 0xBC21, 0xAE1C, 0x1090, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40, - 0x0812, 0xB804, 0x8813, 0x8B8D, 0xBF0D, 0x056C, 0xE500, 0x7C40, 0x0815, 0xB804, 0x8811, 0x7A80, - 0x034A, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40, 0x731F, 0xB903, 0x8809, 0xBEC6, 0x01F9, 0x548A, - 0xBE03, 0x98A0, 0x7320, 0xB903, 0x8809, 0xBEC6, 0x0201, 0x548A, 0xBE03, 0x98A0, 0x1F20, 0x2F1F, - 0x9826, 0xBC20, 0x6935, 0xE388, 0x03A1, 0x6933, 0xB801, 0x9033, 0xBFA0, 0x02EE, 0xE308, 0x03A1, - 0x9033, 0xBF00, 0x6951, 0xE388, 0x021F, 0x7334, 0xBE80, 0x5760, 0xBE03, 0x9F7E, 0xBE59, 0x9034, - 0x697E, 0x0D51, 0x9013, 0xBC20, 0x695C, 0xE388, 0x03A1, 0x735E, 0xBE80, 0x5760, 0xBE03, 0x9F7E, - 0xBE59, 0x905E, 0x697E, 0x0D5C, 0x9013, 0x7980, 0x03A1, 0x7A80, 0x038A, 0xBF01, 0xBE43, 0x6977, - 0xE388, 0x024E, 0xAE61, 0x104D, 0x0061, 0x8B88, 0x6980, 0xE388, 0x024E, 0x9071, 0x0D71, 0x000B, - 0xAFA0, 0x8010, 0xAFA0, 0x8010, 0x0810, 0x660A, 0xE308, 0x0249, 0x0009, 0x0810, 0x660C, 0xE388, - 0x024E, 0x800B, 0xBC20, 0x697B, 0xE388, 0x03A1, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, - 0xE100, 0x0266, 0x697C, 0xBF90, 0x0560, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0564, 0x9073, 0x0473, - 0x7980, 0x0270, 0x697C, 0xBF90, 0x0520, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0524, 0x9073, 0x0473, - 0x697C, 0xB801, 0x907C, 0xBF0A, 0x10FD, 0x8B8A, 0xAF80, 0x8010, 0x734F, 0x548A, 0xBE03, 0x9880, - 0xBC21, 0x7326, 0x548B, 0xBE03, 0x618B, 0x988C, 0xBE03, 0x6180, 0x9880, 0x7980, 0x03A1, 0x7A80, - 0x038A, 0x0D28, 0x4711, 0xE100, 0x02BE, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, 0x02B6, - 0xBFA0, 0x0800, 0xE388, 0x02B2, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02A3, 0x6909, - 0x900B, 0x7980, 0x02A5, 0xAF0B, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, 0x02ED, - 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x6909, 0x900B, 0x7980, 0x02B8, 0xAF0B, 0x4005, - 0xAF05, 0x4003, 0xAF06, 0x4004, 0x7980, 0x02ED, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, - 0x02E7, 0xBFA0, 0x0800, 0xE388, 0x02E3, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02D4, - 0x690D, 0x9010, 0x7980, 0x02D6, 0xAF10, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, - 0x02ED, 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x690D, 0x9010, 0x7980, 0x02E9, 0xAF10, - 0x4005, 0xAF05, 0x4003, 0xAF06, 0x4004, 0xBC20, 0x6970, 0x9071, 0x7A80, 0x0078, 0x6971, 0x9070, - 0x7980, 0x03A1, 0xBC20, 0x0361, 0x8B8B, 0x6980, 0xEF88, 0x0272, 0x0372, 0x7804, 0x9071, 0x0D71, - 0x8B8A, 0x000B, 0xB903, 0x8809, 0xBEC6, 0x0309, 0x69A8, 0x90AB, 0x69A8, 0x90AA, 0x0810, 0x660A, - 0xE344, 0x030F, 0x0009, 0x0810, 0x660C, 0xE388, 0x0314, 0x800B, 0xBC20, 0x6961, 0xB801, 0x9061, - 0x7980, 0x02F7, 0x7A80, 0x038A, 0x5D35, 0x0001, 0x6934, 0xB801, 0x9034, 0xBF0A, 0x109E, 0x8B8A, - 0xAF80, 0x8014, 0x4880, 0xAE72, 0x0550, 0xF500, 0xAE72, 0x0510, 0xAE61, 0x1051, 0x7A80, 0x02F6, - 0x7980, 0x03A1, 0x7A80, 0x038A, 0x5D35, 0x0002, 0x695E, 0xB801, 0x905E, 0xBF0A, 0x109E, 0x8B8A, - 0xAF80, 0x8014, 0x4780, 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x105C, 0x7A80, 0x02F6, - 0x7980, 0x03A1, 0x001C, 0x8B88, 0x6980, 0xEF88, 0x901D, 0x0D1D, 0x100F, 0x6610, 0xE38C, 0x0358, - 0x690E, 0x6610, 0x620F, 0x660D, 0xBA0F, 0xE301, 0x037A, 0x0410, 0x8B8A, 0xB903, 0x8809, 0xBEC6, - 0x036C, 0x6A8C, 0x61AA, 0x98AB, 0x6A8C, 0x61AB, 0x98AD, 0x6A8C, 0x61AD, 0x98A9, 0x6A8C, 0x61A9, - 0x98AA, 0x7C04, 0x8B8B, 0x7C04, 0x8B8D, 0x7C04, 0x8B89, 0x7C04, 0x0814, 0x660E, 0xE308, 0x0379, - 0x040D, 0x8410, 0xBC21, 0x691C, 0xB801, 0x901C, 0x7980, 0x034A, 0xB903, 0x8809, 0x8B8A, 0xBEC6, - 0x0388, 0x54AC, 0xBE03, 0x618C, 0x98AA, 0xEF00, 0xBC20, 0xBE46, 0x0809, 0x906B, 0x080A, 0x906C, - 0x080B, 0x906D, 0x081A, 0x9062, 0x081B, 0x9063, 0x081E, 0x9064, 0xBE59, 0x881E, 0x8065, 0x8166, - 0x8267, 0x8368, 0x8469, 0x856A, 0xEF00, 0xBC20, 0x696B, 0x8809, 0x696C, 0x880A, 0x696D, 0x880B, - 0x6962, 0x881A, 0x6963, 0x881B, 0x6964, 0x881E, 0x0065, 0x0166, 0x0267, 0x0368, 0x0469, 0x056A, - 0xBE3A, + 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, + 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, + 0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, + 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x0063, 0x7980, 0x006B, 0x7980, 0x03B4, 0x7980, 0x03B4, + 0xBF80, 0x2C7C, 0x8806, 0x8804, 0xBE40, 0xBC20, 0xAE09, 0x1000, 0xAE0A, 0x0001, 0x6938, 0xEB08, + 0x0053, 0x695A, 0xEB08, 0x00D6, 0x0009, 0x8B88, 0x6980, 0xE388, 0x0036, 0xBE30, 0xBC20, 0x6909, + 0xB801, 0x9009, 0xBE41, 0xBE41, 0x6928, 0xEB88, 0x0078, 0xBE41, 0xBE40, 0x7980, 0x0038, 0xBE41, + 0xBE41, 0x903A, 0x6938, 0xE308, 0x0056, 0x903A, 0xBE41, 0xBE40, 0xEF00, 0x903A, 0x6939, 0xE308, + 0x005E, 0x903A, 0xEF00, 0x690B, 0x660C, 0xEF8C, 0x690A, 0x660C, 0x620B, 0x6609, 0xEF00, 0x6910, + 0x660F, 0xEF04, 0xE388, 0x0075, 0x690E, 0x660F, 0x6210, 0x660D, 0xEF00, 0x690E, 0x660D, 0xEF00, + 0xAE70, 0x0001, 0xBC20, 0xAE27, 0x0001, 0x6939, 0xEB08, 0x005D, 0x6926, 0xB801, 0x9026, 0x0026, + 0x8B88, 0x6980, 0xE388, 0x00CB, 0x9028, 0x0D28, 0x4211, 0xE100, 0x007A, 0x4711, 0xE100, 0x00A0, + 0x7A80, 0x0063, 0xB811, 0x660A, 0x6209, 0xE304, 0x007A, 0x0C0B, 0x4005, 0x100A, 0xBA01, 0x9012, + 0x0C12, 0x4002, 0x7980, 0x00AF, 0x7A80, 0x006B, 0xBE02, 0x620E, 0x660D, 0xBA10, 0xE344, 0x007A, + 0x0C10, 0x4005, 0x100E, 0xBA01, 0x9012, 0x0C12, 0x4002, 0x1003, 0xBA02, 0x9012, 0x0C12, 0x4000, + 0x1003, 0xE388, 0x00BA, 0x1004, 0x7980, 0x00BC, 0x1004, 0xBA01, 0x9012, 0x0C12, 0x4001, 0x0C05, + 0x4003, 0x0C06, 0x4004, 0x1011, 0xBFB0, 0x01FF, 0x9012, 0x0C12, 0x4006, 0xBC20, 0xEF00, 0xAE26, + 0x1028, 0x6970, 0xBFD0, 0x0001, 0x9070, 0xE388, 0x007A, 0xAE28, 0x0000, 0xEF00, 0xAE70, 0x0300, + 0x0C70, 0xB00C, 0xAE5A, 0x0000, 0xEF00, 0x7A80, 0x038A, 0x697F, 0xB801, 0x907F, 0x0056, 0x8B88, + 0x0CA0, 0xB008, 0xAF71, 0xB000, 0x4E71, 0xE200, 0x00F3, 0xAE56, 0x1057, 0x0056, 0x0CA0, 0xB008, + 0x8056, 0x7980, 0x03A1, 0x0810, 0xBFA0, 0x1059, 0xE304, 0x03A1, 0x8056, 0x7980, 0x03A1, 0x7A80, + 0x038A, 0xBF01, 0xBE43, 0xBE59, 0x907C, 0x6937, 0xE388, 0x010D, 0xBA01, 0xE308, 0x010C, 0xAE71, + 0x0004, 0x0C71, 0x5000, 0x6936, 0x9037, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, 0xBF0A, + 0x0560, 0xF500, 0xBF0A, 0x0520, 0xB900, 0xBB17, 0x90A0, 0x6917, 0xE388, 0x0148, 0x0D17, 0xE100, + 0x0127, 0xBF0C, 0x0578, 0xBF0D, 0x057C, 0x7980, 0x012B, 0xBF0C, 0x0538, 0xBF0D, 0x053C, 0x6900, + 0xE308, 0x0135, 0x8B8C, 0xBE59, 0xBB07, 0x90A0, 0xBC20, 0x7980, 0x0157, 0x030C, 0x8B8B, 0xB903, + 0x8809, 0xBEC6, 0x013E, 0x69AC, 0x90AB, 0x69AD, 0x90AB, 0x0813, 0x660A, 0xE344, 0x0144, 0x0309, + 0x830C, 0xBC20, 0x7980, 0x0157, 0x6955, 0xE388, 0x0157, 0x7C38, 0xBF0B, 0x0578, 0xF500, 0xBF0B, + 0x0538, 0xB907, 0x8809, 0xBEC6, 0x0156, 0x10AB, 0x90AA, 0x6974, 0xE388, 0x0163, 0xAE72, 0x0540, + 0xF500, 0xAE72, 0x0500, 0xAE61, 0x103B, 0x7A80, 0x02F6, 0x6978, 0xE388, 0x0182, 0x8B8C, 0xBF0C, + 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA20, 0x8812, 0x733D, 0x7A80, 0x0380, 0x733E, 0x7A80, 0x0380, + 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA2C, 0x8812, 0x733F, 0x7A80, 0x0380, 0x7340, + 0x7A80, 0x0380, 0x6975, 0xE388, 0x018E, 0xAE72, 0x0548, 0xF500, 0xAE72, 0x0508, 0xAE61, 0x1041, + 0x7A80, 0x02F6, 0x6979, 0xE388, 0x01AD, 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA18, + 0x8812, 0x7343, 0x7A80, 0x0380, 0x7344, 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, + 0x0814, 0xBA24, 0x8812, 0x7345, 0x7A80, 0x0380, 0x7346, 0x7A80, 0x0380, 0x6976, 0xE388, 0x01B9, + 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x1047, 0x7A80, 0x02F6, 0x697A, 0xE388, 0x01D8, + 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA08, 0x8812, 0x7349, 0x7A80, 0x0380, 0x734A, + 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA14, 0x8812, 0x734B, 0x7A80, + 0x0380, 0x734C, 0x7A80, 0x0380, 0xBC21, 0xAE1C, 0x1090, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40, + 0x0812, 0xB804, 0x8813, 0x8B8D, 0xBF0D, 0x056C, 0xE500, 0x7C40, 0x0815, 0xB804, 0x8811, 0x7A80, + 0x034A, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40, 0x731F, 0xB903, 0x8809, 0xBEC6, 0x01F9, 0x548A, + 0xBE03, 0x98A0, 0x7320, 0xB903, 0x8809, 0xBEC6, 0x0201, 0x548A, 0xBE03, 0x98A0, 0x1F20, 0x2F1F, + 0x9826, 0xBC20, 0x6935, 0xE388, 0x03A1, 0x6933, 0xB801, 0x9033, 0xBFA0, 0x02EE, 0xE308, 0x03A1, + 0x9033, 0xBF00, 0x6951, 0xE388, 0x021F, 0x7334, 0xBE80, 0x5760, 0xBE03, 0x9F7E, 0xBE59, 0x9034, + 0x697E, 0x0D51, 0x9013, 0xBC20, 0x695C, 0xE388, 0x03A1, 0x735E, 0xBE80, 0x5760, 0xBE03, 0x9F7E, + 0xBE59, 0x905E, 0x697E, 0x0D5C, 0x9013, 0x7980, 0x03A1, 0x7A80, 0x038A, 0xBF01, 0xBE43, 0x6977, + 0xE388, 0x024E, 0xAE61, 0x104D, 0x0061, 0x8B88, 0x6980, 0xE388, 0x024E, 0x9071, 0x0D71, 0x000B, + 0xAFA0, 0x8010, 0xAFA0, 0x8010, 0x0810, 0x660A, 0xE308, 0x0249, 0x0009, 0x0810, 0x660C, 0xE388, + 0x024E, 0x800B, 0xBC20, 0x697B, 0xE388, 0x03A1, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, + 0xE100, 0x0266, 0x697C, 0xBF90, 0x0560, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0564, 0x9073, 0x0473, + 0x7980, 0x0270, 0x697C, 0xBF90, 0x0520, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0524, 0x9073, 0x0473, + 0x697C, 0xB801, 0x907C, 0xBF0A, 0x10FD, 0x8B8A, 0xAF80, 0x8010, 0x734F, 0x548A, 0xBE03, 0x9880, + 0xBC21, 0x7326, 0x548B, 0xBE03, 0x618B, 0x988C, 0xBE03, 0x6180, 0x9880, 0x7980, 0x03A1, 0x7A80, + 0x038A, 0x0D28, 0x4711, 0xE100, 0x02BE, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, 0x02B6, + 0xBFA0, 0x0800, 0xE388, 0x02B2, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02A3, 0x6909, + 0x900B, 0x7980, 0x02A5, 0xAF0B, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, 0x02ED, + 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x6909, 0x900B, 0x7980, 0x02B8, 0xAF0B, 0x4005, + 0xAF05, 0x4003, 0xAF06, 0x4004, 0x7980, 0x02ED, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, + 0x02E7, 0xBFA0, 0x0800, 0xE388, 0x02E3, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02D4, + 0x690D, 0x9010, 0x7980, 0x02D6, 0xAF10, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, + 0x02ED, 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x690D, 0x9010, 0x7980, 0x02E9, 0xAF10, + 0x4005, 0xAF05, 0x4003, 0xAF06, 0x4004, 0xBC20, 0x6970, 0x9071, 0x7A80, 0x0078, 0x6971, 0x9070, + 0x7980, 0x03A1, 0xBC20, 0x0361, 0x8B8B, 0x6980, 0xEF88, 0x0272, 0x0372, 0x7804, 0x9071, 0x0D71, + 0x8B8A, 0x000B, 0xB903, 0x8809, 0xBEC6, 0x0309, 0x69A8, 0x90AB, 0x69A8, 0x90AA, 0x0810, 0x660A, + 0xE344, 0x030F, 0x0009, 0x0810, 0x660C, 0xE388, 0x0314, 0x800B, 0xBC20, 0x6961, 0xB801, 0x9061, + 0x7980, 0x02F7, 0x7A80, 0x038A, 0x5D35, 0x0001, 0x6934, 0xB801, 0x9034, 0xBF0A, 0x109E, 0x8B8A, + 0xAF80, 0x8014, 0x4880, 0xAE72, 0x0550, 0xF500, 0xAE72, 0x0510, 0xAE61, 0x1051, 0x7A80, 0x02F6, + 0x7980, 0x03A1, 0x7A80, 0x038A, 0x5D35, 0x0002, 0x695E, 0xB801, 0x905E, 0xBF0A, 0x109E, 0x8B8A, + 0xAF80, 0x8014, 0x4780, 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x105C, 0x7A80, 0x02F6, + 0x7980, 0x03A1, 0x001C, 0x8B88, 0x6980, 0xEF88, 0x901D, 0x0D1D, 0x100F, 0x6610, 0xE38C, 0x0358, + 0x690E, 0x6610, 0x620F, 0x660D, 0xBA0F, 0xE301, 0x037A, 0x0410, 0x8B8A, 0xB903, 0x8809, 0xBEC6, + 0x036C, 0x6A8C, 0x61AA, 0x98AB, 0x6A8C, 0x61AB, 0x98AD, 0x6A8C, 0x61AD, 0x98A9, 0x6A8C, 0x61A9, + 0x98AA, 0x7C04, 0x8B8B, 0x7C04, 0x8B8D, 0x7C04, 0x8B89, 0x7C04, 0x0814, 0x660E, 0xE308, 0x0379, + 0x040D, 0x8410, 0xBC21, 0x691C, 0xB801, 0x901C, 0x7980, 0x034A, 0xB903, 0x8809, 0x8B8A, 0xBEC6, + 0x0388, 0x54AC, 0xBE03, 0x618C, 0x98AA, 0xEF00, 0xBC20, 0xBE46, 0x0809, 0x906B, 0x080A, 0x906C, + 0x080B, 0x906D, 0x081A, 0x9062, 0x081B, 0x9063, 0x081E, 0x9064, 0xBE59, 0x881E, 0x8065, 0x8166, + 0x8267, 0x8368, 0x8469, 0x856A, 0xEF00, 0xBC20, 0x696B, 0x8809, 0x696C, 0x880A, 0x696D, 0x880B, + 0x6962, 0x881A, 0x6963, 0x881B, 0x6964, 0x881E, 0x0065, 0x0166, 0x0267, 0x0368, 0x0469, 0x056A, + 0xBE3A, }; /* @@ -114,39 +113,39 @@ u_int16_t assp_kernel_image[] = { * that is to be loaded at 0x400 on the DSP. */ u_int16_t assp_minisrc_image[] = { - 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, - 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, - 0x7A80, 0x002A, 0xBE40, 0x3029, 0xEFCC, 0xBE41, 0x7A80, 0x0028, 0xBE40, 0x3028, 0xEFCC, 0x6907, - 0xE308, 0x042A, 0x6909, 0x902C, 0x7980, 0x042C, 0x690D, 0x902C, 0x1009, 0x881A, 0x100A, 0xBA01, - 0x881B, 0x100D, 0x881C, 0x100E, 0xBA01, 0x881D, 0xBF80, 0x00ED, 0x881E, 0x050C, 0x0124, 0xB904, - 0x9027, 0x6918, 0xE308, 0x04B3, 0x902D, 0x6913, 0xBFA0, 0x7598, 0xF704, 0xAE2D, 0x00FF, 0x8B8D, - 0x6919, 0xE308, 0x0463, 0x691A, 0xE308, 0x0456, 0xB907, 0x8809, 0xBEC6, 0x0453, 0x10A9, 0x90AD, - 0x7980, 0x047C, 0xB903, 0x8809, 0xBEC6, 0x0460, 0x1889, 0x6C22, 0x90AD, 0x10A9, 0x6E23, 0x6C22, - 0x90AD, 0x7980, 0x047C, 0x101A, 0xE308, 0x046F, 0xB903, 0x8809, 0xBEC6, 0x046C, 0x10A9, 0x90A0, - 0x90AD, 0x7980, 0x047C, 0xB901, 0x8809, 0xBEC6, 0x047B, 0x1889, 0x6C22, 0x90A0, 0x90AD, 0x10A9, - 0x6E23, 0x6C22, 0x90A0, 0x90AD, 0x692D, 0xE308, 0x049C, 0x0124, 0xB703, 0xB902, 0x8818, 0x8B89, - 0x022C, 0x108A, 0x7C04, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99A0, - 0x108A, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99AF, 0x7B99, 0x0484, - 0x0124, 0x060F, 0x101B, 0x2013, 0x901B, 0xBFA0, 0x7FFF, 0xE344, 0x04AC, 0x901B, 0x8B89, 0x7A80, - 0x051A, 0x6927, 0xBA01, 0x9027, 0x7A80, 0x0523, 0x6927, 0xE308, 0x049E, 0x7980, 0x050F, 0x0624, - 0x1026, 0x2013, 0x9026, 0xBFA0, 0x7FFF, 0xE304, 0x04C0, 0x8B8D, 0x7A80, 0x051A, 0x7980, 0x04B4, - 0x9026, 0x1013, 0x3026, 0x901B, 0x8B8D, 0x7A80, 0x051A, 0x7A80, 0x0523, 0x1027, 0xBA01, 0x9027, - 0xE308, 0x04B4, 0x0124, 0x060F, 0x8B89, 0x691A, 0xE308, 0x04EA, 0x6919, 0xE388, 0x04E0, 0xB903, - 0x8809, 0xBEC6, 0x04DD, 0x1FA0, 0x2FAE, 0x98A9, 0x7980, 0x050F, 0xB901, 0x8818, 0xB907, 0x8809, - 0xBEC6, 0x04E7, 0x10EE, 0x90A9, 0x7980, 0x050F, 0x6919, 0xE308, 0x04FE, 0xB903, 0x8809, 0xBE46, - 0xBEC6, 0x04FA, 0x17A0, 0xBE1E, 0x1FAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0xBE47, - 0x7980, 0x050F, 0xB901, 0x8809, 0xBEC6, 0x050E, 0x16A0, 0x26A0, 0xBFB7, 0xFF00, 0xBE1E, 0x1EA0, - 0x2EAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0x850C, 0x860F, 0x6907, 0xE388, 0x0516, - 0x0D07, 0x8510, 0xBE59, 0x881E, 0xBE4A, 0xEF00, 0x101E, 0x901C, 0x101F, 0x901D, 0x10A0, 0x901E, - 0x10A0, 0x901F, 0xEF00, 0x101E, 0x301C, 0x9020, 0x731B, 0x5420, 0xBE03, 0x9825, 0x1025, 0x201C, - 0x9025, 0x7325, 0x5414, 0xBE03, 0x8B8E, 0x9880, 0x692F, 0xE388, 0x0539, 0xBE59, 0xBB07, 0x6180, - 0x9880, 0x8BA0, 0x101F, 0x301D, 0x9021, 0x731B, 0x5421, 0xBE03, 0x982E, 0x102E, 0x201D, 0x902E, - 0x732E, 0x5415, 0xBE03, 0x9880, 0x692F, 0xE388, 0x054F, 0xBE59, 0xBB07, 0x6180, 0x9880, 0x8BA0, - 0x6918, 0xEF08, 0x7325, 0x5416, 0xBE03, 0x98A0, 0x732E, 0x5417, 0xBE03, 0x98A0, 0xEF00, 0x8BA0, - 0xBEC6, 0x056B, 0xBE59, 0xBB04, 0xAA90, 0xBE04, 0xBE1E, 0x99E0, 0x8BE0, 0x69A0, 0x90D0, 0x69A0, - 0x90D0, 0x081F, 0xB805, 0x881F, 0x8B90, 0x69A0, 0x90D0, 0x69A0, 0x9090, 0x8BD0, 0x8BD8, 0xBE1F, - 0xEF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, + 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, + 0x7A80, 0x002A, 0xBE40, 0x3029, 0xEFCC, 0xBE41, 0x7A80, 0x0028, 0xBE40, 0x3028, 0xEFCC, 0x6907, + 0xE308, 0x042A, 0x6909, 0x902C, 0x7980, 0x042C, 0x690D, 0x902C, 0x1009, 0x881A, 0x100A, 0xBA01, + 0x881B, 0x100D, 0x881C, 0x100E, 0xBA01, 0x881D, 0xBF80, 0x00ED, 0x881E, 0x050C, 0x0124, 0xB904, + 0x9027, 0x6918, 0xE308, 0x04B3, 0x902D, 0x6913, 0xBFA0, 0x7598, 0xF704, 0xAE2D, 0x00FF, 0x8B8D, + 0x6919, 0xE308, 0x0463, 0x691A, 0xE308, 0x0456, 0xB907, 0x8809, 0xBEC6, 0x0453, 0x10A9, 0x90AD, + 0x7980, 0x047C, 0xB903, 0x8809, 0xBEC6, 0x0460, 0x1889, 0x6C22, 0x90AD, 0x10A9, 0x6E23, 0x6C22, + 0x90AD, 0x7980, 0x047C, 0x101A, 0xE308, 0x046F, 0xB903, 0x8809, 0xBEC6, 0x046C, 0x10A9, 0x90A0, + 0x90AD, 0x7980, 0x047C, 0xB901, 0x8809, 0xBEC6, 0x047B, 0x1889, 0x6C22, 0x90A0, 0x90AD, 0x10A9, + 0x6E23, 0x6C22, 0x90A0, 0x90AD, 0x692D, 0xE308, 0x049C, 0x0124, 0xB703, 0xB902, 0x8818, 0x8B89, + 0x022C, 0x108A, 0x7C04, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99A0, + 0x108A, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99AF, 0x7B99, 0x0484, + 0x0124, 0x060F, 0x101B, 0x2013, 0x901B, 0xBFA0, 0x7FFF, 0xE344, 0x04AC, 0x901B, 0x8B89, 0x7A80, + 0x051A, 0x6927, 0xBA01, 0x9027, 0x7A80, 0x0523, 0x6927, 0xE308, 0x049E, 0x7980, 0x050F, 0x0624, + 0x1026, 0x2013, 0x9026, 0xBFA0, 0x7FFF, 0xE304, 0x04C0, 0x8B8D, 0x7A80, 0x051A, 0x7980, 0x04B4, + 0x9026, 0x1013, 0x3026, 0x901B, 0x8B8D, 0x7A80, 0x051A, 0x7A80, 0x0523, 0x1027, 0xBA01, 0x9027, + 0xE308, 0x04B4, 0x0124, 0x060F, 0x8B89, 0x691A, 0xE308, 0x04EA, 0x6919, 0xE388, 0x04E0, 0xB903, + 0x8809, 0xBEC6, 0x04DD, 0x1FA0, 0x2FAE, 0x98A9, 0x7980, 0x050F, 0xB901, 0x8818, 0xB907, 0x8809, + 0xBEC6, 0x04E7, 0x10EE, 0x90A9, 0x7980, 0x050F, 0x6919, 0xE308, 0x04FE, 0xB903, 0x8809, 0xBE46, + 0xBEC6, 0x04FA, 0x17A0, 0xBE1E, 0x1FAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0xBE47, + 0x7980, 0x050F, 0xB901, 0x8809, 0xBEC6, 0x050E, 0x16A0, 0x26A0, 0xBFB7, 0xFF00, 0xBE1E, 0x1EA0, + 0x2EAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0x850C, 0x860F, 0x6907, 0xE388, 0x0516, + 0x0D07, 0x8510, 0xBE59, 0x881E, 0xBE4A, 0xEF00, 0x101E, 0x901C, 0x101F, 0x901D, 0x10A0, 0x901E, + 0x10A0, 0x901F, 0xEF00, 0x101E, 0x301C, 0x9020, 0x731B, 0x5420, 0xBE03, 0x9825, 0x1025, 0x201C, + 0x9025, 0x7325, 0x5414, 0xBE03, 0x8B8E, 0x9880, 0x692F, 0xE388, 0x0539, 0xBE59, 0xBB07, 0x6180, + 0x9880, 0x8BA0, 0x101F, 0x301D, 0x9021, 0x731B, 0x5421, 0xBE03, 0x982E, 0x102E, 0x201D, 0x902E, + 0x732E, 0x5415, 0xBE03, 0x9880, 0x692F, 0xE388, 0x054F, 0xBE59, 0xBB07, 0x6180, 0x9880, 0x8BA0, + 0x6918, 0xEF08, 0x7325, 0x5416, 0xBE03, 0x98A0, 0x732E, 0x5417, 0xBE03, 0x98A0, 0xEF00, 0x8BA0, + 0xBEC6, 0x056B, 0xBE59, 0xBB04, 0xAA90, 0xBE04, 0xBE1E, 0x99E0, 0x8BE0, 0x69A0, 0x90D0, 0x69A0, + 0x90D0, 0x081F, 0xB805, 0x881F, 0x8B90, 0x69A0, 0x90D0, 0x69A0, 0x9090, 0x8BD0, 0x8BD8, 0xBE1F, + 0xEF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }; u_int16_t minisrc_lpf_image[] = { diff --git a/sys/dev/sound/pci/gnu/maestro3_reg.h b/sys/gnu/dev/sound/pci/maestro3_reg.h similarity index 99% rename from sys/dev/sound/pci/gnu/maestro3_reg.h rename to sys/gnu/dev/sound/pci/maestro3_reg.h index de344107b8..0422197439 100644 --- a/sys/dev/sound/pci/gnu/maestro3_reg.h +++ b/sys/gnu/dev/sound/pci/maestro3_reg.h @@ -1,5 +1,4 @@ /* $FreeBSD: src/sys/gnu/dev/sound/pci/maestro3_reg.h,v 1.5 2005/01/06 18:27:30 imp Exp $ */ -/* $DragonFly: src/sys/dev/sound/pci/gnu/maestro3_reg.h,v 1.3 2007/01/04 21:47:03 corecode Exp $ */ /*- * ESS Technology allegro audio driver. * @@ -501,7 +500,7 @@ #define KDATA_ADC2_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x0045) #define KDATA_ADC2_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0046) -#define KDATA_CD_XFER0 (KDATA_BASE_ADDR + 0x0047) +#define KDATA_CD_XFER0 (KDATA_BASE_ADDR + 0x0047) #define KDATA_CD_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0048) #define KDATA_CD_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0049) #define KDATA_CD_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x004A) diff --git a/sys/gnu/vfs/Makefile b/sys/gnu/vfs/Makefile new file mode 100644 index 0000000000..e09e815b38 --- /dev/null +++ b/sys/gnu/vfs/Makefile @@ -0,0 +1,3 @@ +SUBDIR=ext2fs + +.include diff --git a/sys/vfs/gnu/ext2fs/COPYRIGHT.INFO b/sys/gnu/vfs/ext2fs/COPYRIGHT.INFO similarity index 95% rename from sys/vfs/gnu/ext2fs/COPYRIGHT.INFO rename to sys/gnu/vfs/ext2fs/COPYRIGHT.INFO index 1b2be1a757..d475f9b181 100644 --- a/sys/vfs/gnu/ext2fs/COPYRIGHT.INFO +++ b/sys/gnu/vfs/ext2fs/COPYRIGHT.INFO @@ -1,5 +1,4 @@ $FreeBSD: src/sys/gnu/ext2fs/COPYRIGHT.INFO,v 1.3 2000/01/01 11:27:50 bde Exp $ -$DragonFly: src/sys/vfs/gnu/ext2fs/COPYRIGHT.INFO,v 1.3 2006/04/04 17:34:32 dillon Exp $ Most of the files in this directory are written by Godmar Back or modified by him using the CSRG sources. Those files are covered by the Berkeley-style @@ -54,4 +53,3 @@ dyson@freebsd.org the UFS tree into the EXT2 tree and renamed. Matthew Dillon - diff --git a/sys/vfs/gnu/ext2fs/Makefile b/sys/gnu/vfs/ext2fs/Makefile similarity index 100% rename from sys/vfs/gnu/ext2fs/Makefile rename to sys/gnu/vfs/ext2fs/Makefile diff --git a/sys/vfs/gnu/ext2fs/dinode.h b/sys/gnu/vfs/ext2fs/dinode.h similarity index 98% rename from sys/vfs/gnu/ext2fs/dinode.h rename to sys/gnu/vfs/ext2fs/dinode.h index e9e04df2b3..c807d488cb 100644 --- a/sys/vfs/gnu/ext2fs/dinode.h +++ b/sys/gnu/vfs/ext2fs/dinode.h @@ -37,7 +37,6 @@ * * @(#)dinode.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/ufs/ufs/dinode.h,v 1.7 1999/08/28 00:52:27 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/dinode.h,v 1.3 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_DINODE_H_ diff --git a/sys/vfs/gnu/ext2fs/dir.h b/sys/gnu/vfs/ext2fs/dir.h similarity index 98% rename from sys/vfs/gnu/ext2fs/dir.h rename to sys/gnu/vfs/ext2fs/dir.h index 09f952e523..9103a3a5cb 100644 --- a/sys/vfs/gnu/ext2fs/dir.h +++ b/sys/gnu/vfs/ext2fs/dir.h @@ -37,7 +37,6 @@ * * @(#)dir.h 8.2 (Berkeley) 1/21/94 * $FreeBSD: src/sys/ufs/ufs/dir.h,v 1.9 1999/08/28 00:52:27 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/dir.h,v 1.1 2006/04/04 17:34:32 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_DIR_H_ @@ -112,7 +111,7 @@ struct direct { * without the d_name field, plus enough space for the name with a terminating * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. * - * + * */ #define DIRECTSIZ(namlen) \ (((int)&((struct direct *)0)->d_name + \ diff --git a/sys/vfs/gnu/ext2fs/ext2_alloc.c b/sys/gnu/vfs/ext2fs/ext2_alloc.c similarity index 96% rename from sys/vfs/gnu/ext2fs/ext2_alloc.c rename to sys/gnu/vfs/ext2fs/ext2_alloc.c index a8361bc877..ce53409530 100644 --- a/sys/vfs/gnu/ext2fs/ext2_alloc.c +++ b/sys/gnu/vfs/ext2fs/ext2_alloc.c @@ -38,7 +38,6 @@ * * @(#)ext2_alloc.c 8.8 (Berkeley) 2/21/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_alloc.c,v 1.28.2.2 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_alloc.c,v 1.13 2006/12/23 00:41:29 swildner Exp $ */ #include "opt_quota.h" @@ -90,7 +89,7 @@ ext2_discard_prealloc(struct inode *ip) /* * Allocate a block in the file system. - * + * * this takes the framework from ffs_alloc. To implement the * actual allocation, it calls ext2_new_block, the ported version * of the same Linux routine. @@ -108,7 +107,7 @@ ext2_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size, #if QUOTA int error; #endif - + *bnp = 0; fs = ip->i_e2fs; #if DIAGNOSTIC @@ -122,7 +121,7 @@ ext2_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size, #endif /* DIAGNOSTIC */ if (size == fs->s_blocksize && fs->s_es->s_free_blocks_count == 0) goto nospace; - if (cred->cr_uid != 0 && + if (cred->cr_uid != 0 && fs->s_es->s_free_blocks_count < fs->s_es->s_r_blocks_count) goto nospace; #if QUOTA @@ -159,7 +158,7 @@ ext2_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size, &ip->i_prealloc_count, &ip->i_prealloc_block); else - bno = (daddr_t)ext2_new_block(ITOV(ip)->v_mount, + bno = (daddr_t)ext2_new_block(ITOV(ip)->v_mount, bpref, 0, 0); } #else @@ -321,7 +320,7 @@ return ENOSPC; * Next we must write out the modified inode and indirect blocks. * For strict correctness, the writes should be synchronous since * the old block values may have been written to disk. In practise - * they are almost never written, but if we are concerned about + * they are almost never written, but if we are concerned about * strict correctness, the `doasyncfree' flag should be set to zero. * * The test on `doasyncfree' should be changed to test a flag @@ -368,7 +367,7 @@ fail: /* * Allocate an inode in the file system. - * + * * we leave the actual allocation strategy to the (modified) * ext2_new_inode(), to make sure we get the policies right */ @@ -380,7 +379,7 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp) struct inode *ip; ino_t ino; int i, error; - + *vpp = NULL; pip = VTOI(pvp); fs = pip->i_e2fs; @@ -399,11 +398,11 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp) } ip = VTOI(*vpp); - /* + /* the question is whether using VGET was such good idea at all - Linux doesn't read the old inode in when it's allocating a - new one. I will set at least i_size & i_blocks the zero. - */ + new one. I will set at least i_size & i_blocks the zero. + */ ip->i_mode = 0; ip->i_size = 0; ip->i_blocks = 0; @@ -431,7 +430,7 @@ noinodes: } /* - * Select the desired position for the next block in a file. + * Select the desired position for the next block in a file. * * we try to mimic what Remy does in inode_getblk/block_getblk * @@ -459,9 +458,9 @@ ext2_blkpref(struct inode *ip, daddr_t lbn, int indx, daddr_t *bap, /* now check whether we were provided with an array that basically tells us previous blocks to which we want to stay closeby */ - if(bap) - for (tmp = indx - 1; tmp >= 0; tmp--) - if (bap[tmp]) + if(bap) + for (tmp = indx - 1; tmp >= 0; tmp--) + if (bap[tmp]) return bap[tmp]; /* @@ -469,8 +468,8 @@ ext2_blkpref(struct inode *ip, daddr_t lbn, int indx, daddr_t *bap, * follow the rule that a block should be allocated near its inode */ return blocknr ? blocknr : - (daddr_t)(ip->i_block_group * - EXT2_BLOCKS_PER_GROUP(ip->i_e2fs)) + + (daddr_t)(ip->i_block_group * + EXT2_BLOCKS_PER_GROUP(ip->i_e2fs)) + ip->i_e2fs->s_es->s_first_data_block; } @@ -520,14 +519,14 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) */ save_i_mode = pip->i_mode; pip->i_mode = mode; - ext2_free_inode(pip); + ext2_free_inode(pip); pip->i_mode = save_i_mode; return (0); } /* * Fserr prints the name of a file system with an error diagnostic. - * + * * The form of the error message is: * fs: error message */ diff --git a/sys/vfs/gnu/ext2fs/ext2_balloc.c b/sys/gnu/vfs/ext2fs/ext2_balloc.c similarity index 92% rename from sys/vfs/gnu/ext2fs/ext2_balloc.c rename to sys/gnu/vfs/ext2fs/ext2_balloc.c index 66f37a76c5..e1547a337d 100644 --- a/sys/vfs/gnu/ext2fs/ext2_balloc.c +++ b/sys/gnu/vfs/ext2fs/ext2_balloc.c @@ -38,7 +38,6 @@ * * @(#)ffs_balloc.c 8.4 (Berkeley) 9/23/93 * $FreeBSD: src/sys/gnu/ext2fs/ext2_balloc.c,v 1.9.2.1 2000/08/03 00:52:57 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_balloc.c,v 1.10 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -72,7 +71,7 @@ ext2_balloc(struct inode *ip, daddr_t bn, int size, struct ucred *cred, daddr_t newb, lbn, *bap, pref; int osize, nsize, num, i, error; /* -ext2_debug("ext2_balloc called (%d, %d, %d)\n", +ext2_debug("ext2_balloc called (%d, %d, %d)\n", ip->i_number, (int)bn, (int)size); */ *bpp = NULL; @@ -82,8 +81,8 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", lbn = bn; /* - * check if this is a sequential block allocation. - * If so, increment next_alloc fields to allow ext2_blkpref + * check if this is a sequential block allocation. + * If so, increment next_alloc fields to allow ext2_blkpref * to make a good guess */ if (lbn == ip->i_next_alloc_block + 1) { @@ -99,7 +98,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", /* no new block is to be allocated, and no need to expand the file */ if (nb != 0 && ip->i_size >= (bn + 1) * fs->s_blocksize) { - error = bread(vp, lblktodoff(fs, bn), + error = bread(vp, lblktodoff(fs, bn), fs->s_blocksize, &bp); if (error) { brelse(bp); @@ -123,8 +122,8 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", } } else { /* Godmar thinks: this shouldn't happen w/o fragments */ - kprintf("nsize %d(%d) > osize %d(%d) nb %d\n", - (int)nsize, (int)size, (int)osize, + kprintf("nsize %d(%d) > osize %d(%d) nb %d\n", + (int)nsize, (int)size, (int)osize, (int)ip->i_size, (int)nb); panic( "ext2_balloc: Something is terribly wrong"); @@ -174,16 +173,16 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", #else /* see the comment by ext2_blkpref. What we do here is to pretend that it'd be good for a block holding indirect - pointers to be allocated near its predecessor in terms - of indirection, or the last direct block. + pointers to be allocated near its predecessor in terms + of indirection, or the last direct block. We shamelessly exploit the fact that i_ib immediately - follows i_db. + follows i_db. Godmar thinks it make sense to allocate i_ib[0] immediately after i_db[11], but it's not utterly clear whether this also applies to i_ib[1] and i_ib[0] */ - pref = ext2_blkpref(ip, lbn, indirs[0].in_off + + pref = ext2_blkpref(ip, lbn, indirs[0].in_off + EXT2_NDIR_BLOCKS, &ip->i_db[0], 0); #endif if ((error = ext2_alloc(ip, lbn, pref, (int)fs->s_blocksize, @@ -210,7 +209,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", */ for (i = 1;;) { error = bread(vp, - lblktodoff(fs, indirs[i].in_lbn), + lblktodoff(fs, indirs[i].in_lbn), (int)fs->s_blocksize, &bp); if (error) { brelse(bp); @@ -225,7 +224,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", brelse(bp); continue; } - if (pref == 0) + if (pref == 0) #if 1 /* see the comment above and by ext2_blkpref * I think this implements Linux policy, but @@ -272,7 +271,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", * Get the data block, allocating if necessary. */ if (nb == 0) { - pref = ext2_blkpref(ip, lbn, indirs[i].in_off, &bap[0], + pref = ext2_blkpref(ip, lbn, indirs[i].in_off, &bap[0], lblkno(fs, bp->b_loffset)); if ((error = ext2_alloc(ip, lbn, pref, (int)fs->s_blocksize, cred, &newb)) != 0) { diff --git a/sys/vfs/gnu/ext2fs/ext2_bitops.h b/sys/gnu/vfs/ext2fs/ext2_bitops.h similarity index 96% rename from sys/vfs/gnu/ext2fs/ext2_bitops.h rename to sys/gnu/vfs/ext2fs/ext2_bitops.h index a11ab6e5ef..bc8317432b 100644 --- a/sys/vfs/gnu/ext2fs/ext2_bitops.h +++ b/sys/gnu/vfs/ext2fs/ext2_bitops.h @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/gnu/fs/ext2fs/ext2_bitops.h,v 1.3 2006/04/13 19:37:32 cracauer Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_bitops.h,v 1.1 2007/09/23 04:09:55 yanyh Exp $ */ #ifndef _SYS_GNU_EXT2FS_EXT2_BITOPS_H_ diff --git a/sys/vfs/gnu/ext2fs/ext2_bmap.c b/sys/gnu/vfs/ext2fs/ext2_bmap.c similarity index 98% rename from sys/vfs/gnu/ext2fs/ext2_bmap.c rename to sys/gnu/vfs/ext2fs/ext2_bmap.c index cb98a75475..d7cc9ea49f 100644 --- a/sys/vfs/gnu/ext2fs/ext2_bmap.c +++ b/sys/gnu/vfs/ext2fs/ext2_bmap.c @@ -37,7 +37,6 @@ * * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 * $FreeBSD: src/sys/ufs/ufs/ufs_bmap.c,v 1.34.2.1 2000/03/17 10:12:14 ps Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_bmap.c,v 1.4 2007/08/13 17:31:56 dillon Exp $ */ #include @@ -243,9 +242,9 @@ ext2_bmaparray(struct vnode *vp, ext2_daddr_t bn, ext2_daddr_t *bnp, bn = xap->in_off; if (runb && bn) { for(--bn; bn >= 0 && *runb < maxrun && - is_sequential(ump, ((daddr_t *)bp->b_data)[bn], + is_sequential(ump, ((daddr_t *)bp->b_data)[bn], ((daddr_t *)bp->b_data)[bn+1]); - --bn, ++*runb); + --bn, ++*runb); } } } diff --git a/sys/vfs/gnu/ext2fs/ext2_extern.h b/sys/gnu/vfs/ext2fs/ext2_extern.h similarity index 96% rename from sys/vfs/gnu/ext2fs/ext2_extern.h rename to sys/gnu/vfs/ext2fs/ext2_extern.h index fbc4b2ac71..40acf72b78 100644 --- a/sys/vfs/gnu/ext2fs/ext2_extern.h +++ b/sys/gnu/vfs/ext2fs/ext2_extern.h @@ -38,7 +38,6 @@ * * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_extern.h,v 1.22.6.1 2000/11/05 19:17:40 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_extern.h,v 1.12 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_EXT2_EXTERN_H_ @@ -71,14 +70,14 @@ int ext2_lookup (struct vop_old_lookup_args *); int ext2_readdir (struct vop_readdir_args *); void ext2_print_dinode (struct ext2_dinode *); void ext2_print_inode (struct inode *); -int ext2_direnter (struct inode *, +int ext2_direnter (struct inode *, struct vnode *, struct componentname *); int ext2_dirremove (struct vnode *, struct componentname *); int ext2_dirrewrite (struct inode *, struct inode *, struct componentname *); int ext2_dirempty (struct inode *, ino_t, struct ucred *); int ext2_checkpath (struct inode *, struct inode *, struct ucred *); -struct ext2_group_desc * get_group_desc (struct mount * , +struct ext2_group_desc * get_group_desc (struct mount * , unsigned int , struct buf ** ); int ext2_group_sparse (int group); void ext2_discard_prealloc (struct inode *); diff --git a/sys/vfs/gnu/ext2fs/ext2_fs.h b/sys/gnu/vfs/ext2fs/ext2_fs.h similarity index 99% rename from sys/vfs/gnu/ext2fs/ext2_fs.h rename to sys/gnu/vfs/ext2fs/ext2_fs.h index 2184ba15ab..5b3938e309 100644 --- a/sys/vfs/gnu/ext2fs/ext2_fs.h +++ b/sys/gnu/vfs/ext2fs/ext2_fs.h @@ -5,7 +5,6 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_fs.h,v 1.8.2.2 2001/09/29 12:52:47 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_fs.h,v 1.6 2006/12/23 00:41:29 swildner Exp $ */ /* * linux/include/linux/ext2_fs.h @@ -81,7 +80,7 @@ # define ext2_debug(f, a...) { \ kprintf ("EXT2-fs DEBUG (%s, %d): %s:", \ __FILE__, __LINE__, __func__); \ - kprintf (f, ## a); \ + kprintf (f, ## a); \ } #else # define ext2_debug(f, a...) /**/ @@ -243,7 +242,7 @@ struct ext2_group_desc #define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */ #define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */ #define EXT2_ECOMPR_FL 0x00000800 /* Compression error */ -/* End compression flags --- maybe not all used */ +/* End compression flags --- maybe not all used */ #define EXT2_BTREE_FL 0x00001000 /* btree format dir */ #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ @@ -422,7 +421,7 @@ struct ext2_super_block { * the incompatible feature set is that if there is a bit set * in the incompatible feature set that the kernel doesn't * know about, it should refuse to mount the filesystem. - * + * * e2fsck's requirements are more strict; if it doesn't know * about a feature in either the compatible or incompatible * feature set, it must abort and not try to meddle with diff --git a/sys/vfs/gnu/ext2fs/ext2_fs_sb.h b/sys/gnu/vfs/ext2fs/ext2_fs_sb.h similarity index 98% rename from sys/vfs/gnu/ext2fs/ext2_fs_sb.h rename to sys/gnu/vfs/ext2fs/ext2_fs_sb.h index a5b9123f3d..10c752ae2d 100644 --- a/sys/vfs/gnu/ext2fs/ext2_fs_sb.h +++ b/sys/gnu/vfs/ext2fs/ext2_fs_sb.h @@ -65,10 +65,10 @@ struct ext2_sb_info { unsigned short s_inode_size; unsigned int s_first_ino; unsigned short s_mount_state; - /* + /* stuff that FFS keeps in its super block or that linux has in its non-ext2 specific super block and which is - generally considered useful + generally considered useful */ unsigned long s_blocksize; unsigned long s_blocksize_bits; diff --git a/sys/vfs/gnu/ext2fs/ext2_ihash.c b/sys/gnu/vfs/ext2fs/ext2_ihash.c similarity index 98% rename from sys/vfs/gnu/ext2fs/ext2_ihash.c rename to sys/gnu/vfs/ext2fs/ext2_ihash.c index bc75eee3d8..e010ea4bd4 100644 --- a/sys/vfs/gnu/ext2fs/ext2_ihash.c +++ b/sys/gnu/vfs/ext2fs/ext2_ihash.c @@ -32,7 +32,6 @@ * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 * $FreeBSD: src/sys/ufs/ufs/ufs_ihash.c,v 1.20 1999/08/28 00:52:29 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_ihash.c,v 1.5 2006/10/14 16:26:38 dillon Exp $ */ #include @@ -213,4 +212,3 @@ ext2_ihashrem(struct inode *ip) } lwkt_reltoken(&ext2_ihash_token); } - diff --git a/sys/vfs/gnu/ext2fs/ext2_inode.c b/sys/gnu/vfs/ext2fs/ext2_inode.c similarity index 99% rename from sys/vfs/gnu/ext2fs/ext2_inode.c rename to sys/gnu/vfs/ext2fs/ext2_inode.c index ca84d4cca1..41e6ceb907 100644 --- a/sys/vfs/gnu/ext2fs/ext2_inode.c +++ b/sys/gnu/vfs/ext2fs/ext2_inode.c @@ -38,7 +38,6 @@ * * @(#)ext2_inode.c 8.5 (Berkeley) 12/30/93 * $FreeBSD: src/sys/gnu/ext2fs/ext2_inode.c,v 1.24.2.1 2000/08/03 00:52:57 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode.c,v 1.21 2007/05/06 19:23:33 dillon Exp $ */ #include "opt_quota.h" @@ -135,7 +134,7 @@ ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred) off_t osize; /* kprintf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); -*/ /* +*/ /* * negative file sizes will totally break the code below and * are not meaningful anyways. */ diff --git a/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c b/sys/gnu/vfs/ext2fs/ext2_inode_cnv.c similarity index 94% rename from sys/vfs/gnu/ext2fs/ext2_inode_cnv.c rename to sys/gnu/vfs/ext2fs/ext2_inode_cnv.c index edcc4ee17a..fc9b5179fb 100644 --- a/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c +++ b/sys/gnu/vfs/ext2fs/ext2_inode_cnv.c @@ -20,7 +20,6 @@ * * Utah $Hdr$ * $FreeBSD: src/sys/gnu/ext2fs/ext2_inode_cnv.c,v 1.11 2000/01/01 17:39:21 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c,v 1.7 2006/12/23 00:41:29 swildner Exp $ */ /* @@ -53,9 +52,9 @@ ext2_print_dinode(struct ext2_dinode *di) (unsigned long)di->di_size); kprintf( "Links: %3d Blockcount: %d\n", di->di_nlink, di->di_blocks); - kprintf( "ctime: 0x%x", di->di_ctime); - kprintf( "atime: 0x%x", di->di_atime); - kprintf( "mtime: 0x%x", di->di_mtime); + kprintf( "ctime: 0x%x", di->di_ctime); + kprintf( "atime: 0x%x", di->di_atime); + kprintf( "mtime: 0x%x", di->di_mtime); kprintf( "BLOCKS: "); for(i=0; i < (di->di_blocks <= 24 ? ((di->di_blocks+1)/2): 12); i++) kprintf("%d ", di->di_db[i]); @@ -112,7 +111,7 @@ ext2_di2ei(struct ext2_dinode *di, struct ext2_inode *ei) ei->i_mode = di->di_mode; ei->i_links_count = di->di_nlink; - /* + /* Godmar thinks: if dtime is nonzero, ext2 says this inode has been deleted, this would correspond to a zero link count */ @@ -124,7 +123,7 @@ ext2_di2ei(struct ext2_dinode *di, struct ext2_inode *ei) ei->i_flags = di->di_flags; ei->i_flags = 0; ei->i_flags |= (di->di_flags & APPEND) ? EXT2_APPEND_FL: 0; - ei->i_flags |= (di->di_flags & IMMUTABLE) + ei->i_flags |= (di->di_flags & IMMUTABLE) ? EXT2_IMMUTABLE_FL: 0; ei->i_blocks = di->di_blocks; ei->i_generation = di->di_gen; diff --git a/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c b/sys/gnu/vfs/ext2fs/ext2_linux_balloc.c similarity index 95% rename from sys/vfs/gnu/ext2fs/ext2_linux_balloc.c rename to sys/gnu/vfs/ext2fs/ext2_linux_balloc.c index c5274ff9e9..c28f336f39 100644 --- a/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c +++ b/sys/gnu/vfs/ext2fs/ext2_linux_balloc.c @@ -5,7 +5,6 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_linux_balloc.c,v 1.11.2.3 2001/08/14 18:03:19 gallatin Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c,v 1.11 2007/09/23 04:09:55 yanyh Exp $ */ /* * linux/fs/ext2/balloc.c @@ -55,7 +54,7 @@ #define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -/* got rid of get_group_desc since it can already be found in +/* got rid of get_group_desc since it can already be found in * ext2_linux_ialloc.c */ @@ -67,9 +66,9 @@ read_block_bitmap(struct mount *mp, unsigned int block_group, struct ext2_group_desc * gdp; struct buffer_head * bh; int error; - + gdp = get_group_desc (mp, block_group, NULL); - error = bread(VFSTOEXT2(mp)->um_devvp, + error = bread(VFSTOEXT2(mp)->um_devvp, fsbtodoff(sb, gdp->bg_block_bitmap), sb->s_blocksize, &bh); if (error) { @@ -126,7 +125,7 @@ load__block_bitmap(struct mount *mp, unsigned int block_group) sb->s_block_bitmap_number[i] != block_group; i++) ; if (i < sb->s_loaded_block_bitmaps && - sb->s_block_bitmap_number[i] == block_group) { + sb->s_block_bitmap_number[i] == block_group) { block_bitmap_number = sb->s_block_bitmap_number[i]; block_bitmap = sb->s_block_bitmap[i]; for (j = i; j > 0; j--) { @@ -161,10 +160,10 @@ load_block_bitmap(struct mount * mp, unsigned int block_group) if (sb->s_loaded_block_bitmaps > 0 && sb->s_block_bitmap_number[0] == block_group) return 0; - - if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED && + + if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED && sb->s_block_bitmap_number[block_group] == block_group && - sb->s_block_bitmap[block_group]) + sb->s_block_bitmap[block_group]) return block_group; return load__block_bitmap (mp, block_group); @@ -189,7 +188,7 @@ ext2_free_blocks(struct mount * mp, unsigned long block, return; } lock_super (VFSTOEXT2(mp)->um_devvp); - if (block < es->s_first_data_block || + if (block < es->s_first_data_block || (block + count) > es->s_blocks_count) { kprintf ( "ext2_free_blocks: " "Freeing blocks not in datazone - " @@ -227,7 +226,7 @@ ext2_free_blocks(struct mount * mp, unsigned long block, for (i = 0; i < count; i++) { if (!clear_bit (bit + i, bh->b_data)) kprintf ("ext2_free_blocks: " - "bit already cleared for block %lu", + "bit already cleared for block %lu", block); else { gdp->bg_free_blocks_count++; @@ -251,7 +250,7 @@ ext2_free_blocks(struct mount * mp, unsigned long block, /* * ext2_new_block uses a goal block to assist allocation. If the goal is * free, or there is a free block within 32 blocks of the goal, that block - * is allocated. Otherwise a forward search is made for a free block; within + * is allocated. Otherwise a forward search is made for a free block; within * each block group the search first looks for an entire free byte in the block * bitmap, and then for any free bit if that fails. */ @@ -297,7 +296,7 @@ repeat: bitmap_nr = load_block_bitmap (mp, i); bh = sb->s_block_bitmap[bitmap_nr]; - ext2_debug ("goal is at %d:%d.\n", i, j); + ext2_debug ("goal is at %d:%d.\n", i, j); if (!test_bit(j, bh->b_data)) { #ifdef EXT2FS_DEBUG @@ -308,7 +307,7 @@ repeat: } if (j) { /* - * The goal was occupied; search forward for a free + * The goal was occupied; search forward for a free * block within the next XX blocks. * * end_goal is more or less random, but it has to be @@ -320,7 +319,7 @@ repeat: if (j < end_goal) goto got_block; } - + ext2_debug ("Bit not found near goal\n"); /* @@ -328,7 +327,7 @@ repeat: * of the goal: do a search forward through the block groups, * searching in each group first for an entire free byte in * the bitmap and then for any free bit. - * + * * Search first in the remainder of the current group; then, * cyclicly search through the rest of the groups. */ @@ -339,7 +338,7 @@ repeat: j = k; goto search_back; } - k = find_next_zero_bit ((unsigned long *) bh->b_data, + k = find_next_zero_bit ((unsigned long *) bh->b_data, EXT2_BLOCKS_PER_GROUP(sb), j); if (k < EXT2_BLOCKS_PER_GROUP(sb)) { @@ -348,10 +347,10 @@ repeat: } } - ext2_debug ("Bit not found in block group %d.\n", i); + ext2_debug ("Bit not found in block group %d.\n", i); /* - * Now search the rest of the groups. We assume that + * Now search the rest of the groups. We assume that * i and gdp correctly point to the last group visited. */ for (k = 0; k < sb->s_groups_count; k++) { @@ -384,13 +383,13 @@ repeat: } search_back: - /* + /* * We have succeeded in finding a free byte in the block * bitmap. Now search backwards up to 7 bits to find the * start of this group of free blocks. */ for (k = 0; k < 7 && j > 0 && !test_bit (j - 1, bh->b_data); k++, j--); - + got_block: ext2_debug ("using block group %d(%d)\n", i, gdp->bg_free_blocks_count); @@ -425,11 +424,11 @@ got_block: if (set_bit (j + k, bh->b_data)) break; (*prealloc_count)++; - } + } gdp->bg_free_blocks_count -= *prealloc_count; es->s_free_blocks_count -= *prealloc_count; ext2_debug ("Preallocated a further %lu bits.\n", - *prealloc_count); + *prealloc_count); } #endif @@ -472,7 +471,7 @@ ext2_count_free_blocks(struct mount * mp) int bitmap_nr; struct ext2_group_desc * gdp; int i; - + lock_super (VFSTOEXT2(mp)->um_devvp); es = sb->s_es; desc_count = 0; @@ -602,7 +601,7 @@ ext2_check_blocks_bitmap(struct mount * mp) #endif /* unused */ /* - * this function is taken from + * this function is taken from * linux/fs/ext2/bitmap.c */ diff --git a/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c b/sys/gnu/vfs/ext2fs/ext2_linux_ialloc.c similarity index 96% rename from sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c rename to sys/gnu/vfs/ext2fs/ext2_linux_ialloc.c index db6e78f0c2..50a32d1600 100644 --- a/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c +++ b/sys/gnu/vfs/ext2fs/ext2_linux_ialloc.c @@ -5,7 +5,6 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_linux_ialloc.c,v 1.13.2.2 2001/08/14 18:03:19 gallatin Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c,v 1.12 2007/09/23 04:09:55 yanyh Exp $ */ /* * linux/fs/ext2/ialloc.c @@ -15,7 +14,7 @@ * Laboratoire MASI - Institut Blaise Pascal * Universite Pierre et Marie Curie (Paris VI) * - * BSD ufs-inspired inode and directory allocation by + * BSD ufs-inspired inode and directory allocation by * Stephen Tweedie (sct@dcs.ed.ac.uk), 1993 */ @@ -62,7 +61,7 @@ mark_buffer_dirty(struct buf *bh) crit_enter(); bh->b_flags |= B_DIRTY; crit_exit(); -} +} struct ext2_group_desc * get_group_desc(struct mount * mp, unsigned int block_group, @@ -86,7 +85,7 @@ get_group_desc(struct mount * mp, unsigned int block_group, "Group descriptor not loaded - " "block_group = %d, group_desc = %lu, desc = %lu", block_group, group_desc, desc); - gdp = (struct ext2_group_desc *) + gdp = (struct ext2_group_desc *) sb->s_group_desc[group_desc]->b_data; if (bh) *bh = sb->s_group_desc[group_desc]; @@ -103,8 +102,8 @@ read_inode_bitmap(struct mount *mp, unsigned long block_group, int error; gdp = get_group_desc (mp, block_group, NULL); - if ((error = bread (VFSTOEXT2(mp)->um_devvp, - fsbtodoff(sb, gdp->bg_inode_bitmap), + if ((error = bread (VFSTOEXT2(mp)->um_devvp, + fsbtodoff(sb, gdp->bg_inode_bitmap), sb->s_blocksize, &bh)) != 0) panic ( "read_inode_bitmap:" "Cannot read inode bitmap - " @@ -144,7 +143,7 @@ load_inode_bitmap(struct mount *mp, unsigned int block_group) return 0; if (sb->s_groups_count <= EXT2_MAX_GROUP_LOADED) { if (sb->s_inode_bitmap[block_group]) { - if (sb->s_inode_bitmap_number[block_group] != + if (sb->s_inode_bitmap_number[block_group] != block_group) panic ( "load_inode_bitmap:" "block_group != inode_bitmap_number"); @@ -161,7 +160,7 @@ load_inode_bitmap(struct mount *mp, unsigned int block_group) i++) ; if (i < sb->s_loaded_inode_bitmaps && - sb->s_inode_bitmap_number[i] == block_group) { + sb->s_inode_bitmap_number[i] == block_group) { inode_bitmap_number = sb->s_inode_bitmap_number[i]; inode_bitmap = sb->s_inode_bitmap[i]; for (j = i; j > 0; j--) { @@ -225,14 +224,14 @@ ext2_free_inode(struct inode *inode) bit = (inode->i_number - 1) % EXT2_INODES_PER_GROUP(sb); bitmap_nr = load_inode_bitmap (ITOV(inode)->v_mount, block_group); bh = sb->s_inode_bitmap[bitmap_nr]; - if (!clear_bit (bit, bh->b_data)) + if (!clear_bit (bit, bh->b_data)) kprintf ( "ext2_free_inode:" "bit already cleared for inode %lu", (unsigned long)inode->i_number); else { gdp = get_group_desc (ITOV(inode)->v_mount, block_group, &bh2); gdp->bg_free_inodes_count++; - if (S_ISDIR(inode->i_mode)) + if (S_ISDIR(inode->i_mode)) gdp->bg_used_dirs_count--; mark_buffer_dirty(bh2); es->s_free_inodes_count++; @@ -324,7 +323,7 @@ repeat: i = dir->u.ext2_i.i_block_group; for (j = 0; j < sb->u.ext2_sb.s_groups_count; j++) { tmp = get_group_desc (sb, i, &bh2); - if ((tmp->bg_used_dirs_count << 8) < + if ((tmp->bg_used_dirs_count << 8) < tmp->bg_free_inodes_count) { gdp = tmp; break; @@ -338,7 +337,7 @@ repeat: tmp = get_group_desc(ITOV(dir)->v_mount,j,&bh2); if (tmp->bg_free_inodes_count && tmp->bg_free_inodes_count >= avefreei) { - if (!gdp || + if (!gdp || (tmp->bg_free_blocks_count > gdp->bg_free_blocks_count)) { i = j; @@ -348,7 +347,7 @@ repeat: } } } - else + else { /* * Try to place the inode in its parent directory diff --git a/sys/vfs/gnu/ext2fs/ext2_lookup.c b/sys/gnu/vfs/ext2fs/ext2_lookup.c similarity index 99% rename from sys/vfs/gnu/ext2fs/ext2_lookup.c rename to sys/gnu/vfs/ext2fs/ext2_lookup.c index d575e132e9..92cd4b8740 100644 --- a/sys/vfs/gnu/ext2fs/ext2_lookup.c +++ b/sys/gnu/vfs/ext2fs/ext2_lookup.c @@ -63,7 +63,7 @@ #include "ext2_fs.h" #include "ext2_fs_sb.h" -/* +/* DIRBLKSIZE in ffs is DEV_BSIZE (in most cases 512) while it is the native blocksize in ext2fs - thus, a #define is no longer appropriate @@ -124,7 +124,7 @@ static int ext2_dirbadentry (struct vnode *dp, * this is exactly what we do here - the problem is that the conversion * will blow up some entries by four bytes, so it can't be done in place. * This is too bad. Right now the conversion is done entry by entry, the - * converted entry is sent via uiomove. + * converted entry is sent via uiomove. * * XXX allocate a buffer, convert as many entries as possible, then send * the whole buffer to uiomove @@ -164,7 +164,7 @@ ext2_readdir(struct vop_readdir_args *ap) count = MAXBSIZE; #ifdef EXT2FS_DEBUG - kprintf("ext2_readdir: uio_offset = %lld, uio_resid = %d, count = %d\n", + kprintf("ext2_readdir: uio_offset = %lld, uio_resid = %d, count = %d\n", uio->uio_offset, uio->uio_resid, count); #endif @@ -181,7 +181,7 @@ ext2_readdir(struct vop_readdir_args *ap) readcnt = count - auio.uio_resid; edp = (struct ext2_dir_entry_2 *)&dirbuf[readcnt]; ncookies = 0; - for (dp = (struct ext2_dir_entry_2 *)dirbuf; + for (dp = (struct ext2_dir_entry_2 *)dirbuf; !error && uio->uio_resid > 0 && dp < edp; ) { /*- * "New" ext2fs directory entries differ in 3 ways @@ -209,7 +209,7 @@ ext2_readdir(struct vop_readdir_args *ap) if (retval) break; /* advance dp */ - dp = (struct ext2_dir_entry_2 *)((char *)dp + dp->rec_len); + dp = (struct ext2_dir_entry_2 *)((char *)dp + dp->rec_len); if (!error) ncookies++; } @@ -335,7 +335,7 @@ ext2_lookup(struct vop_old_lookup_args *ap) slotfreespace = slotsize = slotneeded = 0; if (nameiop == NAMEI_CREATE || nameiop == NAMEI_RENAME) { slotstatus = NONE; - slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); + slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); /* was slotneeded = (sizeof(struct direct) - MAXNAMLEN + cnp->cn_namelen + 3) &~ 3; */ @@ -723,7 +723,7 @@ ext2_dirbadentry(struct vnode *dp, struct ext2_dir_entry_2 *de, /* * Write a directory entry after a call to namei, using the parameters * that it left in the directory inode. The argument ip is the inode which - * the new directory entry will refer to. Dvp is a pointer to the directory + * the new directory entry will refer to. Dvp is a pointer to the directory * to be written, which was left locked by namei. Remaining parameters * (dp->i_offset, dp->i_count) indicate how the space for the new * entry is to be obtained. @@ -875,7 +875,7 @@ ext2_dirremove(struct vnode *dvp, struct componentname *cnp) struct ext2_dir_entry_2 *ep; struct buf *bp; int error; - + dp = VTOI(dvp); if (dp->i_count == 0) { /* @@ -943,7 +943,7 @@ ext2_dirempty(struct inode *ip, ino_t parentino, struct ucred *cred) struct dirtemplate dbuf; struct ext2_dir_entry_2 *dp = (struct ext2_dir_entry_2 *)&dbuf; int error, count, namlen; - + #define MINDIRSIZ (sizeof (struct dirtemplate) / 2) for (off = 0; off < ip->i_size; off += dp->rec_len) { diff --git a/sys/vfs/gnu/ext2fs/ext2_quota.c b/sys/gnu/vfs/ext2fs/ext2_quota.c similarity index 99% rename from sys/vfs/gnu/ext2fs/ext2_quota.c rename to sys/gnu/vfs/ext2fs/ext2_quota.c index 426d98ec14..eb7c98b2a8 100644 --- a/sys/vfs/gnu/ext2fs/ext2_quota.c +++ b/sys/gnu/vfs/ext2fs/ext2_quota.c @@ -35,7 +35,6 @@ * * @(#)ufs_quota.c 8.5 (Berkeley) 5/20/95 * $FreeBSD: src/sys/ufs/ufs/ufs_quota.c,v 1.27.2.3 2002/01/15 10:33:32 phk Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_quota.c,v 1.8 2008/01/05 14:02:41 swildner Exp $ */ #include diff --git a/sys/vfs/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/vfs/ext2fs/ext2_readwrite.c similarity index 98% rename from sys/vfs/gnu/ext2fs/ext2_readwrite.c rename to sys/gnu/vfs/ext2fs/ext2_readwrite.c index 65468fcf60..eab450bbec 100644 --- a/sys/vfs/gnu/ext2fs/ext2_readwrite.c +++ b/sys/gnu/vfs/ext2fs/ext2_readwrite.c @@ -38,7 +38,6 @@ * * @(#)ufs_readwrite.c 8.7 (Berkeley) 1/21/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_readwrite.c,v 1.18.2.2 2000/12/22 18:44:33 dillon Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_readwrite.c,v 1.15 2008/06/19 23:27:39 dillon Exp $ */ #define BLKSIZE(a, b, c) blksize(a, b, c) @@ -107,8 +106,8 @@ ext2_read(struct vop_read_args *ap) error = bread(vp, lblktodoff(fs, lbn), size, &bp); } else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { error = cluster_read(vp, (off_t)ip->i_size, - lblktodoff(fs, lbn), size, - uio->uio_resid, + lblktodoff(fs, lbn), size, + uio->uio_resid, (ap->a_ioflag >> 16) * BKVASIZE, &bp); } else if (seqcount > 1) { @@ -232,7 +231,7 @@ ext2_write(struct vop_write_args *ap) if (uio->uio_offset + xfersize > ip->i_size) vnode_pager_setsize(vp, uio->uio_offset + xfersize); - /* + /* * Avoid a data-consistency race between write() and mmap() * by ensuring that newly allocated blocks are zerod. The * race can occur even in the case where the write covers diff --git a/sys/vfs/gnu/ext2fs/ext2_subr.c b/sys/gnu/vfs/ext2fs/ext2_subr.c similarity index 97% rename from sys/vfs/gnu/ext2fs/ext2_subr.c rename to sys/gnu/vfs/ext2fs/ext2_subr.c index d9ef730e00..7729fe419e 100644 --- a/sys/vfs/gnu/ext2fs/ext2_subr.c +++ b/sys/gnu/vfs/ext2fs/ext2_subr.c @@ -38,7 +38,6 @@ * * @(#)ext2_subr.c 8.2 (Berkeley) 9/21/93 * $FreeBSD: src/sys/gnu/ext2fs/ext2_subr.c,v 1.13.2.2 2000/08/03 18:48:27 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_subr.c,v 1.12 2006/04/27 23:28:36 dillon Exp $ */ #include @@ -86,4 +85,3 @@ ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp) *bpp = bp; return (0); } - diff --git a/sys/vfs/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/vfs/ext2fs/ext2_vfsops.c similarity index 97% rename from sys/vfs/gnu/ext2fs/ext2_vfsops.c rename to sys/gnu/vfs/ext2fs/ext2_vfsops.c index c3b30dcace..44b95e8002 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/vfs/ext2fs/ext2_vfsops.c @@ -4,8 +4,8 @@ * Aug 1995, Godmar Back (gback@cs.utah.edu) * University of Utah, Department of Computer Science */ -/* - * Copyright (c) 1989, 1991, 1993, 1994 +/* + * Copyright (c) 1989, 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,6 @@ * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.63.2.7 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.57 2008/09/17 21:44:21 dillon Exp $ */ #include "opt_quota.h" @@ -436,7 +435,7 @@ ext2_check_descriptors(struct ext2_sb_info *sb) { /* examine next descriptor block */ if ((i % EXT2_DESC_PER_BLOCK(sb)) == 0) - gdp = (struct ext2_group_desc *) + gdp = (struct ext2_group_desc *) sb->s_group_desc[desc_block++]->b_data; if (gdp->bg_block_bitmap < block || gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) @@ -511,12 +510,12 @@ compute_sb_data(struct vnode *devvp, struct ext2_super_block *es, int logic_sb_block = 1; /* XXX for now */ #if 1 -#define V(v) +#define V(v) #else #define V(v) kprintf(#v"= %d\n", fs->v); #endif - fs->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size; + fs->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size; V(s_blocksize) fs->s_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->s_log_block_size; V(s_bshift) @@ -577,14 +576,14 @@ compute_sb_data(struct vnode *devvp, struct ext2_super_block *es, M_EXT2MNT, M_WAITOK); /* adjust logic_sb_block */ - if(fs->s_blocksize > SBSIZE) + if(fs->s_blocksize > SBSIZE) /* Godmar thinks: if the blocksize is greater than 1024, then - the superblock is logically part of block zero. + the superblock is logically part of block zero. */ logic_sb_block = 0; - + for (i = 0; i < db_count; i++) { - error = bread(devvp, fsbtodoff(fs, logic_sb_block + i + 1), + error = bread(devvp, fsbtodoff(fs, logic_sb_block + i + 1), fs->s_blocksize, &fs->s_group_desc[i]); if(error) { for (j = 0; j < i; j++) @@ -687,7 +686,7 @@ ext2_reload(struct mount *mountp, struct ucred *cred) scaninfo.fs = fs; while (error == 0 && scaninfo.rescan) { scaninfo.rescan = 0; - error = vmntvnodescan(mountp, VMSC_GETVX, ext2_reload_scan1, + error = vmntvnodescan(mountp, VMSC_GETVX, ext2_reload_scan1, ext2_reload_scan2, &scaninfo); } return(error); @@ -724,12 +723,12 @@ ext2_reload_scan2(struct mount *mp, struct vnode *vp, void *data) * Step 6: re-read inode data for all active vnodes. */ ip = VTOI(vp); - error = bread(info->devvp, + error = bread(info->devvp, fsbtodoff(info->fs, ino_to_fsba(info->fs, ip->i_number)), (int)info->fs->s_blocksize, &bp); if (error) return (error); - ext2_ei2di((struct ext2_inode *) ((char *)bp->b_data + + ext2_ei2di((struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE(info->fs) * ino_to_fsbo(info->fs, ip->i_number)), &ip->i_din); brelse(bp); @@ -813,9 +812,9 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp, struct ucred *cred) we dynamically allocate both a ext2_sb_info and a ext2_super_block while Linux keeps the super block in a locked buffer */ - ump->um_e2fs = bsd_malloc(sizeof(struct ext2_sb_info), + ump->um_e2fs = bsd_malloc(sizeof(struct ext2_sb_info), M_EXT2MNT, M_WAITOK); - ump->um_e2fs->s_es = bsd_malloc(sizeof(struct ext2_super_block), + ump->um_e2fs->s_es = bsd_malloc(sizeof(struct ext2_super_block), M_EXT2MNT, M_WAITOK); bcopy(es, ump->um_e2fs->s_es, (u_int)sizeof(struct ext2_super_block)); if ((error = compute_sb_data(devvp, ump->um_e2fs->s_es, ump->um_e2fs))) @@ -828,7 +827,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp, struct ucred *cred) bp = NULL; fs = ump->um_e2fs; fs->s_rd_only = ronly; /* ronly is set according to mnt_flags */ - /* if the fs is not mounted read-only, make sure the super block is + /* if the fs is not mounted read-only, make sure the super block is always written back on a sync() */ fs->s_wasvalid = fs->s_es->s_state & EXT2_VALID_FS ? 1 : 0; @@ -844,21 +843,21 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp, struct ucred *cred) ump->um_mountp = mp; ump->um_dev = dev; ump->um_devvp = devvp; - /* setting those two parameters allows us to use + /* setting those two parameters allows us to use ext2_bmap w/o changse ! */ ump->um_nindir = EXT2_ADDR_PER_BLOCK(fs); ump->um_bptrtodb = fs->s_es->s_log_block_size + 1; ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs); for (i = 0; i < MAXQUOTAS; i++) - ump->um_quotas[i] = NULLVP; + ump->um_quotas[i] = NULLVP; dev->si_mountpoint = mp; vfs_add_vnodeops(mp, &ext2_vnode_vops, &mp->mnt_vn_norm_ops); vfs_add_vnodeops(mp, &ext2_spec_vops, &mp->mnt_vn_spec_ops); vfs_add_vnodeops(mp, &ext2_fifo_vops, &mp->mnt_vn_fifo_ops); - if (ronly == 0) + if (ronly == 0) ext2_sbupdate(ump, MNT_WAIT); return (0); out: @@ -902,7 +901,7 @@ ext2_unmount(struct mount *mp, int mntflags) } /* release buffers containing group descriptors */ - for(i = 0; i < fs->s_db_per_group; i++) + for(i = 0; i < fs->s_db_per_group; i++) ULCK_BUF(fs->s_group_desc[i]) bsd_free(fs->s_group_desc, M_EXT2MNT); @@ -988,19 +987,19 @@ ext2_statfs(struct mount *mp, struct statfs *sbp, struct ucred *cred) nsb++; } else nsb = fs->s_groups_count; - overhead = es->s_first_data_block + + overhead = es->s_first_data_block + /* Superblocks and block group descriptors: */ nsb * (1 + fs->s_db_per_group) + /* Inode bitmap, block bitmap, and inode table: */ fs->s_groups_count * (1 + 1 + fs->s_itb_per_group); - sbp->f_bsize = EXT2_FRAG_SIZE(fs); + sbp->f_bsize = EXT2_FRAG_SIZE(fs); sbp->f_iosize = EXT2_BLOCK_SIZE(fs); sbp->f_blocks = es->s_blocks_count - overhead; - sbp->f_bfree = es->s_free_blocks_count; - sbp->f_bavail = sbp->f_bfree - es->s_r_blocks_count; - sbp->f_files = es->s_inodes_count; - sbp->f_ffree = es->s_free_inodes_count; + sbp->f_bfree = es->s_free_blocks_count; + sbp->f_bavail = sbp->f_bfree - es->s_r_blocks_count; + sbp->f_files = es->s_inodes_count; + sbp->f_ffree = es->s_free_inodes_count; if (sbp != &mp->mnt_stat) { sbp->f_type = mp->mnt_vfc->vfc_typenum; bcopy((caddr_t)mp->mnt_stat.f_mntfromname, @@ -1041,7 +1040,7 @@ ext2_sync(struct mount *mp, int waitfor) scaninfo.waitfor = waitfor; while (scaninfo.rescan) { scaninfo.rescan = 0; - vmntvnodescan(mp, VMSC_GETVP|VMSC_NOWAIT, + vmntvnodescan(mp, VMSC_GETVP|VMSC_NOWAIT, NULL, ext2_sync_scan, &scaninfo); } @@ -1193,7 +1192,7 @@ kprintf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino))); ip->i_prealloc_count = 0; ip->i_prealloc_block = 0; /* now we want to make sure that block pointers for unused - blocks are zeroed out - ext2_balloc depends on this + blocks are zeroed out - ext2_balloc depends on this although for regular files and directories only */ if(S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode)) { @@ -1311,7 +1310,7 @@ ext2_check_export(struct mount *mp, struct sockaddr *nam, int *exflagsp, { struct netcred *np; struct ext2mount *ump; - + ump = VFSTOEXT2(mp); /* * Get the export permission structure for this tuple. diff --git a/sys/vfs/gnu/ext2fs/ext2_vnops.c b/sys/gnu/vfs/ext2fs/ext2_vnops.c similarity index 98% rename from sys/vfs/gnu/ext2fs/ext2_vnops.c rename to sys/gnu/vfs/ext2fs/ext2_vnops.c index 790ed9a747..74ce07baf1 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vnops.c +++ b/sys/gnu/vfs/ext2fs/ext2_vnops.c @@ -44,7 +44,6 @@ * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 * @(#)ext2_vnops.c 8.7 (Berkeley) 2/3/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vnops.c,v 1.51.2.2 2003/01/02 17:26:18 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.43 2008/06/19 23:27:39 dillon Exp $ */ #include "opt_quota.h" @@ -208,7 +207,7 @@ ext2_fsync(struct vop_fsync_args *ap) struct vnode *vp = ap->a_vp; int count; - /* + /* * XXX why is all this fs specific? */ @@ -221,7 +220,7 @@ ext2_fsync(struct vop_fsync_args *ap) info.vp = vp; loop: info.waitfor = ap->a_waitfor; - count = RB_SCAN(buf_rb_tree, &vp->v_rbdirty_tree, NULL, + count = RB_SCAN(buf_rb_tree, &vp->v_rbdirty_tree, NULL, ext2_fsync_bp, &info); if (count) goto loop; @@ -452,11 +451,11 @@ abortit: */ dp = VTOI(fdvp); ip = VTOI(fvp); - if (ip->i_nlink >= LINK_MAX) { - vn_unlock(fvp); - error = EMLINK; - goto abortit; - } + if (ip->i_nlink >= LINK_MAX) { + vn_unlock(fvp); + error = EMLINK; + goto abortit; + } if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (dp->i_flags & APPEND)) { vn_unlock(fvp); @@ -640,7 +639,7 @@ abortit: * (both directories, or both not directories). */ if ((xp->i_mode&IFMT) == IFDIR) { - if (! ext2_dirempty(xp, dp->i_number, tcnp->cn_cred) || + if (! ext2_dirempty(xp, dp->i_number, tcnp->cn_cred) || xp->i_nlink > 2) { error = ENOTEMPTY; goto bad; @@ -876,7 +875,7 @@ ext2_mkdir(struct vop_old_mkdir_args *ap) * if we are hacking owners here, (only do this where told to) * and we are not giving it TOO root, (would subvert quotas) * then go ahead and give it to the other user. - * The new directory also inherits the SUID bit. + * The new directory also inherits the SUID bit. * If user's UID and dir UID are the same, * 'give it away' so that the SUID is still forced on. */ @@ -905,7 +904,7 @@ ext2_mkdir(struct vop_old_mkdir_args *ap) } #ifdef QUOTA if ((error = ext2_getinoquota(ip)) || - (error = ext2_chkiq(ip, 1, ucp, 0))) { + (error = ext2_chkiq(ip, 1, ucp, 0))) { EXT2_VFREE(tvp, ip->i_number, dmode); vput(tvp); return (error); @@ -958,10 +957,10 @@ ext2_mkdir(struct vop_old_mkdir_args *ap) dirtemplate = *dtp; dirtemplate.dot_ino = ip->i_number; dirtemplate.dotdot_ino = dp->i_number; - /* note that in ext2 DIRBLKSIZ == blocksize, not DEV_BSIZE + /* note that in ext2 DIRBLKSIZ == blocksize, not DEV_BSIZE * so let's just redefine it - for this function only */ -#undef DIRBLKSIZ +#undef DIRBLKSIZ #define DIRBLKSIZ VTOI(dvp)->i_e2fs->s_blocksize dirtemplate.dotdot_reclen = DIRBLKSIZ - 12; error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate, @@ -1100,7 +1099,7 @@ ext2_symlink(struct vop_old_symlink_args *ap) vinitvmio(vp, 0, PAGE_SIZE, -1); error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED, + UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, NULL); if (error) @@ -1168,10 +1167,10 @@ ext2_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, } else { ip->i_uid = cnp->cn_cred->cr_uid; } - + #ifdef QUOTA if ((error = ext2_getinoquota(ip)) || - (error = ext2_chkiq(ip, 1, ucp, 0))) { + (error = ext2_chkiq(ip, 1, ucp, 0))) { EXT2_VFREE(tvp, ip->i_number, mode); vput(tvp); return (error); @@ -1201,7 +1200,7 @@ ext2_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, ip->i_flags |= UF_OPAQUE; /* - * Regular files and directories need VM objects. Softlinks do + * Regular files and directories need VM objects. Softlinks do * not (not immediately anyway). */ if (tvp->v_type == VREG || tvp->v_type == VDIR) @@ -1414,7 +1413,7 @@ ext2_setattr(struct vop_setattr_args *ap) * we are jailed, unless the jail.chflags_allowed sysctl * is set. */ - if (cred->cr_uid == 0 && + if (cred->cr_uid == 0 && (!jailed(cred) || jail_chflags_allowed)) { if ((ip->i_flags & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) && @@ -1812,7 +1811,7 @@ ext2fifo_close(struct vop_close_args *ap) /* * Kqfilter wrapper for fifos. * - * Fall through to ext2 kqfilter routines if needed + * Fall through to ext2 kqfilter routines if needed */ static int @@ -1926,11 +1925,11 @@ ext2_vinit(struct mount *mntp, struct vnode **vpp) return (0); } -static struct filterops ext2read_filtops = +static struct filterops ext2read_filtops = { FILTEROP_ISFD, NULL, filt_ext2detach, filt_ext2read }; -static struct filterops ext2write_filtops = +static struct filterops ext2write_filtops = { FILTEROP_ISFD, NULL, filt_ext2detach, filt_ext2write }; -static struct filterops ext2vnode_filtops = +static struct filterops ext2vnode_filtops = { FILTEROP_ISFD, NULL, filt_ext2detach, filt_ext2vnode }; /* @@ -1985,7 +1984,7 @@ filt_ext2read(struct knote *kn, long hint) off_t off; /* - * filesystem is gone, so set the EOF flag and schedule + * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. */ if (hint == NOTE_REVOKE) { @@ -2004,7 +2003,7 @@ static int filt_ext2write(struct knote *kn, long hint) { /* - * filesystem is gone, so set the EOF flag and schedule + * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. */ if (hint == NOTE_REVOKE) @@ -2112,4 +2111,3 @@ ext2_vnoperatefifo(struct vop_generic_args *ap) { return (VOCALL(&ext2_fifo_vops, ap)); } - diff --git a/sys/vfs/gnu/ext2fs/ext2mount.h b/sys/gnu/vfs/ext2fs/ext2mount.h similarity index 98% rename from sys/vfs/gnu/ext2fs/ext2mount.h rename to sys/gnu/vfs/ext2fs/ext2mount.h index 0c3a198888..74ac8459d9 100644 --- a/sys/vfs/gnu/ext2fs/ext2mount.h +++ b/sys/gnu/vfs/ext2fs/ext2mount.h @@ -32,7 +32,6 @@ * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 * $FreeBSD: src/sys/ufs/ufs/ufsmount.h,v 1.17 1999/12/29 04:55:06 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2mount.h,v 1.4 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_EXT2MOUNT_H_ diff --git a/sys/vfs/gnu/ext2fs/fs.h b/sys/gnu/vfs/ext2fs/fs.h similarity index 98% rename from sys/vfs/gnu/ext2fs/fs.h rename to sys/gnu/vfs/ext2fs/fs.h index 74b9ec24da..52f2feca7f 100644 --- a/sys/vfs/gnu/ext2fs/fs.h +++ b/sys/gnu/vfs/ext2fs/fs.h @@ -38,7 +38,6 @@ * * @(#)fs.h 8.7 (Berkeley) 4/19/94 * $FreeBSD: src/sys/gnu/ext2fs/fs.h,v 1.5.2.1 2000/11/11 13:12:45 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/fs.h,v 1.11 2006/08/12 00:26:20 dillon Exp $ */ /* @@ -65,7 +64,7 @@ /* * The path name on which the file system is mounted is maintained - * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in + * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in * the super block for this name. */ #define MAXMNTLEN 512 diff --git a/sys/vfs/gnu/ext2fs/i386-bitops.h b/sys/gnu/vfs/ext2fs/i386-bitops.h similarity index 96% rename from sys/vfs/gnu/ext2fs/i386-bitops.h rename to sys/gnu/vfs/ext2fs/i386-bitops.h index 1bdea89bf6..81b65699b2 100644 --- a/sys/vfs/gnu/ext2fs/i386-bitops.h +++ b/sys/gnu/vfs/ext2fs/i386-bitops.h @@ -1,10 +1,9 @@ /* * $FreeBSD: src/sys/gnu/ext2fs/i386-bitops.h,v 1.5 1999/11/15 23:16:06 obrien Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/i386-bitops.h,v 1.4 2006/04/04 17:34:32 dillon Exp $ */ /* * this is mixture of i386/bitops.h and asm/string.h - * taken from the Linux source tree + * taken from the Linux source tree * * XXX replace with Mach routines or reprogram in C */ @@ -111,7 +110,7 @@ find_next_zero_bit(void *addr, int size, int offset) { unsigned long * p = ((unsigned long *) addr) + (offset >> 5); int set = 0, bit = offset & 31, res; - + if (bit) { /* * Look for zero in first byte @@ -148,7 +147,7 @@ ffz(unsigned long word) return word; } -/* +/* * memscan() taken from linux asm/string.h */ /* diff --git a/sys/vfs/gnu/ext2fs/inode.h b/sys/gnu/vfs/ext2fs/inode.h similarity index 98% rename from sys/vfs/gnu/ext2fs/inode.h rename to sys/gnu/vfs/ext2fs/inode.h index 130404c007..84c6d9ba5f 100644 --- a/sys/vfs/gnu/ext2fs/inode.h +++ b/sys/gnu/vfs/ext2fs/inode.h @@ -37,7 +37,6 @@ * * @(#)inode.h 8.9 (Berkeley) 5/14/95 * $FreeBSD: src/sys/ufs/ufs/inode.h,v 1.28.2.2 2001/09/29 12:52:52 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/inode.h,v 1.3 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_INODE_H_ diff --git a/sys/vfs/gnu/ext2fs/quota.h b/sys/gnu/vfs/ext2fs/quota.h similarity index 98% rename from sys/vfs/gnu/ext2fs/quota.h rename to sys/gnu/vfs/ext2fs/quota.h index bbe3de8ba8..e31e0faefe 100644 --- a/sys/vfs/gnu/ext2fs/quota.h +++ b/sys/gnu/vfs/ext2fs/quota.h @@ -35,7 +35,6 @@ * * @(#)quota.h 8.3 (Berkeley) 8/19/94 * $FreeBSD: src/sys/ufs/ufs/quota.h,v 1.15.2.1 2003/02/27 12:04:13 das Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/quota.h,v 1.3 2006/05/06 18:48:52 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_QUOTA_H_ diff --git a/sys/sys/param.h b/sys/sys/param.h index 4a0c972a44..f7be114c03 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -37,7 +37,6 @@ * * @(#)param.h 8.3 (Berkeley) 4/4/95 * $FreeBSD: src/sys/sys/param.h,v 1.61.2.38 2003/05/22 17:12:01 fjoe Exp $ - * $DragonFly: src/sys/sys/param.h,v 1.53 2008/11/11 00:55:49 pavalos Exp $ */ #ifndef _SYS_PARAM_H_ @@ -81,9 +80,10 @@ * 201100 - 2.11 master * 201200 - 2.12 release * 201300 - 2.13 master + * 201301 - header rename: -> */ #undef __DragonFly_version -#define __DragonFly_version 201300 /* propagated to newvers */ +#define __DragonFly_version 201301 /* propagated to newvers */ #include diff --git a/sys/vfs/Makefile b/sys/vfs/Makefile index 7cd1e269f3..3fc072ddf7 100644 --- a/sys/vfs/Makefile +++ b/sys/vfs/Makefile @@ -1,8 +1,7 @@ # Makefile for vfs modules # -# $DragonFly: src/sys/vfs/Makefile,v 1.8 2008/07/17 00:16:14 swildner Exp $ -SUBDIR=fifofs msdosfs portal gnu nfs procfs \ +SUBDIR=fifofs msdosfs portal nfs procfs \ hpfs ntfs smbfs isofs fdesc mfs nwfs udf \ nullfs hammer tmpfs diff --git a/sys/vfs/gnu/Makefile b/sys/vfs/gnu/Makefile deleted file mode 100644 index 8e569a0594..0000000000 --- a/sys/vfs/gnu/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $DragonFly: src/sys/vfs/gnu/Makefile,v 1.1 2003/08/15 07:26:15 dillon Exp $ -# - -SUBDIR=ext2fs - -.include -- 2.41.0