diff options
author | Janne Johansson <jj@cvs.openbsd.org> | 2009-06-03 14:45:57 +0000 |
---|---|---|
committer | Janne Johansson <jj@cvs.openbsd.org> | 2009-06-03 14:45:57 +0000 |
commit | ea9bbf428f51194a52c45ac274c35dba174a741c (patch) | |
tree | 301aa894fd92a097d769b8cac575c8a0fce07329 | |
parent | 0c52879fa54117b2bd312fe5fff17f310dbdb7eb (diff) |
Arla client rename from xfs to nnpfs for later upgrades. Tested on various arches. ok todd@ beck@
127 files changed, 2044 insertions, 2039 deletions
diff --git a/etc/MAKEDEV.common b/etc/MAKEDEV.common index 03f86df50b7..96089f882f0 100644 --- a/etc/MAKEDEV.common +++ b/etc/MAKEDEV.common @@ -1,4 +1,4 @@ -vers(a, {-$OpenBSD: MAKEDEV.common,v 1.42 2009/04/05 17:49:14 jmc Exp $-})dnl +vers(a, {-$OpenBSD: MAKEDEV.common,v 1.43 2009/06/03 14:45:39 jj Exp $-})dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> dnl @@ -554,8 +554,8 @@ _mkdev(spif, spif*, {-case $U in M bpp${nam}0 c major_bppsp_c Add($offset, 0) 600-})dnl __devitem(bpp, bpp*, Parallel port)dnl _mkdev(bpp, {-bpp*-}, {-M bpp$U c major_bpp_c $U 600-}, 600)dnl -__devitem(xfs, xfs*, XFS filesystem node, mount_xfs 8)dnl -_mcdev(xfs, xfs*, xfs, {-major_xfs_c-}, 600)dnl +__devitem(nnpfs, nnpfs*, NNPFS filesystem node, mount_nnpfs 8)dnl +_mcdev(nnpfs, nnpfs*, nnpfs, {-major_nnpfs_c-}, 600)dnl __devitem(rmidi, rmidi*, Raw MIDI devices,midi)dnl _mcdev(rmidi, rmidi*, rmidi, {-major_rmidi_c-}, 666)dnl __devtitle(plat, Platform-specific devices)dnl diff --git a/etc/etc.alpha/MAKEDEV b/etc/etc.alpha/MAKEDEV index b05925c8482..116c8b6ee83 100644 --- a/etc/etc.alpha/MAKEDEV +++ b/etc/etc.alpha/MAKEDEV @@ -89,7 +89,7 @@ # tuner* Tuner devices # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -245,8 +245,8 @@ ttyB*|ttyc*) M cua$type$U c $major $(($minor+128)) 660 dialer uucp ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -539,7 +539,7 @@ all) R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 fd1 fd1B R fd1C fd1D fd1E fd1F fd1G fd1H fd0 fd0B fd0C fd0D fd0E fd0F - R fd0G fd0H xfs0 ss0 ss1 ch0 bio hotplug ptm local wscons pci0 + R fd0G fd0H nnpfs0 ss0 ss1 ch0 bio hotplug ptm local wscons pci0 R pci1 pci2 pci3 iop0 iop1 uall rmidi0 rmidi1 rmidi2 rmidi3 R rmidi4 rmidi5 rmidi6 rmidi7 tuner0 radio0 music0 speaker R video0 audio0 audio1 audio2 uk0 random lpa0 lpa1 lpa2 lpt0 diff --git a/etc/etc.alpha/MAKEDEV.md b/etc/etc.alpha/MAKEDEV.md index 2f803affae1..36eccb27c80 100644 --- a/etc/etc.alpha/MAKEDEV.md +++ b/etc/etc.alpha/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,alpha)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.42 2009/04/17 15:52:04 deraadt Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.43 2009/06/03 14:45:39 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -83,7 +83,7 @@ _DEV(tun, 7) _DEV(tuner, 58) _DEV(uk, 33) _DEV(vi, 44) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -111,7 +111,7 @@ dnl target(all, bio)dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.amd64/MAKEDEV b/etc/etc.amd64/MAKEDEV index 48f317621af..13885e6b3a7 100644 --- a/etc/etc.amd64/MAKEDEV +++ b/etc/etc.amd64/MAKEDEV @@ -97,7 +97,7 @@ # tuner* Tuner devices # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -248,8 +248,8 @@ ttyc*) M cuac$U c 38 $(($U+128)) 660 dialer uucp ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -580,7 +580,7 @@ all) R ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 sd8 R sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 bpf1 bpf2 bpf3 bpf4 R bpf5 bpf6 bpf7 bpf8 bpf9 bio pty0 fd1 fd1B fd1C fd1D fd1E - R fd1F fd1G fd1H fd0 fd0B fd0C fd0D fd0E fd0F fd0G fd0H xfs0 + R fd1F fd1G fd1H fd0 fd0B fd0C fd0D fd0E fd0F fd0G fd0H nnpfs0 R ss0 ss1 ch0 hotplug ptm gpr0 local wscons pci0 pci1 pci2 R pci3 iop0 iop1 uall rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 R rmidi5 rmidi6 rmidi7 tuner0 radio0 music0 speaker video0 diff --git a/etc/etc.amd64/MAKEDEV.md b/etc/etc.amd64/MAKEDEV.md index 6b340ac6aaf..a5b895963e3 100644 --- a/etc/etc.amd64/MAKEDEV.md +++ b/etc/etc.amd64/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,amd64)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.35 2009/03/25 19:30:26 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.36 2009/06/03 14:45:39 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -99,7 +99,7 @@ _DEV(tun, 40) _DEV(tuner, 49) _DEV(uk, 20) _DEV(vi, 44) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -121,7 +121,7 @@ dnl amd64 specific targets dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.armish/MAKEDEV b/etc/etc.armish/MAKEDEV index feb3316ab7b..40620c7e87a 100644 --- a/etc/etc.armish/MAKEDEV +++ b/etc/etc.armish/MAKEDEV @@ -82,7 +82,7 @@ # systrace* System call tracing device # tuner* Tuner devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -227,8 +227,8 @@ std) M klog c 6 0 600 ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -479,7 +479,7 @@ local) all) R ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 - R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 + R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 R ss1 ch0 hotplug ptm local wscons pci0 pci1 pci2 pci3 iop0 R iop1 uall tuner0 radio0 video0 audio0 audio1 audio2 uk0 R random lkm tty00 tty01 tty02 tty03 apm crypto pf systrace diff --git a/etc/etc.armish/MAKEDEV.md b/etc/etc.armish/MAKEDEV.md index fdaaaf27741..b9f31b19994 100644 --- a/etc/etc.armish/MAKEDEV.md +++ b/etc/etc.armish/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,armish)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.12 2009/02/06 21:17:14 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.13 2009/06/03 14:45:39 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org> @@ -87,7 +87,7 @@ _DEV(ss, 29) _DEV(systrace, 50) _DEV(tuner, 75) _DEV(vi, 38) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -103,7 +103,7 @@ dnl *** armish specific targets dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.aviion/MAKEDEV b/etc/etc.aviion/MAKEDEV index 30ac93b48e7..54f7edc2ec9 100644 --- a/etc/etc.aviion/MAKEDEV +++ b/etc/etc.aviion/MAKEDEV @@ -56,7 +56,7 @@ # systrace* System call tracing device # tun* Network tunnel driver # uk* Unknown SCSI devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -197,8 +197,8 @@ std) ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; uk*) @@ -337,7 +337,7 @@ ramdisk) all) R ttya ttyb ttyc ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 R sd1 sd2 sd3 sd4 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 - R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 + R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 R ch0 nvram0 ptm local uk0 random lkm pf systrace std st0 st1 R fd ;; diff --git a/etc/etc.aviion/MAKEDEV.md b/etc/etc.aviion/MAKEDEV.md index 7b996fe7b9f..d2b1ce92a84 100644 --- a/etc/etc.aviion/MAKEDEV.md +++ b/etc/etc.aviion/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,aviion)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.7 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.8 2009/06/03 14:45:39 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -47,7 +47,7 @@ target(all, nvram, 0)dnl dnl target(all, ch, 0)dnl target(all, ss, 0)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl target(all, pty, 0)dnl target(all, bpf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl target(all, bio)dnl @@ -98,7 +98,7 @@ _DEV(ss, 42) _DEV(systrace, 50) _DEV(tun, 23) _DEV(uk, 41) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl diff --git a/etc/etc.hp300/MAKEDEV b/etc/etc.hp300/MAKEDEV index 3c3302b3432..ca598aac50f 100644 --- a/etc/etc.hp300/MAKEDEV +++ b/etc/etc.hp300/MAKEDEV @@ -69,7 +69,7 @@ # systrace* System call tracing device # tun* Network tunnel driver # uk* Unknown SCSI devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -277,8 +277,8 @@ ppi*) ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; uk*) @@ -454,7 +454,7 @@ all) R ct0 ct1 hd0 hd1 hd2 dcm0 dcm1 dcm2 dcm3 dca0 dca1 ccd0 ccd1 R ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 cd0 cd1 R rd0 tun0 tun1 tun2 tun3 bio bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 - R bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 ch0 ptm local ppi0 apci0 + R bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 ch0 ptm local ppi0 apci0 R wscons uk0 random lkm pf systrace std st0 st1 fd ;; diff --git a/etc/etc.hp300/MAKEDEV.md b/etc/etc.hp300/MAKEDEV.md index 83d8b3acaff..982c9e72372 100644 --- a/etc/etc.hp300/MAKEDEV.md +++ b/etc/etc.hp300/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,hp300)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.34 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.35 2009/06/03 14:45:39 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -90,7 +90,7 @@ _DEV(ss, 38) _DEV(systrace, 50) _DEV(tun, 23) _DEV(uk, 37) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -167,7 +167,7 @@ ppi*) dnl target(all, ch, 0)dnl target(all, ss, 0)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.hppa/MAKEDEV b/etc/etc.hppa/MAKEDEV index 64ec9546398..ed542514610 100644 --- a/etc/etc.hppa/MAKEDEV +++ b/etc/etc.hppa/MAKEDEV @@ -81,7 +81,7 @@ # tun* Network tunnel driver # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -227,8 +227,8 @@ std) M pdc c 22 0 640 operator ;; -xfs*) - M xfs$U c 32 $U 600 +nnpfs*) + M nnpfs$U c 32 $U 600 ;; video*) @@ -497,7 +497,7 @@ all) R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 fd1 fd1B R fd1C fd1D fd1E fd1F fd1G fd1H fd0 fd0B fd0C fd0D fd0E fd0F - R fd0G fd0H xfs0 ss0 ss1 bio ch0 hotplug ptm local wscons pci0 + R fd0G fd0H nnpfs0 ss0 ss1 bio ch0 hotplug ptm local wscons pci0 R pci1 pci2 pci3 uall video0 audio0 audio1 audio2 uk0 random R lpa0 lpa1 lpa2 lpt0 lpt1 lpt2 lkm tty00 tty01 tty02 tty03 R crypto pf systrace wd0 wd1 wd2 wd3 std st0 st1 fd diff --git a/etc/etc.hppa/MAKEDEV.md b/etc/etc.hppa/MAKEDEV.md index fafe7b52331..02ed558b141 100644 --- a/etc/etc.hppa/MAKEDEV.md +++ b/etc/etc.hppa/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,hppa)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.37 2009/02/06 21:17:14 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.38 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -76,7 +76,7 @@ _DEV(systrace, 34) _DEV(tun, 18) _DEV(uk, 15) _DEV(vi, 33) -_DEV(xfs, 32) +_DEV(nnpfs, 32) dnl divert(__mddivert)dnl dnl @@ -94,7 +94,7 @@ dnl target(all, ch, 0)dnl target(all, bio)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.hppa64/MAKEDEV b/etc/etc.hppa64/MAKEDEV index e02d77a32dd..178fd31d729 100644 --- a/etc/etc.hppa64/MAKEDEV +++ b/etc/etc.hppa64/MAKEDEV @@ -72,7 +72,7 @@ # tun* Network tunnel driver # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -218,8 +218,8 @@ std) M pdc c 22 0 640 operator ;; -xfs*) - M xfs$U c 32 $U 600 +nnpfs*) + M nnpfs$U c 32 $U 600 ;; video*) @@ -443,7 +443,7 @@ all) R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 fd1 fd1B R fd1C fd1D fd1E fd1F fd1G fd1H fd0 fd0B fd0C fd0D fd0E fd0F - R fd0G fd0H xfs0 ss0 ss1 ch0 ptm local wscons pci0 pci1 pci2 + R fd0G fd0H nnpfs0 ss0 ss1 ch0 ptm local wscons pci0 pci1 pci2 R pci3 video0 audio0 audio1 audio2 uk0 random lpa0 lpa1 lpa2 R lpt0 lpt1 lpt2 lkm tty00 tty01 tty02 tty03 crypto pf R systrace wd0 wd1 wd2 wd3 std st0 st1 fd diff --git a/etc/etc.hppa64/MAKEDEV.md b/etc/etc.hppa64/MAKEDEV.md index dcfeb81983c..eb638ace363 100644 --- a/etc/etc.hppa64/MAKEDEV.md +++ b/etc/etc.hppa64/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,hppa64)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.14 2009/02/06 21:17:14 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.15 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -67,7 +67,7 @@ _DEV(systrace, 34) _DEV(tun, 18) _DEV(uk, 15) _DEV(vi, 33) -_DEV(xfs, 32) +_DEV(nnpfs, 32) dnl divert(__mddivert)dnl dnl @@ -84,7 +84,7 @@ dnl *** hppa64 specific devices dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV index a2067676ed6..b1d2517b0d7 100644 --- a/etc/etc.i386/MAKEDEV +++ b/etc/etc.i386/MAKEDEV @@ -101,7 +101,7 @@ # tuner* Tuner devices # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -252,8 +252,8 @@ ttyc*) M cuac$U c 38 $(($U+128)) 660 dialer uucp ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -601,7 +601,7 @@ all) R sd2 sd3 sd4 sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 R tun3 bio bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 R pty0 fd1 fd1B fd1C fd1D fd1E fd1F fd1G fd1H fd0 fd0B fd0C - R fd0D fd0E fd0F fd0G fd0H xfs0 ss0 ss1 ch0 hotplug ptm gpr0 + R fd0D fd0E fd0F fd0G fd0H nnpfs0 ss0 ss1 ch0 hotplug ptm gpr0 R local wscons pci0 pci1 pci2 pci3 iop0 iop1 uall rmidi0 R rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 tuner0 R radio0 music0 speaker video0 audio0 audio1 audio2 uk0 random diff --git a/etc/etc.i386/MAKEDEV.md b/etc/etc.i386/MAKEDEV.md index be9b008e1b9..cfc10455bce 100644 --- a/etc/etc.i386/MAKEDEV.md +++ b/etc/etc.i386/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,i386)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.51 2009/03/25 19:30:28 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.52 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -103,7 +103,7 @@ _DEV(tun, 40) _DEV(tuner, 49) _DEV(uk, 20) _DEV(vi, 44) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -125,7 +125,7 @@ dnl i386 specific targets dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.landisk/MAKEDEV b/etc/etc.landisk/MAKEDEV index 91548cf6e68..e0fab104b50 100644 --- a/etc/etc.landisk/MAKEDEV +++ b/etc/etc.landisk/MAKEDEV @@ -78,7 +78,7 @@ # ss* SCSI scanners # systrace* System call tracing device # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -223,8 +223,8 @@ std) M klog c 6 0 600 ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -455,7 +455,7 @@ local) all) R ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 - R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 + R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 R ss1 ch0 ttya hotplug ptm local wscons pci0 pci1 pci2 pci3 R uall radio0 video0 audio0 audio1 audio2 uk0 random lkm R crypto pf systrace wd0 wd1 wd2 wd3 raid0 raid1 raid2 raid3 diff --git a/etc/etc.landisk/MAKEDEV.md b/etc/etc.landisk/MAKEDEV.md index 35069178154..35b7be78e60 100644 --- a/etc/etc.landisk/MAKEDEV.md +++ b/etc/etc.landisk/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,landisk)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.14 2009/02/06 21:17:14 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.15 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org> @@ -91,7 +91,7 @@ _DEV(ss, 29) _DEV(systrace, 50) dnl _DEV(tuner, 75) _DEV(vi, 77) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -108,7 +108,7 @@ dnl twrget(all, scif, tty, a)dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.luna88k/MAKEDEV b/etc/etc.luna88k/MAKEDEV index 21e0fe2a77c..ce0510291f2 100644 --- a/etc/etc.luna88k/MAKEDEV +++ b/etc/etc.luna88k/MAKEDEV @@ -63,7 +63,7 @@ # systrace* System call tracing device # tun* Network tunnel driver # uk* Unknown SCSI devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -204,8 +204,8 @@ std) ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; uk*) @@ -371,7 +371,7 @@ ramdisk) all) R lcd ttya ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 R sd2 sd3 sd4 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 bpf1 - R bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 ch0 + R bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 ch0 R ptm local wscons uk0 random lkm pf systrace std st0 st1 fd ;; diff --git a/etc/etc.luna88k/MAKEDEV.md b/etc/etc.luna88k/MAKEDEV.md index 0b4f54574bf..18242ec911a 100644 --- a/etc/etc.luna88k/MAKEDEV.md +++ b/etc/etc.luna88k/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,luna88k)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.10 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.11 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -37,7 +37,7 @@ dnl dnl target(all, ch, 0)dnl target(all, ss, 0)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl target(all, pty, 0)dnl target(all, bpf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl target(all, bio)dnl @@ -96,7 +96,7 @@ _DEV(ss, 42) _DEV(systrace, 50) _DEV(tun, 23) _DEV(uk, 41) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl diff --git a/etc/etc.mac68k/MAKEDEV b/etc/etc.mac68k/MAKEDEV index 8b95e8b3538..2baf9a49111 100644 --- a/etc/etc.mac68k/MAKEDEV +++ b/etc/etc.mac68k/MAKEDEV @@ -63,7 +63,7 @@ # systrace* System call tracing device # tun* Network tunnel driver # uk* Unknown SCSI devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -229,8 +229,8 @@ asc*) M asc$U c 36 $U ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; uk*) @@ -390,7 +390,7 @@ ramdisk) all) R ccd0 ccd1 ccd2 ccd3 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 - R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 + R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 R ss1 ch0 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 bio ptm R local wscons asc0 uk0 random lkm tty00 tty01 pf systrace std R st0 st1 fd diff --git a/etc/etc.mac68k/MAKEDEV.md b/etc/etc.mac68k/MAKEDEV.md index 7672b3df2c0..aa687997cd6 100644 --- a/etc/etc.mac68k/MAKEDEV.md +++ b/etc/etc.mac68k/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,mac68k)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.28 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.29 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -62,7 +62,7 @@ _DEV(ss, 33) _DEV(systrace, 50) _DEV(tun, 24) _DEV(uk, 34) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -102,7 +102,7 @@ target(all, sd, 0, 1, 2, 3, 4)dnl target(all, vnd, 0, 1, 2, 3)dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.macppc/MAKEDEV b/etc/etc.macppc/MAKEDEV index 75b21a0fbb4..0630b0b4153 100644 --- a/etc/etc.macppc/MAKEDEV +++ b/etc/etc.macppc/MAKEDEV @@ -87,7 +87,7 @@ # tuner* Tuner devices # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -230,8 +230,8 @@ std) ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -516,7 +516,7 @@ all) R bthub0 bthub1 bthub2 bio gpio0 gpio1 gpio2 ccd0 ccd1 ccd2 R ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 sd8 R sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 bpf1 bpf2 bpf3 bpf4 - R bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 ss1 ch0 cuaa cuab + R bpf5 bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 ss1 ch0 cuaa cuab R ttya ttyb hotplug ptm local wscons pci0 pci1 pci2 pci3 iop0 R iop1 uall tuner0 radio0 video0 audio0 audio1 audio2 uk0 R random lkm tty00 tty01 tty02 tty03 apm crypto pf systrace diff --git a/etc/etc.macppc/MAKEDEV.md b/etc/etc.macppc/MAKEDEV.md index f18f5a96a25..d68ec729072 100644 --- a/etc/etc.macppc/MAKEDEV.md +++ b/etc/etc.macppc/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,macppc)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.38 2009/02/06 21:17:15 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.39 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -98,7 +98,7 @@ _DEV(tun, 23) _DEV(tuner, 75) _DEV(uk, 41) _DEV(vi, 45) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -114,7 +114,7 @@ twrget(all, s64_tzs, tty, a, b)dnl twrget(all, s64_czs, cua, a, b)dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.mvme68k/MAKEDEV b/etc/etc.mvme68k/MAKEDEV index 8cb173e8130..7155820a1dc 100644 --- a/etc/etc.mvme68k/MAKEDEV +++ b/etc/etc.mvme68k/MAKEDEV @@ -66,7 +66,7 @@ # uk* Unknown SCSI devices # vmel0 VMEbus D32 space # vmes0 VMEbus D16 space -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -207,8 +207,8 @@ std) ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; vmes0) @@ -422,7 +422,7 @@ all) R cuaa cuab cuac cuad ttya ttyb ttyc ttyd ccd0 ccd1 ccd2 ccd3 R vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 cd0 cd1 rd0 tun0 R tun1 tun2 tun3 bio bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 - R bpf8 bpf9 pty0 xfs0 ss0 ss1 ch0 vmel0 vmes0 flash0 nvram0 + R bpf8 bpf9 pty0 nnpfs0 ss0 ss1 ch0 vmel0 vmes0 flash0 nvram0 R sram0 ptm local uk0 random lkm pf systrace std st0 st1 fd ;; diff --git a/etc/etc.mvme68k/MAKEDEV.md b/etc/etc.mvme68k/MAKEDEV.md index 83d871d0db6..d9db5551dd6 100644 --- a/etc/etc.mvme68k/MAKEDEV.md +++ b/etc/etc.mvme68k/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,mvme68k)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.23 2009/03/01 21:40:49 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.24 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -106,7 +106,7 @@ target(all, vmel, 0)dnl dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl target(all, pty, 0)dnl target(all, bpf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl target(all, bio)dnl @@ -172,7 +172,7 @@ _DEV(tun, 23) _DEV(uk, 41) _DEV(vmel, 31) _DEV(vmes, 32) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl diff --git a/etc/etc.mvme88k/MAKEDEV b/etc/etc.mvme88k/MAKEDEV index 4ea1869ca13..4c2d51cd2db 100644 --- a/etc/etc.mvme88k/MAKEDEV +++ b/etc/etc.mvme88k/MAKEDEV @@ -61,7 +61,7 @@ # vmel0 VMEbus D32 space # vmes0 VMEbus D16 space # uk* Unknown SCSI devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -202,8 +202,8 @@ std) ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; uk*) @@ -377,7 +377,7 @@ all) R tty02 tty03 tty04 tty05 tty06 tty07 ttya ttyb ccd0 ccd1 ccd2 R ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 cd0 cd1 rd0 R tun0 tun1 tun2 tun3 bio bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 - R bpf7 bpf8 bpf9 pty0 xfs0 ss0 ch0 vmel0 vmes0 nvram0 sram0 + R bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 ch0 vmel0 vmes0 nvram0 sram0 R ptm local uk0 random lkm pf systrace std st0 st1 fd ;; diff --git a/etc/etc.mvme88k/MAKEDEV.md b/etc/etc.mvme88k/MAKEDEV.md index 3fdeb1e9ec7..4fdf179ebf2 100644 --- a/etc/etc.mvme88k/MAKEDEV.md +++ b/etc/etc.mvme88k/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,mvme88k)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.22 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.23 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -73,7 +73,7 @@ target(all, vmel, 0)dnl dnl target(all, ch, 0)dnl target(all, ss, 0)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl target(all, pty, 0)dnl target(all, bpf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl target(all, bio)dnl @@ -132,7 +132,7 @@ _DEV(tun, 23) _DEV(vmel, 31) _DEV(vmes, 32) _DEV(uk, 41) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl diff --git a/etc/etc.mvmeppc/MAKEDEV b/etc/etc.mvmeppc/MAKEDEV index c2689a00501..2a4bff6af7a 100644 --- a/etc/etc.mvmeppc/MAKEDEV +++ b/etc/etc.mvmeppc/MAKEDEV @@ -1,5 +1,5 @@ #!/bin/sh - -# $OpenBSD: MAKEDEV,v 1.12 2005/08/01 19:44:53 jmc Exp $ +# $OpenBSD: MAKEDEV,v 1.13 2009/06/03 14:45:40 jj Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -161,7 +161,7 @@ all) sh $this random uk0 uk1 ss0 ss1 sh $this wscons sh $this pci - sh $this lkm xfs0 + sh $this lkm nnpfs0 sh $this usbs ;; @@ -625,11 +625,11 @@ wsmouse*) chown root.wheel wsmouse${unit} ;; -xfs*) - rm -f xfs$unit - mknod xfs$unit c 51 $unit - chmod 600 xfs$unit - chown root.wheel xfs$unit +nnpfs*) + rm -f nnpfs$unit + mknod nnpfs$unit c 51 $unit + chmod 600 nnpfs$unit + chown root.wheel nnpfs$unit ;; *) diff --git a/etc/etc.mvmeppc/MAKEDEV.md b/etc/etc.mvmeppc/MAKEDEV.md index 12a2f6033d3..8cbbceec6b2 100644 --- a/etc/etc.mvmeppc/MAKEDEV.md +++ b/etc/etc.mvmeppc/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,macppc)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.28 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.29 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -475,11 +475,11 @@ wsmouse*) chown root:wheel wsmouse${unit} ;; -xfs*) - rm -f xfs$unit - mknod xfs$unit c 51 $unit - chmod 600 xfs$unit - chown root:wheel xfs$unit +nnpfs*) + rm -f nnpfs$unit + mknod nnpfs$unit c 51 $unit + chmod 600 nnpfs$unit + chown root:wheel nnpfs$unit ;; altq) @@ -504,7 +504,7 @@ dnl *** mvmeppc specific devices dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.sgi/MAKEDEV b/etc/etc.sgi/MAKEDEV index 16fc806b71a..3c0d5114104 100644 --- a/etc/etc.sgi/MAKEDEV +++ b/etc/etc.sgi/MAKEDEV @@ -74,7 +74,7 @@ # tun* Network tunnel driver # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -214,8 +214,8 @@ std) M klog c 6 0 600 ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -438,7 +438,7 @@ all) R ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 pty1 pty2 - R xfs0 ss0 ss1 ch0 ptm local wscons pci0 pci1 pci2 pci3 uall + R nnpfs0 ss0 ss1 ch0 ptm local wscons pci0 pci1 pci2 pci3 uall R video0 audio0 audio1 audio2 uk0 random tty00 tty01 tty02 R tty03 crypto pf systrace wd0 wd1 wd2 wd3 std st0 st1 fd ;; diff --git a/etc/etc.sgi/MAKEDEV.md b/etc/etc.sgi/MAKEDEV.md index b571cdfe22b..c1853fc7c49 100644 --- a/etc/etc.sgi/MAKEDEV.md +++ b/etc/etc.sgi/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,sgi)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.23 2009/02/06 21:17:15 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.24 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -77,7 +77,7 @@ _DEV(systrace, 50) _DEV(tun, 13) _DEV(uk, 32) _DEV(vi, 45) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -88,7 +88,7 @@ dnl *** sgi specific targets dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0, 1, 2)dnl diff --git a/etc/etc.socppc/MAKEDEV b/etc/etc.socppc/MAKEDEV index 59e7630a866..a78a0964ac7 100644 --- a/etc/etc.socppc/MAKEDEV +++ b/etc/etc.socppc/MAKEDEV @@ -83,7 +83,7 @@ # tun* Network tunnel driver # uk* Unknown SCSI devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -224,8 +224,8 @@ std) ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -482,7 +482,7 @@ all) R bthub0 bthub1 bthub2 bio gpio0 gpio1 gpio2 ccd0 ccd1 ccd2 R ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 sd8 R sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 bpf1 bpf2 bpf3 bpf4 - R bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 ss1 ch0 hotplug ptm + R bpf5 bpf6 bpf7 bpf8 bpf9 pty0 nnpfs0 ss0 ss1 ch0 hotplug ptm R local wscons pci0 pci1 pci2 pci3 iop0 iop1 uall radio0 R video0 audio0 audio1 audio2 uk0 random lkm tty00 tty01 tty02 R tty03 apm crypto pf systrace wd0 wd1 wd2 wd3 raid0 raid1 diff --git a/etc/etc.socppc/MAKEDEV.md b/etc/etc.socppc/MAKEDEV.md index 595e3c2ac5d..8beb3832345 100644 --- a/etc/etc.socppc/MAKEDEV.md +++ b/etc/etc.socppc/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,socppc)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.6 2009/02/06 21:17:15 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.7 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -80,7 +80,7 @@ _DEV(tun, 23) dnl _DEV(tuner, 75) _DEV(uk, 41) _DEV(vi, 44) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -92,7 +92,7 @@ dnl *** socppc specific targets dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.sparc/MAKEDEV b/etc/etc.sparc/MAKEDEV index 54a8d226b5a..f0a7973caba 100644 --- a/etc/etc.sparc/MAKEDEV +++ b/etc/etc.sparc/MAKEDEV @@ -78,7 +78,7 @@ # systrace* System call tracing device # tun* Network tunnel driver # uk* Unknown SCSI devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -225,8 +225,8 @@ std) M openprom c 70 0 640 kmem ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; uk*) @@ -514,7 +514,7 @@ all) R sd1 sd2 sd3 sd4 cd0 cd1 rd0 xy0 xy1 xy2 xy3 tun0 tun1 tun2 R tun3 bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 R fd1 fd1B fd1C fd1D fd1E fd1F fd1G fd1H fd0 fd0B fd0C fd0D - R fd0E fd0F fd0G fd0H xfs0 ss0 ss1 ch0 bio cuaa cuab cuac cuad + R fd0E fd0F fd0G fd0H nnpfs0 ss0 ss1 ch0 bio cuaa cuab cuac cuad R ttya ttyb ttyc ttyd ptm local wscons audio0 audio1 audio2 R uk0 random lkm tty00 tty01 tty02 tty03 apm pf systrace xd0 R xd1 xd2 xd3 raid0 raid1 raid2 raid3 std st0 st1 fd diff --git a/etc/etc.sparc/MAKEDEV.md b/etc/etc.sparc/MAKEDEV.md index a0e9c7f4738..d145701c4b8 100644 --- a/etc/etc.sparc/MAKEDEV.md +++ b/etc/etc.sparc/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,sparc)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.38 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.39 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -105,7 +105,7 @@ _DEV(ss, 121) _DEV(systrace, 50) _DEV(tun, 111) _DEV(uk, 120) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -126,7 +126,7 @@ twrget(all, s64_czs, cua, a, b, c, d)dnl target(all, bio)dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.sparc64/MAKEDEV b/etc/etc.sparc64/MAKEDEV index 62207e851b9..d2e4ca49fdc 100644 --- a/etc/etc.sparc64/MAKEDEV +++ b/etc/etc.sparc64/MAKEDEV @@ -94,7 +94,7 @@ # uk* Unknown SCSI devices # uperf Performance counters # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -241,8 +241,8 @@ std) M mdesc c 70 1 640 kmem ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -605,7 +605,7 @@ all) R sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 bpf1 R bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 fd1 fd1B fd1C R fd1D fd1E fd1F fd1G fd1H fd0 fd0B fd0C fd0D fd0E fd0F fd0G - R fd0H xfs0 ss0 ss1 ch0 ccd0 ccd1 ccd2 ccd3 hotplug ptm local + R fd0H nnpfs0 ss0 ss1 ch0 ccd0 ccd1 ccd2 ccd3 hotplug ptm local R wscons pci0 pci1 pci2 pci3 uall video0 audio0 audio1 audio2 R uk0 random lpa0 lpa1 lpa2 lpt0 lpt1 lpt2 lkm tty00 tty01 R tty02 tty03 ttyh0 ttyh1 crypto pf systrace wd0 wd1 wd2 wd3 diff --git a/etc/etc.sparc64/MAKEDEV.md b/etc/etc.sparc64/MAKEDEV.md index 78289231b45..d089bbd412d 100644 --- a/etc/etc.sparc64/MAKEDEV.md +++ b/etc/etc.sparc64/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,sparc64)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.53 2009/05/12 20:15:21 kettenis Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.54 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -116,7 +116,7 @@ _DEV(tun, 111) _DEV(uk, 60) _DEV(uperf, 25) _DEV(vi, 44) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -142,7 +142,7 @@ twrget(wscons, wscons, ttyJ, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl target(all, ccd, 0, 1, 2, 3)dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl target(all, pty, 0)dnl diff --git a/etc/etc.vax/MAKEDEV b/etc/etc.vax/MAKEDEV index d75af78655f..a6d983df829 100644 --- a/etc/etc.vax/MAKEDEV +++ b/etc/etc.vax/MAKEDEV @@ -79,7 +79,7 @@ # systrace* System call tracing device # tun* Network tunnel driver # uk* Unknown SCSI devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -273,8 +273,8 @@ ht*|tm*|mt*|ts*|ut*) umask 77 ;; -xfs*) - M xfs$U c 74 $U 600 +nnpfs*) + M nnpfs$U c 74 $U 600 ;; uk*) @@ -515,7 +515,7 @@ local) all) R dl0 dz0 dhu0 ts0 ts1 mt0 mt1 hd0 hd1 hd2 ccd0 vnd0 sd0 sd1 R sd2 sd3 cd0 tun0 tun1 bio bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 - R bpf7 pty0 xfs0 ss0 ptm local wscons uk0 random lkm pf + R bpf7 pty0 nnpfs0 ss0 ptm local wscons uk0 random lkm pf R systrace rx0 rx1 ra0 ra1 ra2 ra3 hp0 hp1 hp2 hp3 raid0 raid1 R raid2 raid3 std st0 st1 fd ;; diff --git a/etc/etc.vax/MAKEDEV.md b/etc/etc.vax/MAKEDEV.md index 2cc4d14f23d..02c46a10582 100644 --- a/etc/etc.vax/MAKEDEV.md +++ b/etc/etc.vax/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,vax)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.36 2009/01/25 17:30:48 miod Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.37 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org> @@ -139,7 +139,7 @@ _DEV(ss, 64) _DEV(systrace, 49) _DEV(tun, 57) _DEV(uk, 65) -_DEV(xfs, 74) +_DEV(nnpfs, 74) dnl divert(__mddivert)dnl dnl @@ -205,7 +205,7 @@ dnl dnl target(all, ut, 0)dnl dnl target(all, ch, 0)dnl target(all, ss, 0)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl target(all, pty, 0)dnl target(all, bpf, 0, 1, 2, 3, 4, 5, 6, 7)dnl target(all, bio)dnl diff --git a/etc/etc.zaurus/MAKEDEV b/etc/etc.zaurus/MAKEDEV index f3f4c209cf1..6e30994106d 100644 --- a/etc/etc.zaurus/MAKEDEV +++ b/etc/etc.zaurus/MAKEDEV @@ -80,7 +80,7 @@ # systrace* System call tracing device # tuner* Tuner devices # video* Video V4L2 devices -# xfs* XFS filesystem node +# nnpfs* NNPFS filesystem node PATH=/sbin:/usr/sbin:/bin:/usr/bin T=$0 @@ -225,8 +225,8 @@ std) M klog c 6 0 600 ;; -xfs*) - M xfs$U c 51 $U 600 +nnpfs*) + M nnpfs$U c 51 $U 600 ;; video*) @@ -468,7 +468,7 @@ local) all) R ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 - R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 bio xfs0 + R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 bio nnpfs0 R ss0 ss1 ch0 hotplug ptm local wscons uall tuner0 radio0 R video0 audio0 audio1 audio2 uk0 random lkm tty00 tty01 tty02 R tty03 apm crypto pf systrace wd0 wd1 wd2 wd3 raid0 raid1 diff --git a/etc/etc.zaurus/MAKEDEV.md b/etc/etc.zaurus/MAKEDEV.md index 78c8c96842e..4fb81cab122 100644 --- a/etc/etc.zaurus/MAKEDEV.md +++ b/etc/etc.zaurus/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,zaurus)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.19 2009/02/06 21:17:15 grange Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.20 2009/06/03 14:45:40 jj Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org> @@ -85,7 +85,7 @@ _DEV(ss, 29) _DEV(systrace, 50) _DEV(tuner, 75) _DEV(vi, 38) -_DEV(xfs, 51) +_DEV(nnpfs, 51) dnl divert(__mddivert)dnl dnl @@ -101,7 +101,7 @@ dnl *** zaurus specific targets dnl target(all, ch, 0)dnl target(all, ss, 0, 1)dnl -target(all, xfs, 0)dnl +target(all, nnpfs, 0)dnl target(all, bio)dnl twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.325 2009/05/31 20:57:12 halex Exp $ +# $OpenBSD: rc,v 1.326 2009/06/03 14:45:39 jj Exp $ # System startup script run by init on autoboot # or after single-user. @@ -467,10 +467,10 @@ if [ -d /var/crash ]; then savecore ${savecore_flags} /var/crash fi -if [ X"${afs}" = X"YES" -a -c /dev/xfs0 ]; then +if [ X"${afs}" = X"YES" -a -c /dev/nnpfs0 ]; then echo -n 'mounting afs:' mkdir -p -m 0755 /afs - mount -t xfs /dev/xfs0 /afs + mount -t nnpfs /dev/nnpfs0 /afs /usr/libexec/afsd ${afsd_flags} echo ' done.' fi diff --git a/etc/security b/etc/security index 4b53e6459fd..d767a1c9e60 100644 --- a/etc/security +++ b/etc/security @@ -1,5 +1,5 @@ # -# $OpenBSD: security,v 1.87 2009/05/24 22:25:12 schwarze Exp $ +# $OpenBSD: security,v 1.88 2009/06/03 14:45:39 jj Exp $ # from: @(#)security 8.1 (Berkeley) 6/9/93 # @@ -422,7 +422,7 @@ fi next_part "Setuid/device find errors:" ( set -o noglob find / \ - \( ! -fstype local -o -fstype procfs -o -fstype afs -o -fstype xfs \ + \( ! -fstype local -o -fstype procfs -o -fstype afs -o -fstype nnpfs \ `for f in $SUIDSKIP; do echo -o -path $f; done` \ \) -a -prune -o \ -type f -a \( -perm -u+s -o -perm -g+s \) -print0 -o \ diff --git a/include/Makefile b/include/Makefile index 2c5b2ac3473..d249bc7e2f0 100644 --- a/include/Makefile +++ b/include/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.149 2009/04/21 19:14:33 ratchov Exp $ +# $OpenBSD: Makefile,v 1.150 2009/06/03 14:45:45 jj Exp $ # $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $ # @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91 @@ -36,7 +36,7 @@ LFILES= fcntl.h syslog.h termios.h stdarg.h stdint.h varargs.h DIRS= arpa protocols rpc rpcsvc LDIRS= altq crypto ddb dev isofs miscfs net netatalk netinet netinet6 \ - netmpls netnatm net80211 netbt nfs scsi sys ufs uvm xfs + netmpls netnatm net80211 netbt nfs nnpfs scsi sys ufs uvm # Directories with an includes target RDIRS= ../lib/libpthread ../lib/libcompat ../lib/libcurses \ diff --git a/kerberosV/src/lib/kafs/kafs.h b/kerberosV/src/lib/kafs/kafs.h index 12e38dba565..e6e58d1126e 100644 --- a/kerberosV/src/lib/kafs/kafs.h +++ b/kerberosV/src/lib/kafs/kafs.h @@ -43,7 +43,7 @@ /* */ -#include<xfs/xfs_pioctl.h> +#include<nnpfs/nnpfs_pioctl.h> /* Use k_hasafs() to probe if the machine supports AFS syscalls. The other functions will generate a SIGSYS if AFS is not supported */ diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 3813096d112..595d601ec82 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.85 2008/03/22 19:18:42 otto Exp $ +# $OpenBSD: Makefile.inc,v 1.86 2009/06/03 14:45:47 jj Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -61,7 +61,7 @@ ASM= accept.o access.o acct.o adjfreq.o adjtime.o bind.o chdir.o chflags.o \ setuid.o shmat.o shmctl.o shmdt.o shmget.o shutdown.o sigaction.o \ sigaltstack.o socket.o socketpair.o stat.o statfs.o swapctl.o \ symlink.o sync.o sysarch.o umask.o unlink.o unmount.o \ - utimes.o wait4.o write.o writev.o xfspioctl.o __semctl.o \ + utimes.o wait4.o write.o writev.o nnpfspioctl.o __semctl.o \ __syscall.o __sysctl.o __getcwd.o sched_yield.o getthrid.o \ thrsleep.o thrwakeup.o threxit.o thrsigdivert.o diff --git a/lib/libc/sys/makelintstub.sh b/lib/libc/sys/makelintstub.sh index 6319b266c4d..b403bb68b6a 100644 --- a/lib/libc/sys/makelintstub.sh +++ b/lib/libc/sys/makelintstub.sh @@ -1,5 +1,5 @@ #!/bin/sh - -# $OpenBSD: makelintstub.sh,v 1.7 2006/09/22 16:20:35 pedro Exp $ +# $OpenBSD: makelintstub.sh,v 1.8 2009/06/03 14:45:47 jj Exp $ # $NetBSD: makelintstub,v 1.2 1997/11/05 05:46:18 thorpej Exp $ # # Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -63,7 +63,7 @@ header() #include <sys/ktrace.h> #include <sys/mman.h> #include <sys/event.h> - #include <xfs/xfs_pioctl.h> + #include <nnpfs/nnpfs_pioctl.h> #include <sys/wait.h> #include <stdio.h> #undef DIRBLKSIZ diff --git a/lib/libkrb5/afssys_openbsd.c b/lib/libkrb5/afssys_openbsd.c index 95a63232cdc..29ad4a0eabe 100644 --- a/lib/libkrb5/afssys_openbsd.c +++ b/lib/libkrb5/afssys_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: afssys_openbsd.c,v 1.1 2003/05/14 09:05:59 hin Exp $ */ +/* $OpenBSD: afssys_openbsd.c,v 1.2 2009/06/03 14:45:47 jj Exp $ */ /* $KTH: afssys.c,v 1.57 1998/05/09 17:19:03 joda Exp $ */ /* @@ -42,7 +42,7 @@ #include "kafs_locl.h" int -xfspioctl(int operation, char *a_pathP, +nnpfspioctl(int operation, char *a_pathP, int a_opcode, struct ViceIoctl *a_paramsP, int a_followSymlinks); @@ -54,7 +54,7 @@ k_pioctl(char *a_path, struct ViceIoctl *a_paramsP, int a_followSymlinks) { - return xfspioctl(AFSCALL_PIOCTL, a_path, o_opcode, a_paramsP, + return nnpfspioctl(AFSCALL_PIOCTL, a_path, o_opcode, a_paramsP, a_followSymlinks); } @@ -84,7 +84,7 @@ k_unlog(void) int k_setpag(void) { - return xfspioctl(AFSCALL_SETPAG, NULL, 0, NULL, 0); + return nnpfspioctl(AFSCALL_SETPAG, NULL, 0, NULL, 0); } int diff --git a/sbin/Makefile b/sbin/Makefile index 71576e6c1c9..a4187ffef87 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.88 2008/06/09 22:23:18 mbalmer Exp $ +# $OpenBSD: Makefile,v 1.89 2009/06/03 14:45:49 jj Exp $ SUBDIR= atactl badsect bioctl brconfig ccdconfig clri dhclient \ disklabel dmesg dump dumpfs fdisk fsck fsck_ext2fs fsck_ffs \ @@ -6,7 +6,7 @@ SUBDIR= atactl badsect bioctl brconfig ccdconfig clri dhclient \ isakmpd kbd ldattach lmccontrol mknod modload modunload mount \ mount_cd9660 mount_ext2fs mount_ffs mount_msdos \ mount_nfs mount_ntfs mount_portal mount_procfs mount_udf \ - mount_vnd mount_xfs mountd ncheck_ffs newfs newfs_msdos \ + mount_vnd mount_nnpfs mountd ncheck_ffs newfs newfs_msdos \ nfsd nologin pdisk pfctl pflogd ping ping6 quotacheck \ raidctl reboot restore route rtsol savecore scan_ffs \ scsi shutdown slattach swapctl sysctl ttyflags tunefs \ diff --git a/sbin/mount_nnpfs/Makefile b/sbin/mount_nnpfs/Makefile new file mode 100644 index 00000000000..a45371ad862 --- /dev/null +++ b/sbin/mount_nnpfs/Makefile @@ -0,0 +1,11 @@ +# $OpenBSD: Makefile,v 1.1 2009/06/03 14:45:49 jj Exp $ + +PROG= mount_nnpfs +SRCS= mount_nnpfs.c getmntopts.c +MAN= mount_nnpfs.8 + +MOUNT= ${.CURDIR}/../mount +CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} +.PATH: ${MOUNT} + +.include <bsd.prog.mk> diff --git a/sbin/mount_xfs/mount_xfs.8 b/sbin/mount_nnpfs/mount_nnpfs.8 index 70f3b4de107..874d551c7ab 100644 --- a/sbin/mount_xfs/mount_xfs.8 +++ b/sbin/mount_nnpfs/mount_nnpfs.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mount_xfs.8,v 1.20 2007/05/31 19:19:46 jmc Exp $ +.\" $OpenBSD: mount_nnpfs.8,v 1.1 2009/06/03 14:45:49 jj Exp $ .\" $NetBSD: mount_null.8,v 1.4 1996/04/10 20:57:19 thorpej Exp $ .\" .\" Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska Högskolan @@ -37,21 +37,21 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ -.Dt MOUNT_XFS 8 +.Dd $Mdocdate: June 3 2009 $ +.Dt MOUNT_NNPFS 8 .Os .Sh NAME -.Nm mount_xfs -.Nd mount the xfs filesystem +.Nm mount_nnpfs +.Nd mount the nnpfs filesystem .Sh SYNOPSIS -.Nm mount_xfs +.Nm mount_nnpfs .Op Fl o Ar options .Ar special .Ar node .Sh DESCRIPTION The .Nm -command mounts one of the xfs character devices, +command mounts one of the nnpfs character devices, .Ar special , on mount point .Ar node . @@ -69,9 +69,9 @@ See the man page for possible options and their meanings. .El .Pp -The xfs filesystem was written primarily to make a free, AFS-compatible +The nnpfs filesystem was written primarily to make a free, AFS-compatible filesystem (Arla). -But since the xfs interface is simple and generic +But since the nnpfs interface is simple and generic it could be used for other filesystems as well. .\" .Sh SEE ALSO diff --git a/sbin/mount_xfs/mount_xfs.c b/sbin/mount_nnpfs/mount_nnpfs.c index b0915dbc9ca..89f2b617c87 100644 --- a/sbin/mount_xfs/mount_xfs.c +++ b/sbin/mount_nnpfs/mount_nnpfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_xfs.c,v 1.9 2006/12/15 13:04:06 jmc Exp $ */ +/* $OpenBSD: mount_nnpfs.c,v 1.1 2009/06/03 14:45:49 jj Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). @@ -94,7 +94,7 @@ main(int argc, char **argv) if (realpath(argv[1], path) == NULL) err(1, "realpath %s", argv[1]); - if (mount(MOUNT_XFS, path, mntflags, argv[0])) { + if (mount(MOUNT_NNPFS, path, mntflags, argv[0])) { if (errno == EOPNOTSUPP) errx(1, "Filesystem not supported by kernel"); else diff --git a/sbin/mount_xfs/Makefile b/sbin/mount_xfs/Makefile deleted file mode 100644 index bf7abd600eb..00000000000 --- a/sbin/mount_xfs/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $OpenBSD: Makefile,v 1.4 1999/04/22 15:21:24 provos Exp $ - -PROG= mount_xfs -SRCS= mount_xfs.c getmntopts.c -MAN= mount_xfs.8 - -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} - -.include <bsd.prog.mk> diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c index a483b030375..869155f4977 100644 --- a/sys/arch/alpha/alpha/conf.c +++ b/sys/arch/alpha/alpha/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.58 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.59 2009/06/03 14:45:50 jj Exp $ */ /* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */ /*- @@ -114,9 +114,9 @@ cdev_decl(wd); cdev_decl(fd); #include "cy.h" cdev_decl(cy); -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "ksyms.h" @@ -188,8 +188,8 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUGEN,ugen), /* 48: USB generic driver */ cdev_tty_init(NUCOM, ucom), /* 49: USB tty */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev),/* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/amd64/amd64/conf.c b/sys/arch/amd64/amd64/conf.c index 7864ae00a6c..dc3f48ac042 100644 --- a/sys/arch/amd64/amd64/conf.c +++ b/sys/arch/amd64/amd64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.24 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.25 2009/06/03 14:45:50 jj Exp $ */ /* * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved. @@ -154,9 +154,9 @@ cdev_decl(music); #include "bthub.h" #include "pctr.h" #include "iop.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "bktr.h" #include "ksyms.h" @@ -252,8 +252,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_bktr_init(NBKTR,bktr), /* 49: Bt848 video capture device */ cdev_ksyms_init(NKSYMS,ksyms), /* 50: Kernel symbols device */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/arm/arm/conf.c b/sys/arch/arm/arm/conf.c index a130173d874..d88cde44a97 100644 --- a/sys/arch/arm/arm/conf.c +++ b/sys/arch/arm/arm/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.21 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.22 2009/06/03 14:45:50 jj Exp $ */ /* $NetBSD: conf.c,v 1.10 2002/04/19 01:04:38 wiz Exp $ */ /* @@ -273,9 +273,9 @@ struct bdevsw bdevsw[] = { #define ptctty ptytty #define ptcioctl ptyioctl -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "systrace.h" @@ -345,8 +345,8 @@ struct cdevsw cdevsw[] = { cdev_lkm_dummy(), /* 48: reserved */ cdev_lkm_dummy(), /* 49: reserved */ cdev_systrace_init(NSYSTRACE,systrace), /* 50: system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51: reserved */ #endif diff --git a/sys/arch/aviion/aviion/conf.c b/sys/arch/aviion/aviion/conf.c index 2097ff94780..24d3546de4c 100644 --- a/sys/arch/aviion/aviion/conf.c +++ b/sys/arch/aviion/aviion/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.7 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.8 2009/06/03 14:45:51 jj Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -59,9 +59,9 @@ #include "uk.h" #include "vme.h" #include "vnd.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif struct bdevsw bdevsw[] = @@ -141,8 +141,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_bio_init(NBIO,bio), /* 49: ioctl tunnel */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/hp300/hp300/conf.c b/sys/arch/hp300/hp300/conf.c index e22fc9c93ad..94b146fce10 100644 --- a/sys/arch/hp300/hp300/conf.c +++ b/sys/arch/hp300/hp300/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.44 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.45 2009/06/03 14:45:51 jj Exp $ */ /* $NetBSD: conf.c,v 1.39 1997/05/12 08:17:53 thorpej Exp $ */ /*- @@ -103,9 +103,9 @@ cdev_decl(fd); #include "bpfilter.h" #include "tun.h" #include "ksyms.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "wsdisplay.h" #include "wskbd.h" @@ -167,8 +167,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_bio_init(NBIO,bio), /* 49: ioctl tunnel */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/hppa/hppa/conf.c b/sys/arch/hppa/hppa/conf.c index f71df4985b9..c6c4e8dcae8 100644 --- a/sys/arch/hppa/hppa/conf.c +++ b/sys/arch/hppa/hppa/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.45 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.46 2009/06/03 14:45:51 jj Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -88,9 +88,9 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]); #include "wskbd.h" #include "wsmouse.h" #include "wsmux.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "inet.h" @@ -162,8 +162,8 @@ struct cdevsw cdevsw[] = #else cdev_notdef(), /* 31: */ #endif -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 32: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 32: nnpfs communication device */ #else cdev_notdef(), #endif diff --git a/sys/arch/hppa64/hppa64/conf.c b/sys/arch/hppa64/hppa64/conf.c index 2cc7412fa13..3a9091cd129 100644 --- a/sys/arch/hppa64/hppa64/conf.c +++ b/sys/arch/hppa64/hppa64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.11 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.12 2009/06/03 14:45:51 jj Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -89,9 +89,9 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]); #include "wskbd.h" #include "wsmouse.h" #include "wsmux.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "inet.h" @@ -154,8 +154,8 @@ struct cdevsw cdevsw[] = #else cdev_notdef(), #endif -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 32: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 32: nnpfs communication device */ #else cdev_notdef(), #endif diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c index b1c12a89f27..c11f3de0089 100644 --- a/sys/arch/i386/i386/conf.c +++ b/sys/arch/i386/i386/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.130 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.131 2009/06/03 14:45:51 jj Exp $ */ /* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */ /* @@ -155,9 +155,9 @@ cdev_decl(music); #include "pctr.h" #include "bios.h" #include "iop.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "bktr.h" #include "ksyms.h" @@ -256,8 +256,8 @@ struct cdevsw cdevsw[] = cdev_ocis_init(NBIOS,bios), /* 48: onboard BIOS PROM */ cdev_bktr_init(NBKTR,bktr), /* 49: Bt848 video capture device */ cdev_ksyms_init(NKSYMS,ksyms), /* 50: Kernel symbols device */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/landisk/landisk/conf.c b/sys/arch/landisk/landisk/conf.c index 21693ba5042..ee0e7c8c315 100644 --- a/sys/arch/landisk/landisk/conf.c +++ b/sys/arch/landisk/landisk/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.11 2009/05/15 16:21:25 deraadt Exp $ */ +/* $OpenBSD: conf.c,v 1.12 2009/06/03 14:45:52 jj Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -257,9 +257,9 @@ struct bdevsw bdevsw[] = { #define ptctty ptytty #define ptcioctl ptyioctl -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "systrace.h" @@ -324,8 +324,8 @@ struct cdevsw cdevsw[] = { cdev_lkm_dummy(), /* 48: reserved */ cdev_lkm_dummy(), /* 49: reserved */ cdev_systrace_init(NSYSTRACE,systrace), /* 50: system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51: reserved */ #endif diff --git a/sys/arch/luna88k/luna88k/conf.c b/sys/arch/luna88k/luna88k/conf.c index e09c9378d35..caef40045b5 100644 --- a/sys/arch/luna88k/luna88k/conf.c +++ b/sys/arch/luna88k/luna88k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.10 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.11 2009/06/03 14:45:52 jj Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -54,9 +54,9 @@ #include "st.h" #include "uk.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "ksyms.h" @@ -150,8 +150,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_bio_init(NBIO,bio), /* 49: ioctl tunnel */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c index 96778cb341d..5410c6215ca 100644 --- a/sys/arch/mac68k/mac68k/conf.c +++ b/sys/arch/mac68k/mac68k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.42 2009/01/25 17:30:48 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.43 2009/06/03 14:45:52 jj Exp $ */ /* $NetBSD: conf.c,v 1.41 1997/02/11 07:35:49 scottr Exp $ */ /* @@ -93,9 +93,9 @@ cdev_decl(zs); #include "asc.h" cdev_decl(asc); #include "ksyms.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "wsdisplay.h" #include "wskbd.h" @@ -159,8 +159,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_bio_init(NBIO,bio), /* 49: ioctl tunnel */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/macppc/macppc/conf.c b/sys/arch/macppc/macppc/conf.c index 055ebfb2991..ed8e133ba79 100644 --- a/sys/arch/macppc/macppc/conf.c +++ b/sys/arch/macppc/macppc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.38 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.39 2009/06/03 14:45:52 jj Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -98,9 +98,9 @@ cdev_decl(com); #include "tun.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #ifdef LKM @@ -195,8 +195,8 @@ struct cdevsw cdevsw[] = { cdev_notdef(), /* 48 */ cdev_notdef(), /* 49 */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/mvme68k/mvme68k/conf.c b/sys/arch/mvme68k/mvme68k/conf.c index c00219985e6..2479d2bdd5c 100644 --- a/sys/arch/mvme68k/mvme68k/conf.c +++ b/sys/arch/mvme68k/mvme68k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.45 2009/03/01 21:40:49 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.46 2009/06/03 14:45:52 jj Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -136,9 +136,9 @@ cdev_decl(fd); #include "lp.h" #include "lptwo.h" cdev_decl(lptwo); -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "ksyms.h" @@ -210,8 +210,8 @@ struct cdevsw cdevsw[] = cdev_lkm_dummy(), /* 48 */ cdev_lkm_dummy(), /* 49 */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_lkm_dummy(), /* 51 */ #endif diff --git a/sys/arch/mvme88k/mvme88k/conf.c b/sys/arch/mvme88k/mvme88k/conf.c index a3df0dfe07a..e7a8d6c5592 100644 --- a/sys/arch/mvme88k/mvme88k/conf.c +++ b/sys/arch/mvme88k/mvme88k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.37 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.38 2009/06/03 14:45:52 jj Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -54,9 +54,9 @@ #include "st.h" #include "uk.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "ksyms.h" @@ -195,8 +195,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_bio_init(NBIO,bio), /* 49: ioctl tunnel */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/mvmeppc/mvmeppc/conf.c b/sys/arch/mvmeppc/mvmeppc/conf.c index 4edd7760060..3e4553565eb 100644 --- a/sys/arch/mvmeppc/mvmeppc/conf.c +++ b/sys/arch/mvmeppc/mvmeppc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.24 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.25 2009/06/03 14:45:52 jj Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -96,9 +96,9 @@ cdev_decl(wd); #include "tun.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #ifdef LKM @@ -169,8 +169,8 @@ struct cdevsw cdevsw[] = { cdev_notdef(), /* 48 */ cdev_notdef(), /* 49 */ cdev_systrace_init(NSYSTRACE,systrace), /* 50: system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/sgi/sgi/conf.c b/sys/arch/sgi/sgi/conf.c index 906ee2122bd..1bc928959f9 100644 --- a/sys/arch/sgi/sgi/conf.c +++ b/sys/arch/sgi/sgi/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.18 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.19 2009/06/03 14:45:53 jj Exp $ */ /* * Copyright (c) 1992, 1993 @@ -110,9 +110,9 @@ cdev_decl(lpt); cdev_decl(wd); #include "audio.h" #include "video.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "ksyms.h" @@ -192,8 +192,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48: */ cdev_bio_init(NBIO,bio), /* 49: ioctl tunnel */ cdev_systrace_init(NSYSTRACE,systrace), /* 50: system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51: */ #endif diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c index 1cc0b270331..b675c102b29 100644 --- a/sys/arch/sparc/sparc/conf.c +++ b/sys/arch/sparc/sparc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.48 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.49 2009/06/03 14:45:53 jj Exp $ */ /* $NetBSD: conf.c,v 1.40 1996/04/11 19:20:03 thorpej Exp $ */ /* @@ -87,9 +87,9 @@ #include "wsmouse.h" #include "wsmux.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "ksyms.h" @@ -182,8 +182,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_notdef(), /* 49 */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c index 3cdd67ea242..e5f5a242280 100644 --- a/sys/arch/sparc64/sparc64/conf.c +++ b/sys/arch/sparc64/sparc64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.50 2009/05/10 12:34:04 kettenis Exp $ */ +/* $OpenBSD: conf.c,v 1.51 2009/06/03 14:45:53 jj Exp $ */ /* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */ /* @@ -108,9 +108,9 @@ cdev_decl(pci); #include "pf.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "ksyms.h" @@ -203,8 +203,8 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 48 */ cdev_notdef(), /* 49 */ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 51: nnpfs communication device */ #else cdev_notdef(), /* 51 */ #endif diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c index 8700b9d121a..212873f8ee5 100644 --- a/sys/arch/vax/vax/conf.c +++ b/sys/arch/vax/vax/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.56 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: conf.c,v 1.57 2009/06/03 14:45:53 jj Exp $ */ /* $NetBSD: conf.c,v 1.44 1999/10/27 16:38:54 ragge Exp $ */ /*- @@ -342,9 +342,9 @@ cdev_decl(ii); #include "ss.h" #include "uk.h" -#ifdef XFS -#include <xfs/nxfs.h> -cdev_decl(xfs_dev); +#ifdef NNPFS +#include <nnpfs/nnnpfs.h> +cdev_decl(nnpfs_dev); #endif #include "wsdisplay.h" @@ -431,8 +431,8 @@ struct cdevsw cdevsw[] = cdev_disk_init(NRY,ry), /* 71: VS floppy */ cdev_bio_init(NBIO,bio), /* 72: ioctl tunnel */ cdev_disk_init(NRAID,raid), /* 73: RAIDframe disk driver */ -#ifdef XFS - cdev_xfs_init(NXFS,xfs_dev), /* 74: xfs communication device */ +#ifdef NNPFS + cdev_nnpfs_init(NNNPFS,nnpfs_dev), /* 74: nnpfs communication device */ #else cdev_notdef(), /* 74 */ #endif diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC index a4d904ec0c3..f9522c6c0a6 100644 --- a/sys/conf/GENERIC +++ b/sys/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.144 2009/05/06 18:21:23 stevesk Exp $ +# $OpenBSD: GENERIC,v 1.145 2009/06/03 14:45:54 jj Exp $ # # Machine-independent option; used by all architectures for their # GENERIC kernel @@ -36,7 +36,7 @@ option UFS_DIRHASH # hash large directories option QUOTA # UFS quotas option EXT2FS # Second Extended Filesystem option MFS # memory file system -option XFS # xfs filesystem +option NNPFS # NNPFS filesystem option TCP_SACK # Selective Acknowledgements for TCP option TCP_ECN # Explicit Congestion Notification for TCP diff --git a/sys/conf/files b/sys/conf/files index 826593c211d..b312c42a9ea 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $OpenBSD: files,v 1.456 2009/06/01 17:42:33 ariane Exp $ +# $OpenBSD: files,v 1.457 2009/06/03 14:45:54 jj Exp $ # $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -940,20 +940,20 @@ file ufs/ext2fs/ext2fs_readwrite.c ext2fs file ufs/ext2fs/ext2fs_subr.c ext2fs file ufs/ext2fs/ext2fs_vfsops.c ext2fs file ufs/ext2fs/ext2fs_vnops.c ext2fs -file xfs/xfs_common-bsd.c xfs -file xfs/xfs_deb.c xfs -file xfs/xfs_dev-bsd.c xfs -file xfs/xfs_dev-common.c xfs -file xfs/xfs_message.c xfs -file xfs/xfs_node.c xfs -file xfs/xfs_node-bsd.c xfs -file xfs/xfs_syscalls-common.c xfs -file xfs/xfs_vfsops-bsd.c xfs -file xfs/xfs_vfsops-common.c xfs -file xfs/xfs_vfsops-openbsd.c xfs -file xfs/xfs_vnodeops-bsd.c xfs -file xfs/xfs_vnodeops-common.c xfs -file xfs/xfs_syscalls-dummy.c !xfs +file nnpfs/nnpfs_common-bsd.c nnpfs +file nnpfs/nnpfs_deb.c nnpfs +file nnpfs/nnpfs_dev-bsd.c nnpfs +file nnpfs/nnpfs_dev-common.c nnpfs +file nnpfs/nnpfs_message.c nnpfs +file nnpfs/nnpfs_node.c nnpfs +file nnpfs/nnpfs_node-bsd.c nnpfs +file nnpfs/nnpfs_syscalls-common.c nnpfs +file nnpfs/nnpfs_vfsops-bsd.c nnpfs +file nnpfs/nnpfs_vfsops-common.c nnpfs +file nnpfs/nnpfs_vfsops-openbsd.c nnpfs +file nnpfs/nnpfs_vnodeops-bsd.c nnpfs +file nnpfs/nnpfs_vnodeops-common.c nnpfs +file nnpfs/nnpfs_syscalls-dummy.c !nnpfs file uvm/uvm_amap.c file uvm/uvm_anon.c file uvm/uvm_aobj.c diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 4b73c0684eb..823f6f88787 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_sysent.c,v 1.104 2009/03/12 07:04:49 guenther Exp $ */ +/* $OpenBSD: init_sysent.c,v 1.105 2009/06/03 14:45:54 jj Exp $ */ /* * System call switch table. @@ -14,7 +14,7 @@ #include <sys/syscallargs.h> #include <sys/poll.h> #include <sys/event.h> -#include <xfs/xfs_pioctl.h> +#include <nnpfs/nnpfs_pioctl.h> #ifdef COMPAT_43 #define compat_43(func) __CONCAT(compat_43_,func) @@ -523,8 +523,8 @@ struct sysent sysent[] = { sys_futimes }, /* 206 = futimes */ { 1, s(struct sys_getpgid_args), 0, sys_getpgid }, /* 207 = getpgid */ - { 5, s(struct sys_xfspioctl_args), 0, - sys_xfspioctl }, /* 208 = xfspioctl */ + { 5, s(struct sys_nnpfspioctl_args), 0, + sys_nnpfspioctl }, /* 208 = nnpfspioctl */ { 0, 0, 0, sys_nosys }, /* 209 = unimplemented */ #ifdef LKM diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index ca9bdd584d5..f25ce401e16 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscalls.c,v 1.105 2009/03/12 07:04:49 guenther Exp $ */ +/* $OpenBSD: syscalls.c,v 1.106 2009/06/03 14:45:54 jj Exp $ */ /* * System call names. @@ -251,7 +251,7 @@ char *syscallnames[] = { "#205 (unimplemented sys_undelete)", /* 205 = unimplemented sys_undelete */ "futimes", /* 206 = futimes */ "getpgid", /* 207 = getpgid */ - "xfspioctl", /* 208 = xfspioctl */ + "nnpfspioctl", /* 208 = nnpfspioctl */ "#209 (unimplemented)", /* 209 = unimplemented */ #ifdef LKM "lkmnosys", /* 210 = lkmnosys */ diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 13ac5273a87..75fd31810e2 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.91 2009/03/12 06:56:13 guenther Exp $ +; $OpenBSD: syscalls.master,v 1.92 2009/06/03 14:45:54 jj Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -41,7 +41,7 @@ #include <sys/syscallargs.h> #include <sys/poll.h> #include <sys/event.h> -#include <xfs/xfs_pioctl.h> +#include <nnpfs/nnpfs_pioctl.h> ; Reserved/unimplemented system calls in the range 0-150 inclusive ; are reserved for use in future Berkeley releases. @@ -391,9 +391,13 @@ 206 STD { int sys_futimes(int fd, \ const struct timeval *tptr); } 207 STD { pid_t sys_getpgid(pid_t pid); } -208 STD { int sys_xfspioctl(int operation, char *a_pathP, \ +#ifdef NNPFS +208 STD { int sys_nnpfspioctl(int operation, char *a_pathP, \ int a_opcode, struct ViceIoctl *a_paramsP, \ int a_followSymlinks); } +#else +208 UNIMPL +#endif 209 UNIMPL ; ; Syscalls 210-219 are reserved for dynamically loaded syscalls diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 3f22882129c..bc50315c89a 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_conf.c,v 1.35 2008/05/07 14:08:37 thib Exp $ */ +/* $OpenBSD: vfs_conf.c,v 1.36 2009/06/03 14:45:54 jj Exp $ */ /* $NetBSD: vfs_conf.c,v 1.21.4.1 1995/11/01 00:06:26 jtc Exp $ */ /* @@ -106,8 +106,8 @@ extern const struct vfsops cd9660_vfsops; extern const struct vfsops ext2fs_vfsops; #endif -#ifdef XFS -extern const struct vfsops xfs_vfsops; +#ifdef NNPFS +extern const struct vfsops nnpfs_vfsops; #endif #ifdef NTFS @@ -151,9 +151,9 @@ static struct vfsconf vfsconflist[] = { { &nfs_vfsops, MOUNT_NFS, 2, 0, 0, NULL }, #endif - /* XFS */ -#ifdef XFS - { &xfs_vfsops, MOUNT_XFS, 21, 0, 0, NULL }, + /* NNPFS */ +#ifdef NNPFS + { &nnpfs_vfsops, MOUNT_NNPFS, 21, 0, 0, NULL }, #endif /* /proc Filesystem */ @@ -212,7 +212,7 @@ extern struct vnodeopv_desc msdosfs_vnodeop_opv_desc; extern struct vnodeopv_desc ext2fs_vnodeop_opv_desc; extern struct vnodeopv_desc ext2fs_specop_opv_desc; extern struct vnodeopv_desc ext2fs_fifoop_opv_desc; -extern struct vnodeopv_desc xfs_vnodeop_opv_desc; +extern struct vnodeopv_desc nnpfs_vnodeop_opv_desc; extern struct vnodeopv_desc ntfs_vnodeop_opv_desc; extern struct vnodeopv_desc udf_vnodeop_opv_desc; @@ -263,8 +263,8 @@ struct vnodeopv_desc *vfs_opv_descs[] = { &ext2fs_fifoop_opv_desc, #endif #endif -#ifdef XFS - &xfs_vnodeop_opv_desc, +#ifdef NNPFS + &nnpfs_vnodeop_opv_desc, #endif #ifdef NTFS &ntfs_vnodeop_opv_desc, diff --git a/sys/xfs/afssysdefs.h b/sys/nnpfs/afssysdefs.h index c7954f01f7d..9f109af40b3 100644 --- a/sys/xfs/afssysdefs.h +++ b/sys/nnpfs/afssysdefs.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $Id: afssysdefs.h,v 1.1 2002/06/07 03:32:58 hin Exp $ */ +/* $Id: afssysdefs.h,v 1.1 2009/06/03 14:45:54 jj Exp $ */ /* * This section is for machines using single entry point AFS syscalls! diff --git a/sys/nnpfs/nnnpfs.h b/sys/nnpfs/nnnpfs.h new file mode 100644 index 00000000000..4a30a7ca340 --- /dev/null +++ b/sys/nnpfs/nnnpfs.h @@ -0,0 +1 @@ +#define NNNPFS 2 /* maximum number of filesystems on a single device */ diff --git a/sys/xfs/xfs_attr.h b/sys/nnpfs/nnpfs_attr.h index 9b7e81a61fa..c5734ee7bf3 100644 --- a/sys/xfs/xfs_attr.h +++ b/sys/nnpfs/nnpfs_attr.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $arla: xfs_attr.h,v 1.12 2002/09/07 10:46:15 lha Exp $ */ +/* $arla: nnpfs_attr.h,v 1.12 2002/09/07 10:46:15 lha Exp $ */ #ifndef _NNPFS_ATTR_H #define _NNPFS_ATTR_H @@ -103,7 +103,7 @@ #define XA_VALID_TYPE(xa_p) \ (((xa_p)->valid) & XA_V_TYPE) -struct xfs_attr { +struct nnpfs_attr { uint32_t valid; uint32_t xa_mode; diff --git a/sys/xfs/xfs_common-bsd.c b/sys/nnpfs/nnpfs_common-bsd.c index b510805460a..d57b357d32e 100644 --- a/sys/xfs/xfs_common-bsd.c +++ b/sys/nnpfs/nnpfs_common-bsd.c @@ -31,53 +31,53 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> -#include <xfs/xfs_common.h> -#include <xfs/xfs_deb.h> +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_deb.h> -RCSID("$arla: xfs_common-bsd.c,v 1.25 2002/12/18 16:32:03 lha Exp $"); +RCSID("$arla: nnpfs_common-bsd.c,v 1.25 2002/12/18 16:32:03 lha Exp $"); #ifdef MALLOC_DEFINE -MALLOC_DEFINE(M_NNPFS, "xfs-misc", "xfs misc"); -MALLOC_DEFINE(M_NNPFS_NODE, "xfs-node", "xfs node"); -MALLOC_DEFINE(M_NNPFS_LINK, "xfs-link", "xfs link"); -MALLOC_DEFINE(M_NNPFS_MSG, "xfs-msg", "xfs msg"); +MALLOC_DEFINE(M_NNPFS, "nnpfs-misc", "nnpfs misc"); +MALLOC_DEFINE(M_NNPFS_NODE, "nnpfs-node", "nnpfs node"); +MALLOC_DEFINE(M_NNPFS_LINK, "nnpfs-link", "nnpfs link"); +MALLOC_DEFINE(M_NNPFS_MSG, "nnpfs-msg", "nnpfs msg"); #endif #ifdef NNPFS_DEBUG -static u_int xfs_allocs; -static u_int xfs_frees; +static u_int nnpfs_allocs; +static u_int nnpfs_frees; void * -xfs_alloc(u_int size, xfs_malloc_type type) +nnpfs_alloc(u_int size, nnpfs_malloc_type type) { void *ret; - xfs_allocs++; - NNPFSDEB(XDEBMEM, ("xfs_alloc: xfs_allocs - xfs_frees %d\n", - xfs_allocs - xfs_frees)); + nnpfs_allocs++; + NNPFSDEB(XDEBMEM, ("nnpfs_alloc: nnpfs_allocs - nnpfs_frees %d\n", + nnpfs_allocs - nnpfs_frees)); ret = malloc(size, type, M_WAITOK); return ret; } void -xfs_free(void *ptr, u_int size, xfs_malloc_type type) +nnpfs_free(void *ptr, u_int size, nnpfs_malloc_type type) { - xfs_frees++; + nnpfs_frees++; free(ptr, type); } #endif /* NNPFS_DEBUG */ int -xfs_suser(d_thread_t *p) +nnpfs_suser(d_thread_t *p) { #if defined(HAVE_TWO_ARGUMENT_SUSER) #ifdef __OpenBSD__ return suser (p, SUSER_NOACCT); #else - return suser (xfs_proc_to_cred(p), NULL); + return suser (nnpfs_proc_to_cred(p), NULL); #endif #else return suser (p); @@ -91,7 +91,7 @@ xfs_suser(d_thread_t *p) #ifdef HAVE_KERNEL_DEVTONAME const char * -xfs_devtoname_r (dev_t dev, char *buf, size_t sz) +nnpfs_devtoname_r (dev_t dev, char *buf, size_t sz) { return devtoname (dev); } @@ -99,7 +99,7 @@ xfs_devtoname_r (dev_t dev, char *buf, size_t sz) #else /* !HAVE_KERNEL_DEVTONAME */ const char * -xfs_devtoname_r (dev_t dev, char *buf, size_t sz) +nnpfs_devtoname_r (dev_t dev, char *buf, size_t sz) { #ifdef HAVE_KERNEL_SNPRINTF snprintf (buf, sz, "%u/%u", major(dev), minor(dev)); diff --git a/sys/xfs/xfs_common.h b/sys/nnpfs/nnpfs_common.h index b5710c466fa..af04dd740c7 100644 --- a/sys/xfs/xfs_common.h +++ b/sys/nnpfs/nnpfs_common.h @@ -31,10 +31,10 @@ * SUCH DAMAGE. */ -/* $arla: xfs_common.h,v 1.19 2002/12/18 12:32:10 lha Exp $ */ +/* $arla: nnpfs_common.h,v 1.19 2002/12/18 12:32:10 lha Exp $ */ -#ifndef _xfs_common_h -#define _xfs_common_h +#ifndef _nnpfs_common_h +#define _nnpfs_common_h #if defined(MALLOC_DECLARE) MALLOC_DECLARE(M_NNPFS); @@ -50,18 +50,18 @@ MALLOC_DECLARE(M_NNPFS_MSG); #ifdef NNPFS_DEBUG -void *xfs_alloc(u_int size, xfs_malloc_type type); -void xfs_free(void *, u_int size, xfs_malloc_type type); +void *nnpfs_alloc(u_int size, nnpfs_malloc_type type); +void nnpfs_free(void *, u_int size, nnpfs_malloc_type type); #else #ifdef __osf__ -#define xfs_alloc(a,t) malloc((a), BUCKETINDEX(a), t, M_WAITOK) +#define nnpfs_alloc(a,t) malloc((a), BUCKETINDEX(a), t, M_WAITOK) #else -#define xfs_alloc(a,t) malloc((a), t, M_WAITOK) +#define nnpfs_alloc(a,t) malloc((a), t, M_WAITOK) #endif -#define xfs_free(a, size,t) free(a, t) +#define nnpfs_free(a, size,t) free(a, t) #endif /* NNPFS_DEBUG */ -int xfs_suser(d_thread_t *p); +int nnpfs_suser(d_thread_t *p); #ifndef HAVE_KERNEL_MEMCPY void * @@ -69,11 +69,11 @@ memcpy (void *s1, const void *s2, size_t n); #endif const char * -xfs_devtoname_r (dev_t dev, char *buf, size_t sz); +nnpfs_devtoname_r (dev_t dev, char *buf, size_t sz); #ifndef HAVE_KERNEL_STRLCPY size_t strlcpy (char *dst, const char *src, size_t dst_sz); #endif -#endif /* _xfs_common_h */ +#endif /* _nnpfs_common_h */ diff --git a/sys/xfs/xfs_config.h b/sys/nnpfs/nnpfs_config.h index 68ee3f692c1..68ee3f692c1 100644 --- a/sys/xfs/xfs_config.h +++ b/sys/nnpfs/nnpfs_config.h diff --git a/sys/xfs/xfs_deb.c b/sys/nnpfs/nnpfs_deb.c index 8bedf932fda..af9f33102ff 100644 --- a/sys/xfs/xfs_deb.c +++ b/sys/nnpfs/nnpfs_deb.c @@ -31,17 +31,17 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_deb.h> -#include <xfs/xfs_debug.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_debug.h> -/* $arla: xfs_deb.c,v 1.15 2002/09/07 10:45:03 lha Exp $ */ +/* $arla: nnpfs_deb.c,v 1.15 2002/09/07 10:45:03 lha Exp $ */ /* X is on */ #define X(y) y /* and x is off */ #define x(y) 0 -unsigned int xfsdeb = (0 | +unsigned int nnpfsdeb = (0 | x(XDEBDEV) | x(XDEBMSG) | x(XDEBDNLC) | diff --git a/sys/xfs/xfs_deb.h b/sys/nnpfs/nnpfs_deb.h index cf237084fc4..ecffe9e99f6 100644 --- a/sys/xfs/xfs_deb.h +++ b/sys/nnpfs/nnpfs_deb.h @@ -31,12 +31,12 @@ * SUCH DAMAGE. */ -/* $arla: xfs_deb.h,v 1.11 2002/09/07 10:45:59 lha Exp $ */ +/* $arla: nnpfs_deb.h,v 1.11 2002/09/07 10:45:59 lha Exp $ */ -#ifndef _xfs_deb_h -#define _xfs_deb_h +#ifndef _nnpfs_deb_h +#define _nnpfs_deb_h -#include <xfs/xfs_debug.h> +#include <nnpfs/nnpfs_debug.h> #define HAVE_XDEBDEV #define HAVE_XDEBMSG @@ -49,12 +49,12 @@ #define HAVE_XDEBMEM #define HAVE_XDEBSYS -extern unsigned int xfsdeb; +extern unsigned int nnpfsdeb; #ifdef NNPFS_DEBUG -#define NNPFSDEB(mask, args) do { if (mask&xfsdeb) printf args; } while (0) +#define NNPFSDEB(mask, args) do { if (mask&nnpfsdeb) printf args; } while (0) #else #define NNPFSDEB(mask, args) do { ; } while (0) #endif -#endif /* _xfs_deb_h */ +#endif /* _nnpfs_deb_h */ diff --git a/sys/xfs/xfs_debug.h b/sys/nnpfs/nnpfs_debug.h index fda2d9eb502..6a0525aa90e 100644 --- a/sys/xfs/xfs_debug.h +++ b/sys/nnpfs/nnpfs_debug.h @@ -31,15 +31,15 @@ * SUCH DAMAGE. */ -/* $arla: xfs_debug.h,v 1.5 2002/09/14 09:56:01 tol Exp $ */ +/* $arla: nnpfs_debug.h,v 1.5 2002/09/14 09:56:01 tol Exp $ */ #ifndef __NNPFS_DEBUG_H #define __NNPFS_DEBUG_H /* - * These are GLOBAL xfs debugging masks + * These are GLOBAL nnpfs debugging masks * - * Define HAVE_XDEB in your local xfs_deb.h if + * Define HAVE_XDEB in your local nnpfs_deb.h if * you want your fs to handle the debugging flags. */ @@ -47,7 +47,7 @@ #define XDEBDEV 0x00000001 /* device handling */ #define XDEBMSG 0x00000002 /* message sending */ #define XDEBDNLC 0x00000004 /* name cache */ -#define XDEBNODE 0x00000008 /* xfs nodes */ +#define XDEBNODE 0x00000008 /* nnpfs nodes */ #define XDEBVNOPS 0x00000010 /* vnode operations */ #define XDEBVFOPS 0x00000020 /* vfs operations */ #define XDEBLKM 0x00000040 /* LKM handling */ diff --git a/sys/xfs/xfs_dev-bsd.c b/sys/nnpfs/nnpfs_dev-bsd.c index 88b99406b84..bf9ee336f18 100644 --- a/sys/xfs/xfs_dev-bsd.c +++ b/sys/nnpfs/nnpfs_dev-bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xfs_dev-bsd.c,v 1.10 2004/01/18 21:46:54 beck Exp $ +/* $OpenBSD: nnpfs_dev-bsd.c,v 1.1 2009/06/03 14:45:54 jj Exp $ * Copyright (c) 2004 Bob Beck * Copyright (c) 1995 - 2003 Kungliga Tekniska Högskolan @@ -33,51 +33,51 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_msg_locl.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_deb.h> +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_msg_locl.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_deb.h> int -xfs_devopen(dev_t dev, int flag, int devtype, d_thread_t *proc) +nnpfs_devopen(dev_t dev, int flag, int devtype, d_thread_t *proc) { - NNPFSDEB(XDEBDEV, ("xfsopen dev = %d.%d, flag = %d, devtype = %d\n", + NNPFSDEB(XDEBDEV, ("nnpfsopen dev = %d.%d, flag = %d, devtype = %d\n", major(dev), minor(dev), flag, devtype)); - return xfs_devopen_common(dev); + return nnpfs_devopen_common(dev); } int -xfs_devclose(dev_t dev, int flag, int devtype, d_thread_t *p) +nnpfs_devclose(dev_t dev, int flag, int devtype, d_thread_t *p) { - NNPFSDEB(XDEBDEV, ("xfs_devclose dev = %d(%d), flag = 0x%x\n", + NNPFSDEB(XDEBDEV, ("nnpfs_devclose dev = %d(%d), flag = 0x%x\n", major(dev), minor(dev), flag)); - return xfs_devclose_common(dev, p); + return nnpfs_devclose_common(dev, p); } int -xfs_devioctl(dev_t dev, u_long cmd, caddr_t data, int flags, d_thread_t *p) +nnpfs_devioctl(dev_t dev, u_long cmd, caddr_t data, int flags, d_thread_t *p) { - NNPFSDEB(XDEBDEV, ("xfs_devioctl dev = %d.%d, cmd = %lu, " + NNPFSDEB(XDEBDEV, ("nnpfs_devioctl dev = %d.%d, cmd = %lu, " "data = %lx, flags = %x\n", major(dev), minor(dev), (unsigned long)cmd, (unsigned long)data, flags)); return ENOTTY; } int -xfs_devpoll(dev_t dev, int events, d_thread_t * p) +nnpfs_devpoll(dev_t dev, int events, d_thread_t * p) { - struct xfs_channel *chan = &xfs_channel[minor(dev)]; + struct nnpfs_channel *chan = &nnpfs_channel[minor(dev)]; - NNPFSDEB(XDEBDEV, ("xfs_devpoll dev = %d(%d), events = 0x%x\n", + NNPFSDEB(XDEBDEV, ("nnpfs_devpoll dev = %d(%d), events = 0x%x\n", major(dev), minor(dev), events)); if ((events & (POLLIN | POLLRDNORM)) == 0) return 0; /* only supports read */ - if (!xfs_emptyq(&chan->messageq)) + if (!nnpfs_emptyq(&chan->messageq)) return (events & (POLLIN | POLLRDNORM)); selrecord (p, &chan->selinfo); @@ -86,7 +86,7 @@ xfs_devpoll(dev_t dev, int events, d_thread_t * p) } void -xfs_select_wakeup(struct xfs_channel *chan) +nnpfs_select_wakeup(struct nnpfs_channel *chan) { selwakeup (&chan->selinfo); } @@ -95,60 +95,60 @@ xfs_select_wakeup(struct xfs_channel *chan) * Install and uninstall device. */ -struct cdevsw xfs_dev = { - xfs_devopen, - xfs_devclose, - xfs_devread, - xfs_devwrite, - xfs_devioctl, +struct cdevsw nnpfs_dev = { + nnpfs_devopen, + nnpfs_devclose, + nnpfs_devread, + nnpfs_devwrite, + nnpfs_devioctl, (dev_type_stop((*))) enodev, 0, - xfs_devpoll, + nnpfs_devpoll, (dev_type_mmap((*))) enodev, 0 }; int -xfs_install_device(void) +nnpfs_install_device(void) { int i; for (i = 0; i < NNNPFS; i++) { NNPFSDEB(XDEBDEV, ("before initq(messageq and sleepq)\n")); - xfs_initq(&xfs_channel[i].messageq); - xfs_initq(&xfs_channel[i].sleepq); - xfs_channel[i].status = 0; + nnpfs_initq(&nnpfs_channel[i].messageq); + nnpfs_initq(&nnpfs_channel[i].sleepq); + nnpfs_channel[i].status = 0; } return 0; } int -xfs_uninstall_device(void) +nnpfs_uninstall_device(void) { int i; - struct xfs_channel *chan; + struct nnpfs_channel *chan; int ret = 0; for (i = 0; i < NNNPFS; i++) { - chan = &xfs_channel[i]; + chan = &nnpfs_channel[i]; if (chan->status & CHANNEL_OPENED) - xfs_devclose(makedev(0, i), 0, 0, NULL); + nnpfs_devclose(makedev(0, i), 0, 0, NULL); } - NNPFSDEB(XDEBLKM, ("xfs_uninstall_device error %d\n", ret)); + NNPFSDEB(XDEBLKM, ("nnpfs_uninstall_device error %d\n", ret)); return ret; } int -xfs_stat_device(void) +nnpfs_stat_device(void) { - return xfs_uprintf_device(); + return nnpfs_uprintf_device(); } int -xfs_is_xfs_dev(dev_t dev) +nnpfs_is_nnpfs_dev(dev_t dev) { return major(dev) <= nchrdev && - cdevsw[major(dev)].d_open == xfs_devopen && + cdevsw[major(dev)].d_open == nnpfs_devopen && minor(dev) >= 0 && minor(dev) < NNNPFS; } diff --git a/sys/xfs/xfs_dev-common.c b/sys/nnpfs/nnpfs_dev-common.c index 88338bde49a..455e7cec9ce 100644 --- a/sys/xfs/xfs_dev-common.c +++ b/sys/nnpfs/nnpfs_dev-common.c @@ -32,19 +32,19 @@ */ -#include <xfs/xfs_locl.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_msg_locl.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_deb.h> +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_msg_locl.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_deb.h> -RCSID("$arla: xfs_dev-common.c,v 1.61 2003/07/15 16:25:42 lha Exp $"); +RCSID("$arla: nnpfs_dev-common.c,v 1.61 2003/07/15 16:25:42 lha Exp $"); -struct xfs_channel xfs_channel[NNNPFS]; +struct nnpfs_channel nnpfs_channel[NNNPFS]; void -xfs_initq(struct xfs_link *q) +nnpfs_initq(struct nnpfs_link *q) { q->next = q; q->prev = q; @@ -52,21 +52,21 @@ xfs_initq(struct xfs_link *q) /* Is this queue empty? */ int -xfs_emptyq(const struct xfs_link *q) +nnpfs_emptyq(const struct nnpfs_link *q) { return q->next == q; } /* Is this link on any queue? Link *must* be inited! */ int -xfs_onq(const struct xfs_link *link) +nnpfs_onq(const struct nnpfs_link *link) { return link->next != NULL || link->prev != NULL; } /* Append q with p */ void -xfs_appendq(struct xfs_link *q, struct xfs_link *p) +nnpfs_appendq(struct nnpfs_link *q, struct nnpfs_link *p) { p->next = q; p->prev = q->prev; @@ -76,7 +76,7 @@ xfs_appendq(struct xfs_link *q, struct xfs_link *p) /* remove `p' from its queue */ void -xfs_outq(struct xfs_link *p) +nnpfs_outq(struct nnpfs_link *p) { p->next->prev = p->prev; p->prev->next = p->next; @@ -87,81 +87,81 @@ xfs_outq(struct xfs_link *p) * Only allow one open. */ int -xfs_devopen_common(dev_t dev) +nnpfs_devopen_common(dev_t dev) { - struct xfs_channel *chan; + struct nnpfs_channel *chan; if (minor(dev) < 0 || minor(dev) >= NNNPFS) return ENXIO; - chan = &xfs_channel[minor(dev)]; + chan = &nnpfs_channel[minor(dev)]; /* Only allow one reader/writer */ if (chan->status & CHANNEL_OPENED) { - NNPFSDEB(XDEBDEV, ("xfs_devopen: already open\n")); + NNPFSDEB(XDEBDEV, ("nnpfs_devopen: already open\n")); return EBUSY; } else { chan->status |= CHANNEL_OPENED; } - chan->message_buffer = xfs_alloc(MAX_XMSG_SIZE, M_NNPFS_MSG); + chan->message_buffer = nnpfs_alloc(MAX_XMSG_SIZE, M_NNPFS_MSG); /* initialize the queues if they have not been initialized before */ - xfs_initq(&chan->sleepq); - xfs_initq(&chan->messageq); + nnpfs_initq(&chan->sleepq); + nnpfs_initq(&chan->messageq); return 0; } #if defined(HAVE_TWO_ARGUMENT_VFS_BUSY) -#define xfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp), (flags)) -#define xfs_vfs_unbusy(mp, proc) vfs_unbusy((mp)) +#define nnpfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp), (flags)) +#define nnpfs_vfs_unbusy(mp, proc) vfs_unbusy((mp)) #elif defined(HAVE_THREE_ARGUMENT_VFS_BUSY) -#define xfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp), (flags), (lock)) -#define xfs_vfs_unbusy(mp, proc) vfs_unbusy((mp)) +#define nnpfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp), (flags), (lock)) +#define nnpfs_vfs_unbusy(mp, proc) vfs_unbusy((mp)) #elif defined(HAVE_FOUR_ARGUMENT_VFS_BUSY) -#define xfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp), (flags), (lock), (proc)) -#define xfs_vfs_unbusy(mp, proc) vfs_unbusy((mp), (proc)) +#define nnpfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp), (flags), (lock), (proc)) +#define nnpfs_vfs_unbusy(mp, proc) vfs_unbusy((mp), (proc)) #elif defined(__osf__) -#define xfs_vfs_busy(mp, flags, lock, proc) (0) -#define xfs_vfs_unbusy(mp, proc) (0) +#define nnpfs_vfs_busy(mp, flags, lock, proc) (0) +#define nnpfs_vfs_unbusy(mp, proc) (0) #else -#define xfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp)) -#define xfs_vfs_unbusy(mp, proc) vfs_unbusy((mp)) +#define nnpfs_vfs_busy(mp, flags, lock, proc) vfs_busy((mp)) +#define nnpfs_vfs_unbusy(mp, proc) vfs_unbusy((mp)) #endif /* * Wakeup all sleepers and cleanup. */ int -xfs_devclose_common(dev_t dev, d_thread_t *proc) +nnpfs_devclose_common(dev_t dev, d_thread_t *proc) { - struct xfs_channel *chan = &xfs_channel[minor(dev)]; - struct xfs_link *first; + struct nnpfs_channel *chan = &nnpfs_channel[minor(dev)]; + struct nnpfs_link *first; /* Sanity check, paranoia? */ if (!(chan->status & CHANNEL_OPENED)) - panic("xfs_devclose never opened?"); + panic("nnpfs_devclose never opened?"); chan->status &= ~CHANNEL_OPENED; /* No one is going to read those messages so empty queue! */ - while (!xfs_emptyq(&chan->messageq)) { + while (!nnpfs_emptyq(&chan->messageq)) { NNPFSDEB(XDEBDEV, ("before outq(messageq)\n")); first = chan->messageq.next; - xfs_outq(first); + nnpfs_outq(first); if (first->error_or_size != 0) - xfs_free(first, first->error_or_size, M_NNPFS_LINK); + nnpfs_free(first, first->error_or_size, M_NNPFS_LINK); NNPFSDEB(XDEBDEV, ("after outq(messageq)\n")); } /* Wakeup those waiting for replies that will never arrive. */ - while (!xfs_emptyq(&chan->sleepq)) { + while (!nnpfs_emptyq(&chan->sleepq)) { NNPFSDEB(XDEBDEV, ("before outq(sleepq)\n")); first = chan->sleepq.next; - xfs_outq(first); + nnpfs_outq(first); first->error_or_size = ENODEV; wakeup((caddr_t) first); NNPFSDEB(XDEBDEV, ("after outq(sleepq)\n")); @@ -171,22 +171,22 @@ xfs_devclose_common(dev_t dev, d_thread_t *proc) wakeup((caddr_t) chan); if (chan->message_buffer) { - xfs_free(chan->message_buffer, MAX_XMSG_SIZE, M_NNPFS_MSG); + nnpfs_free(chan->message_buffer, MAX_XMSG_SIZE, M_NNPFS_MSG); chan->message_buffer = NULL; } /* - * Free all xfs nodes. + * Free all nnpfs nodes. */ - if (xfs[minor(dev)].mp != NULL) { - if (xfs_vfs_busy(xfs[minor(dev)].mp, VB_READ|VB_WAIT, NULL, proc)) { - NNPFSDEB(XDEBNODE, ("xfs_dev_close: vfs_busy() --> BUSY\n")); + if (nnpfs[minor(dev)].mp != NULL) { + if (nnpfs_vfs_busy(nnpfs[minor(dev)].mp, VB_READ|VB_WAIT, NULL, proc)) { + NNPFSDEB(XDEBNODE, ("nnpfs_dev_close: vfs_busy() --> BUSY\n")); return EBUSY; } - free_all_xfs_nodes(&xfs[minor(dev)], FORCECLOSE, 0); + free_all_nnpfs_nodes(&nnpfs[minor(dev)], FORCECLOSE, 0); - xfs_vfs_unbusy(xfs[minor(dev)].mp, proc); + nnpfs_vfs_unbusy(nnpfs[minor(dev)].mp, proc); } return 0; @@ -198,7 +198,7 @@ xfs_devclose_common(dev_t dev, d_thread_t *proc) */ static long -xfs_cursig (d_thread_t *p) +nnpfs_cursig (d_thread_t *p) { #if defined(__osf__) thread_t th = current_thread(); @@ -226,42 +226,42 @@ xfs_cursig (d_thread_t *p) */ int -xfs_devread(dev_t dev, struct uio * uiop, int ioflag) +nnpfs_devread(dev_t dev, struct uio * uiop, int ioflag) { - struct xfs_channel *chan = &xfs_channel[minor(dev)]; - struct xfs_link *first; + struct nnpfs_channel *chan = &nnpfs_channel[minor(dev)]; + struct nnpfs_link *first; int error = 0; #ifdef NNPFS_DEBUG char devname[64]; #endif - NNPFSDEB(XDEBDEV, ("xfs_devread dev = %s\n", - xfs_devtoname_r(dev, devname, sizeof(devname)))); + NNPFSDEB(XDEBDEV, ("nnpfs_devread dev = %s\n", + nnpfs_devtoname_r(dev, devname, sizeof(devname)))); - NNPFSDEB(XDEBDEV, ("xfs_devread: m = %lx, m->prev = %lx, m->next = %lx\n", + NNPFSDEB(XDEBDEV, ("nnpfs_devread: m = %lx, m->prev = %lx, m->next = %lx\n", (unsigned long)&chan->messageq, (unsigned long)chan->messageq.prev, (unsigned long)chan->messageq.next)); #ifdef HAVE_FREEBSD_THREAD - chan->proc = xfs_uio_to_thread(uiop); + chan->proc = nnpfs_uio_to_thread(uiop); #else - chan->proc = xfs_uio_to_proc(uiop); + chan->proc = nnpfs_uio_to_proc(uiop); #endif again: - if (!xfs_emptyq (&chan->messageq)) { - while (!xfs_emptyq (&chan->messageq)) { + if (!nnpfs_emptyq (&chan->messageq)) { + while (!nnpfs_emptyq (&chan->messageq)) { /* Remove message */ first = chan->messageq.next; - NNPFSDEB(XDEBDEV, ("xfs_devread: first = %lx, " + NNPFSDEB(XDEBDEV, ("nnpfs_devread: first = %lx, " "first->prev = %lx, first->next = %lx\n", (unsigned long)first, (unsigned long)first->prev, (unsigned long)first->next)); - NNPFSDEB(XDEBDEV, ("xfs_devread: message->size = %u\n", + NNPFSDEB(XDEBDEV, ("nnpfs_devread: message->size = %u\n", first->message->size)); if (first->message->size > uiop->uio_resid) @@ -272,22 +272,22 @@ xfs_devread(dev_t dev, struct uio * uiop, int ioflag) if (error) break; - xfs_outq(first); + nnpfs_outq(first); if (first->error_or_size != 0) - xfs_free(first, first->error_or_size, M_NNPFS_LINK); + nnpfs_free(first, first->error_or_size, M_NNPFS_LINK); } } else { chan->status |= CHANNEL_WAITING; - if (tsleep((caddr_t) chan, (PZERO + 1) | PCATCH, "xfsread", 0)) { + if (tsleep((caddr_t) chan, (PZERO + 1) | PCATCH, "nnpfsread", 0)) { #ifdef HAVE_FREEBSD_THREAD NNPFSDEB(XDEBMSG, - ("caught signal xfs_devread: %ld\n", - xfs_cursig(xfs_uio_to_thread(uiop)))); + ("caught signal nnpfs_devread: %ld\n", + nnpfs_cursig(nnpfs_uio_to_thread(uiop)))); #else NNPFSDEB(XDEBMSG, - ("caught signal xfs_devread: %ld\n", - xfs_cursig(xfs_uio_to_proc(uiop)))); + ("caught signal nnpfs_devread: %ld\n", + nnpfs_cursig(nnpfs_uio_to_proc(uiop)))); #endif error = EINTR; } else if ((chan->status & CHANNEL_WAITING) == 0) { @@ -296,7 +296,7 @@ xfs_devread(dev_t dev, struct uio * uiop, int ioflag) error = EIO; } - NNPFSDEB(XDEBDEV, ("xfs_devread done error = %d\n", error)); + NNPFSDEB(XDEBDEV, ("nnpfs_devread done error = %d\n", error)); return error; } @@ -306,24 +306,24 @@ xfs_devread(dev_t dev, struct uio * uiop, int ioflag) * wakeup sleepers, insert new data in VFS. */ int -xfs_devwrite(dev_t dev, struct uio *uiop, int ioflag) +nnpfs_devwrite(dev_t dev, struct uio *uiop, int ioflag) { - struct xfs_channel *chan = &xfs_channel[minor(dev)]; + struct nnpfs_channel *chan = &nnpfs_channel[minor(dev)]; char *p; int error; u_int cnt; - struct xfs_message_header *msg_buf; + struct nnpfs_message_header *msg_buf; #ifdef NNPFS_DEBUG char devname[64]; #endif - NNPFSDEB(XDEBDEV, ("xfs_devwrite dev = %s\n", - xfs_devtoname_r (dev, devname, sizeof(devname)))); + NNPFSDEB(XDEBDEV, ("nnpfs_devwrite dev = %s\n", + nnpfs_devtoname_r (dev, devname, sizeof(devname)))); #ifdef HAVE_FREEBSD_THREAD - chan->proc = xfs_uio_to_thread(uiop); + chan->proc = nnpfs_uio_to_thread(uiop); #else - chan->proc = xfs_uio_to_proc(uiop); + chan->proc = nnpfs_uio_to_proc(uiop); #endif cnt = uiop->uio_resid; error = uiomove((caddr_t) chan->message_buffer, MAX_XMSG_SIZE, uiop); @@ -339,18 +339,18 @@ xfs_devwrite(dev_t dev, struct uio *uiop, int ioflag) cnt > 0; p += msg_buf->size, cnt -= msg_buf->size) { #ifdef HAVE_FREEBSD_THREAD - d_thread_t *pp = xfs_uio_to_thread(uiop); + d_thread_t *pp = nnpfs_uio_to_thread(uiop); #else - d_thread_t *pp = xfs_uio_to_proc(uiop); + d_thread_t *pp = nnpfs_uio_to_proc(uiop); #endif - msg_buf = (struct xfs_message_header *)p; - error = xfs_message_receive (minor(dev), + msg_buf = (struct nnpfs_message_header *)p; + error = nnpfs_message_receive (minor(dev), msg_buf, msg_buf->size, pp); } - NNPFSDEB(XDEBDEV, ("xfs_devwrite error = %d\n", error)); + NNPFSDEB(XDEBDEV, ("nnpfs_devwrite error = %d\n", error)); return error; } @@ -358,15 +358,15 @@ xfs_devwrite(dev_t dev, struct uio *uiop, int ioflag) * Send a message to user space. */ int -xfs_message_send(int fd, struct xfs_message_header * message, u_int size) +nnpfs_message_send(int fd, struct nnpfs_message_header * message, u_int size) { - struct xfs_channel *chan = &xfs_channel[fd]; + struct nnpfs_channel *chan = &nnpfs_channel[fd]; struct { - struct xfs_link this_message; - struct xfs_message_header msg; + struct nnpfs_link this_message; + struct nnpfs_message_header msg; } *t; - NNPFSDEB(XDEBMSG, ("xfs_message_send opcode = %d\n", message->opcode)); + NNPFSDEB(XDEBMSG, ("nnpfs_message_send opcode = %d\n", message->opcode)); if (!(chan->status & CHANNEL_OPENED)) /* No receiver? */ return ENODEV; @@ -375,17 +375,17 @@ xfs_message_send(int fd, struct xfs_message_header * message, u_int size) message->size = size; message->sequence_num = chan->nsequence++; - t = xfs_alloc(sizeof(t->this_message) + size, M_NNPFS); + t = nnpfs_alloc(sizeof(t->this_message) + size, M_NNPFS); t->this_message.error_or_size = sizeof(t->this_message) + size; bcopy(message, &t->msg, size); t->this_message.message = &t->msg; - xfs_appendq(&chan->messageq, &t->this_message); + nnpfs_appendq(&chan->messageq, &t->this_message); if (chan->status & CHANNEL_WAITING) { chan->status &= ~CHANNEL_WAITING; wakeup((caddr_t) chan); } - xfs_select_wakeup(chan); + nnpfs_select_wakeup(chan); return 0; } @@ -400,25 +400,25 @@ xfs_message_send(int fd, struct xfs_message_header * message, u_int size) #if defined(HAVE_STRUCT_PROC_P_SIGMASK) || defined(HAVE_STRUCT_PROC_P_SIGCTX) || defined(HAVE_STRUCT_PROC_P_SIGWAITMASK) || defined(__osf__) || defined(HAVE_FREEBSD_THREAD) static void -xfs_block_sigset (sigset_t *sigset) +nnpfs_block_sigset (sigset_t *sigset) { #if defined(__sigaddset) -#define xfs_sig_block(ss,signo) __sigaddset((ss), (signo)) +#define nnpfs_sig_block(ss,signo) __sigaddset((ss), (signo)) #elif defined(SIGADDSET) -#define xfs_sig_block(ss,signo) SIGADDSET(*(ss), (signo)) +#define nnpfs_sig_block(ss,signo) SIGADDSET(*(ss), (signo)) #else -#define xfs_sig_block(ss,signo) *(ss) |= sigmask(signo) +#define nnpfs_sig_block(ss,signo) *(ss) |= sigmask(signo) #endif - xfs_sig_block(sigset, SIGIO); - xfs_sig_block(sigset, SIGALRM); - xfs_sig_block(sigset, SIGVTALRM); - xfs_sig_block(sigset, SIGCHLD); + nnpfs_sig_block(sigset, SIGIO); + nnpfs_sig_block(sigset, SIGALRM); + nnpfs_sig_block(sigset, SIGVTALRM); + nnpfs_sig_block(sigset, SIGCHLD); #ifdef SIGINFO - xfs_sig_block(sigset, SIGINFO); + nnpfs_sig_block(sigset, SIGINFO); #endif -#undef xfs_sig_block +#undef nnpfs_sig_block } #endif @@ -427,26 +427,26 @@ xfs_block_sigset (sigset_t *sigset) */ int -xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, +nnpfs_message_rpc(int fd, struct nnpfs_message_header * message, u_int size, d_thread_t *proc) { int ret; - struct xfs_channel *chan = &xfs_channel[fd]; - struct xfs_link *this_message; - struct xfs_link *this_process; - struct xfs_message_header *msg; + struct nnpfs_channel *chan = &nnpfs_channel[fd]; + struct nnpfs_link *this_message; + struct nnpfs_link *this_process; + struct nnpfs_message_header *msg; #if defined(HAVE_STRUCT_PROC_P_SIGMASK) || defined(HAVE_STRUCT_PROC_P_SIGCTX) || defined(__osf__) || defined(HAVE_FREEBSD_THREAD) sigset_t oldsigmask; #endif int catch; - NNPFSDEB(XDEBMSG, ("xfs_message_rpc opcode = %d\n", message->opcode)); + NNPFSDEB(XDEBMSG, ("nnpfs_message_rpc opcode = %d\n", message->opcode)); if (proc == NULL) { #ifdef HAVE_FREEBSD_THREAD - proc = xfs_curthread(); + proc = nnpfs_curthread(); #else - proc = xfs_curproc(); + proc = nnpfs_curproc(); #endif } if (!(chan->status & CHANNEL_OPENED)) /* No receiver? */ @@ -455,11 +455,11 @@ xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, #ifdef HAVE_FREEBSD_THREAD if (chan->proc != NULL && chan->proc->td_proc != NULL && proc->td_proc->p_pid == chan->proc->td_proc->p_pid) { - printf("xfs_message_rpc: deadlock avoided " + printf("nnpfs_message_rpc: deadlock avoided " "pid = %u == %u\n", proc->td_proc->p_pid, chan->proc->td_proc->p_pid); #else if (chan->proc != NULL && proc->p_pid == chan->proc->p_pid) { - printf("xfs_message_rpc: deadlock avoided " + printf("nnpfs_message_rpc: deadlock avoided " "pid = %u == %u\n", proc->p_pid, chan->proc->p_pid); #endif #if 0 @@ -468,13 +468,13 @@ xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, return EDEADLK; } - if (size < sizeof(struct xfs_message_wakeup)) { + if (size < sizeof(struct nnpfs_message_wakeup)) { printf("NNPFS PANIC Error: Message to small to receive wakeup, opcode = %d\n", message->opcode); return ENOMEM; } - this_message = xfs_alloc(sizeof(struct xfs_link), M_NNPFS_LINK); - this_process = xfs_alloc(sizeof(struct xfs_link), M_NNPFS_LINK); - msg = xfs_alloc(size, M_NNPFS_MSG); + this_message = nnpfs_alloc(sizeof(struct nnpfs_link), M_NNPFS_LINK); + this_process = nnpfs_alloc(sizeof(struct nnpfs_link), M_NNPFS_LINK); + msg = nnpfs_alloc(size, M_NNPFS_MSG); bcopy(message, msg, size); msg->size = size; @@ -482,9 +482,9 @@ xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, this_message->error_or_size = 0; this_message->message = msg; this_process->message = msg; - xfs_appendq(&chan->messageq, this_message); - xfs_appendq(&chan->sleepq, this_process); - xfs_select_wakeup(chan); + nnpfs_appendq(&chan->messageq, this_message); + nnpfs_appendq(&chan->sleepq, this_process); + nnpfs_select_wakeup(chan); this_process->error_or_size = 0; if (chan->status & CHANNEL_WAITING) { @@ -501,23 +501,23 @@ xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, #ifdef HAVE_FREEBSD_THREAD /* FreeBSD 5.1 */ oldsigmask = proc->td_sigmask; - xfs_block_sigset (&proc->td_sigmask); + nnpfs_block_sigset (&proc->td_sigmask); #elif HAVE_STRUCT_PROC_P_SIGMASK /* NetBSD 1.5, Darwin 1.3, FreeBSD 4.3, 5.0, OpenBSD 2.8 */ oldsigmask = proc->p_sigmask; - xfs_block_sigset (&proc->p_sigmask); + nnpfs_block_sigset (&proc->p_sigmask); #elif defined(HAVE_STRUCT_PROC_P_SIGCTX) /* NetBSD 1.6 */ oldsigmask = proc->p_sigctx.ps_sigmask; - xfs_block_sigset (&proc->p_sigctx.ps_sigmask); + nnpfs_block_sigset (&proc->p_sigctx.ps_sigmask); #elif defined(HAVE_STRUCT_PROC_P_SIGWAITMASK) /* OSF 4.0 */ oldsigmask = proc->p_sigwaitmask; - xfs_block_sigset (&proc->p_sigwaitmask); + nnpfs_block_sigset (&proc->p_sigwaitmask); #elif defined(__osf__) /* OSF 5.0 */ oldsigmask = u.u_sigmask; - xfs_block_sigset (&u.u_sigmask); + nnpfs_block_sigset (&u.u_sigmask); #endif /* @@ -541,12 +541,12 @@ xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, * happen sometimes when rebooting. */ if (!(chan->status & CHANNEL_OPENED)) { - NNPFSDEB(XDEBMSG, ("xfs_message_rpc: channel went away\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_rpc: channel went away\n")); this_process->error_or_size = EINTR; } else if ((ret = tsleep((caddr_t) this_process, - (PZERO + 1) | catch, "xfs", 0)) != 0) { + (PZERO + 1) | catch, "nnpfs", 0)) != 0) { NNPFSDEB(XDEBMSG, ("caught signal (%d): %ld\n", - ret, xfs_cursig(proc))); + ret, nnpfs_cursig(proc))); this_process->error_or_size = EINTR; } @@ -566,110 +566,110 @@ xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, * Caught signal, got reply message or device was closed. * Need to clean up both messageq and sleepq. */ - if (xfs_onq(this_message)) { - xfs_outq(this_message); + if (nnpfs_onq(this_message)) { + nnpfs_outq(this_message); } - if (xfs_onq(this_process)) { - xfs_outq(this_process); + if (nnpfs_onq(this_process)) { + nnpfs_outq(this_process); } ret = this_process->error_or_size; - NNPFSDEB(XDEBMSG, ("xfs_message_rpc this_process->error_or_size = %d\n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_rpc this_process->error_or_size = %d\n", this_process->error_or_size)); - NNPFSDEB(XDEBMSG, ("xfs_message_rpc opcode ((xfs_message_wakeup*)(this_process->message))->error = %d\n", ((struct xfs_message_wakeup *) (this_process->message))->error)); + NNPFSDEB(XDEBMSG, ("nnpfs_message_rpc opcode ((nnpfs_message_wakeup*)(this_process->message))->error = %d\n", ((struct nnpfs_message_wakeup *) (this_process->message))->error)); bcopy(msg, message, size); - xfs_free(this_message, sizeof(*this_message), M_NNPFS_LINK); - xfs_free(this_process, sizeof(*this_process), M_NNPFS_LINK); - xfs_free(msg, size, M_NNPFS_MSG); + nnpfs_free(this_message, sizeof(*this_message), M_NNPFS_LINK); + nnpfs_free(this_process, sizeof(*this_process), M_NNPFS_LINK); + nnpfs_free(msg, size, M_NNPFS_MSG); return ret; } /* * For each message type there is a message handler - * that implements its action, xfs_message_receive + * that implements its action, nnpfs_message_receive * invokes the correct function. */ int -xfs_message_receive(int fd, - struct xfs_message_header *message, +nnpfs_message_receive(int fd, + struct nnpfs_message_header *message, u_int size, d_thread_t *p) { - NNPFSDEB(XDEBMSG, ("xfs_message_receive opcode = %d\n", message->opcode)); + NNPFSDEB(XDEBMSG, ("nnpfs_message_receive opcode = %d\n", message->opcode)); /* Dispatch and coerce message type */ switch (message->opcode) { case NNPFS_MSG_WAKEUP: - return xfs_message_wakeup(fd, - (struct xfs_message_wakeup *) message, + return nnpfs_message_wakeup(fd, + (struct nnpfs_message_wakeup *) message, message->size, p); case NNPFS_MSG_WAKEUP_DATA: - return xfs_message_wakeup_data(fd, - (struct xfs_message_wakeup_data *) message, + return nnpfs_message_wakeup_data(fd, + (struct nnpfs_message_wakeup_data *) message, message->size, p); case NNPFS_MSG_INSTALLROOT: - return xfs_message_installroot(fd, - (struct xfs_message_installroot *) message, + return nnpfs_message_installroot(fd, + (struct nnpfs_message_installroot *) message, message->size, p); case NNPFS_MSG_INSTALLNODE: - return xfs_message_installnode(fd, - (struct xfs_message_installnode *) message, + return nnpfs_message_installnode(fd, + (struct nnpfs_message_installnode *) message, message->size, p); case NNPFS_MSG_INSTALLATTR: - return xfs_message_installattr(fd, - (struct xfs_message_installattr *) message, + return nnpfs_message_installattr(fd, + (struct nnpfs_message_installattr *) message, message->size, p); case NNPFS_MSG_INSTALLDATA: - return xfs_message_installdata(fd, - (struct xfs_message_installdata *) message, + return nnpfs_message_installdata(fd, + (struct nnpfs_message_installdata *) message, message->size, p); case NNPFS_MSG_INVALIDNODE: - return xfs_message_invalidnode(fd, - (struct xfs_message_invalidnode *) message, + return nnpfs_message_invalidnode(fd, + (struct nnpfs_message_invalidnode *) message, message->size, p); case NNPFS_MSG_UPDATEFID: - return xfs_message_updatefid(fd, - (struct xfs_message_updatefid *)message, + return nnpfs_message_updatefid(fd, + (struct nnpfs_message_updatefid *)message, message->size, p); case NNPFS_MSG_GC_NODES: - return xfs_message_gc_nodes(fd, - (struct xfs_message_gc_nodes *)message, + return nnpfs_message_gc_nodes(fd, + (struct nnpfs_message_gc_nodes *)message, message->size, p); case NNPFS_MSG_VERSION: - return xfs_message_version(fd, - (struct xfs_message_version *)message, + return nnpfs_message_version(fd, + (struct nnpfs_message_version *)message, message->size, p); default: - printf("NNPFS PANIC Warning xfs_dev: Unknown message opcode == %d\n", + printf("NNPFS PANIC Warning nnpfs_dev: Unknown message opcode == %d\n", message->opcode); return EINVAL; } } int -xfs_message_wakeup(int fd, - struct xfs_message_wakeup *message, +nnpfs_message_wakeup(int fd, + struct nnpfs_message_wakeup *message, u_int size, d_thread_t *p) { - struct xfs_channel *chan = &xfs_channel[fd]; - struct xfs_link *sleepq = &chan->sleepq; - struct xfs_link *t = chan->sleepq.next; /* Really first in q */ + struct nnpfs_channel *chan = &nnpfs_channel[fd]; + struct nnpfs_link *sleepq = &chan->sleepq; + struct nnpfs_link *t = chan->sleepq.next; /* Really first in q */ - NNPFSDEB(XDEBMSG, ("xfs_message_wakeup error: %d\n", message->error)); + NNPFSDEB(XDEBMSG, ("nnpfs_message_wakeup error: %d\n", message->error)); for (; t != sleepq; t = t->next) if (t->message->sequence_num == message->sleepers_sequence_num) { @@ -687,16 +687,16 @@ xfs_message_wakeup(int fd, } int -xfs_message_wakeup_data(int fd, - struct xfs_message_wakeup_data * message, +nnpfs_message_wakeup_data(int fd, + struct nnpfs_message_wakeup_data * message, u_int size, d_thread_t *p) { - struct xfs_channel *chan = &xfs_channel[fd]; - struct xfs_link *sleepq = &chan->sleepq; - struct xfs_link *t = chan->sleepq.next; /* Really first in q */ + struct nnpfs_channel *chan = &nnpfs_channel[fd]; + struct nnpfs_link *sleepq = &chan->sleepq; + struct nnpfs_link *t = chan->sleepq.next; /* Really first in q */ - NNPFSDEB(XDEBMSG, ("xfs_message_wakeup_data error: %d\n", message->error)); + NNPFSDEB(XDEBMSG, ("nnpfs_message_wakeup_data error: %d\n", message->error)); for (; t != sleepq; t = t->next) if (t->message->sequence_num == message->sleepers_sequence_num) { @@ -715,20 +715,20 @@ xfs_message_wakeup_data(int fd, * */ int -xfs_uprintf_device(void) +nnpfs_uprintf_device(void) { #if 0 int i; for (i = 0; i < NNNPFS; i++) { - uprintf("xfs_channel[%d] = {\n", i); - uprintf("messageq.next = %lx ", xfs_channel[i].messageq.next); - uprintf("messageq.prev = %lx ", xfs_channel[i].messageq.prev); - uprintf("sleepq.next = %lx ", xfs_channel[i].sleepq.next); - uprintf("sleepq.prev = %lx ", xfs_channel[i].sleepq.prev); + uprintf("nnpfs_channel[%d] = {\n", i); + uprintf("messageq.next = %lx ", nnpfs_channel[i].messageq.next); + uprintf("messageq.prev = %lx ", nnpfs_channel[i].messageq.prev); + uprintf("sleepq.next = %lx ", nnpfs_channel[i].sleepq.next); + uprintf("sleepq.prev = %lx ", nnpfs_channel[i].sleepq.prev); uprintf("nsequence = %d status = %d\n", - xfs_channel[i].nsequence, - xfs_channel[i].status); + nnpfs_channel[i].nsequence, + nnpfs_channel[i].status); uprintf("}\n"); } #endif diff --git a/sys/xfs/xfs_dev.h b/sys/nnpfs/nnpfs_dev.h index cc62a4c46d6..a588bf0b178 100644 --- a/sys/xfs/xfs_dev.h +++ b/sys/nnpfs/nnpfs_dev.h @@ -31,132 +31,132 @@ * SUCH DAMAGE. */ -/* $arla: xfs_dev.h,v 1.19 2003/01/19 20:53:52 lha Exp $ */ +/* $arla: nnpfs_dev.h,v 1.19 2003/01/19 20:53:52 lha Exp $ */ -#ifndef _xfs_dev_h -#define _xfs_dev_h +#ifndef _nnpfs_dev_h +#define _nnpfs_dev_h /* - * Queues of xfs_links hold outbound messages and processes sleeping + * Queues of nnpfs_links hold outbound messages and processes sleeping * for replies. The last field is used to return error to sleepers and * to keep record of memory to be deallocated when messages have been * delivered or dropped. */ -struct xfs_link { - struct xfs_link *prev, *next; - struct xfs_message_header *message; +struct nnpfs_link { + struct nnpfs_link *prev, *next; + struct nnpfs_message_header *message; u_int error_or_size; /* error on sleepq and size on * messageq */ }; -struct xfs_channel { - struct xfs_link messageq; /* Messages not yet read */ - struct xfs_link sleepq; /* Waiting for reply message */ +struct nnpfs_channel { + struct nnpfs_link messageq; /* Messages not yet read */ + struct nnpfs_link sleepq; /* Waiting for reply message */ u_int nsequence; #ifdef __osf__ sel_queue_t sel_q; #else struct selinfo selinfo; #endif - struct xfs_message_header *message_buffer; + struct nnpfs_message_header *message_buffer; int status; #define CHANNEL_OPENED 0x1 #define CHANNEL_WAITING 0x2 d_thread_t *proc; }; -extern struct xfs_channel xfs_channel[NNNPFS]; +extern struct nnpfs_channel nnpfs_channel[NNNPFS]; /* * These are variant dependent */ -void xfs_select_wakeup(struct xfs_channel *); +void nnpfs_select_wakeup(struct nnpfs_channel *); -int xfs_install_device(void); -int xfs_uninstall_device(void); +int nnpfs_install_device(void); +int nnpfs_uninstall_device(void); -int xfs_install_filesys(void); -int xfs_may_uninstall_filesys(void); -int xfs_uninstall_filesys(void); +int nnpfs_install_filesys(void); +int nnpfs_may_uninstall_filesys(void); +int nnpfs_uninstall_filesys(void); -int xfs_stat_filesys(void); -int xfs_stat_device(void); +int nnpfs_stat_filesys(void); +int nnpfs_stat_device(void); /* * And these should be generic */ void -xfs_initq(struct xfs_link *q); +nnpfs_initq(struct nnpfs_link *q); int -xfs_emptyq(const struct xfs_link *q); +nnpfs_emptyq(const struct nnpfs_link *q); int -xfs_onq(const struct xfs_link *link); +nnpfs_onq(const struct nnpfs_link *link); void -xfs_appendq(struct xfs_link *q, struct xfs_link *p); +nnpfs_appendq(struct nnpfs_link *q, struct nnpfs_link *p); void -xfs_outq(struct xfs_link *p); +nnpfs_outq(struct nnpfs_link *p); int -xfs_devopen_common(dev_t dev); +nnpfs_devopen_common(dev_t dev); #ifndef __osf__ /* XXX - we should do the same for osf */ -int xfs_devopen(dev_t dev, int flag, int devtype, d_thread_t *proc); -int xfs_devclose(dev_t dev, int flag, int devtype, d_thread_t *proc); -int xfs_devioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +int nnpfs_devopen(dev_t dev, int flag, int devtype, d_thread_t *proc); +int nnpfs_devclose(dev_t dev, int flag, int devtype, d_thread_t *proc); +int nnpfs_devioctl(dev_t dev, u_long cmd, caddr_t data, int flags, d_thread_t *p); #ifdef HAVE_THREE_ARGUMENT_SELRECORD -int xfs_devselect(dev_t dev, int which, void *wql, d_thread_t *p); +int nnpfs_devselect(dev_t dev, int which, void *wql, d_thread_t *p); #else -int xfs_devselect(dev_t dev, int which, d_thread_t *p); +int nnpfs_devselect(dev_t dev, int which, d_thread_t *p); #endif -int xfs_devpoll(dev_t dev, int events, d_thread_t *p); +int nnpfs_devpoll(dev_t dev, int events, d_thread_t *p); #endif /* ! __osf__ */ int -xfs_devclose_common(dev_t dev, d_thread_t *p); +nnpfs_devclose_common(dev_t dev, d_thread_t *p); int -xfs_devread(dev_t dev, struct uio * uiop, int ioflag); +nnpfs_devread(dev_t dev, struct uio * uiop, int ioflag); int -xfs_devwrite(dev_t dev, struct uio *uiop, int ioflag); +nnpfs_devwrite(dev_t dev, struct uio *uiop, int ioflag); int -xfs_message_send(int fd, struct xfs_message_header * message, u_int size); +nnpfs_message_send(int fd, struct nnpfs_message_header * message, u_int size); int -xfs_message_rpc(int fd, struct xfs_message_header * message, u_int size, +nnpfs_message_rpc(int fd, struct nnpfs_message_header * message, u_int size, d_thread_t *p); int -xfs_message_receive(int fd, - struct xfs_message_header *message, +nnpfs_message_receive(int fd, + struct nnpfs_message_header *message, u_int size, d_thread_t *p); int -xfs_message_wakeup(int fd, - struct xfs_message_wakeup *message, +nnpfs_message_wakeup(int fd, + struct nnpfs_message_wakeup *message, u_int size, d_thread_t *p); int -xfs_message_wakeup_data(int fd, - struct xfs_message_wakeup_data * message, +nnpfs_message_wakeup_data(int fd, + struct nnpfs_message_wakeup_data * message, u_int size, d_thread_t *p); int -xfs_uprintf_device(void); +nnpfs_uprintf_device(void); int -xfs_is_xfs_dev (dev_t dev); +nnpfs_is_nnpfs_dev (dev_t dev); -#endif /* _xfs_dev_h */ +#endif /* _nnpfs_dev_h */ diff --git a/sys/xfs/xfs_extern.h b/sys/nnpfs/nnpfs_extern.h index ca6d5a1e8f4..31a8f013e65 100644 --- a/sys/xfs/xfs_extern.h +++ b/sys/nnpfs/nnpfs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xfs_extern.h,v 1.6 2003/09/28 04:33:44 millert Exp $ */ +/* $OpenBSD: nnpfs_extern.h,v 1.1 2009/06/03 14:45:54 jj Exp $ */ /* * Copyright (c) 1998 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). @@ -37,18 +37,18 @@ * SUCH DAMAGE. */ -#ifndef _XFS_XFS_EXTERN_H_ -#define _XFS_XFS_EXTERN_H_ +#ifndef _NNPFS_NNPFS_EXTERN_H_ +#define _NNPFS_NNPFS_EXTERN_H_ #ifdef _KERNEL -int xfs_devopen(dev_t dev, int flags, int devtype, struct proc * p); -int xfs_devclose(dev_t dev, int flags, int devtype, struct proc * p); -int xfs_devread(dev_t dev, struct uio * uiop, int ioflag); -int xfs_devwrite(dev_t dev, struct uio *uiop, int ioflag); -int xfs_devioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +int nnpfs_devopen(dev_t dev, int flags, int devtype, struct proc * p); +int nnpfs_devclose(dev_t dev, int flags, int devtype, struct proc * p); +int nnpfs_devread(dev_t dev, struct uio * uiop, int ioflag); +int nnpfs_devwrite(dev_t dev, struct uio *uiop, int ioflag); +int nnpfs_devioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc * p); -int xfs_devpoll(dev_t dev, int events, struct proc * p); +int nnpfs_devpoll(dev_t dev, int events, struct proc * p); #endif /* _KERNEL */ diff --git a/sys/xfs/xfs_fs.h b/sys/nnpfs/nnpfs_fs.h index 99915215907..34cb2540fef 100644 --- a/sys/xfs/xfs_fs.h +++ b/sys/nnpfs/nnpfs_fs.h @@ -31,16 +31,16 @@ * SUCH DAMAGE. */ -/* $arla: xfs_fs.h,v 1.22 2002/12/19 09:49:19 lha Exp $ */ +/* $arla: nnpfs_fs.h,v 1.22 2002/12/19 09:49:19 lha Exp $ */ -#ifndef _xfs_h -#define _xfs_h +#ifndef _nnpfs_h +#define _nnpfs_h #include <sys/types.h> -#include <xfs/xfs_common.h> -#include <xfs/xfs_node.h> -#include <xfs/xfs_attr.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_node.h> +#include <nnpfs/nnpfs_attr.h> #define NNNPFS 2 /* maximal number of filesystems on a single device */ @@ -48,26 +48,26 @@ * Filesystem struct. */ -struct xfs { +struct nnpfs { u_int status; /* Inited, opened or mounted */ #define NNPFS_MOUNTED 0x1 struct mount *mp; - struct xfs_node *root; + struct nnpfs_node *root; u_int nnodes; int fd; - struct xfs_nodelist_head nodehead; + struct nnpfs_nodelist_head nodehead; }; #ifdef __osf__ #ifdef HAVE_STRUCT_MOUNT_M_INFO -#define VFS_TO_NNPFS(v) ((struct xfs *) ((v)->m_info)) +#define VFS_TO_NNPFS(v) ((struct nnpfs *) ((v)->m_info)) #define VFS_ASSIGN(v, val) do { (v)->m_info = (void *) (val); } while (0) #else -#define VFS_TO_NNPFS(v) ((struct xfs *) ((v)->m_data)) +#define VFS_TO_NNPFS(v) ((struct nnpfs *) ((v)->m_data)) #define VFS_ASSIGN(v, val) do { (v)->m_data = (void *) (val); } while (0) #endif #else -#define VFS_TO_NNPFS(v) ((struct xfs *) ((v)->mnt_data)) +#define VFS_TO_NNPFS(v) ((struct nnpfs *) ((v)->mnt_data)) #define VFS_ASSIGN(v, val) do { (v)->mnt_data = (void *) (val); } while (0) #endif #define NNPFS_TO_VFS(x) ((x)->mp) @@ -75,25 +75,25 @@ struct xfs { #define NNPFS_FROM_VNODE(vp) VFS_TO_NNPFS((vp)->v_mount) #define NNPFS_FROM_XNODE(xp) NNPFS_FROM_VNODE(XNODE_TO_VNODE(xp)) -extern struct xfs xfs[]; +extern struct nnpfs nnpfs[]; -extern struct vnodeops xfs_vnodeops; +extern struct vnodeops nnpfs_vnodeops; -int new_xfs_node(struct xfs *, struct xfs_msg_node *, struct xfs_node **, +int new_nnpfs_node(struct nnpfs *, struct nnpfs_msg_node *, struct nnpfs_node **, d_thread_t *); -void free_xfs_node(struct xfs_node *); -int free_all_xfs_nodes(struct xfs *, int, int); +void free_nnpfs_node(struct nnpfs_node *); +int free_all_nnpfs_nodes(struct nnpfs *, int, int); -int xfs_dnlc_enter(struct vnode *, xfs_componentname *, struct vnode *); -int xfs_dnlc_enter_name(struct vnode *, const char *, struct vnode *); -void xfs_dnlc_purge_mp(struct mount *); -void xfs_dnlc_purge(struct vnode *); -int xfs_dnlc_lookup(struct vnode *, xfs_componentname *, struct vnode **); -int xfs_dnlc_lookup_name(struct vnode *, const char *, struct vnode **); +int nnpfs_dnlc_enter(struct vnode *, nnpfs_componentname *, struct vnode *); +int nnpfs_dnlc_enter_name(struct vnode *, const char *, struct vnode *); +void nnpfs_dnlc_purge_mp(struct mount *); +void nnpfs_dnlc_purge(struct vnode *); +int nnpfs_dnlc_lookup(struct vnode *, nnpfs_componentname *, struct vnode **); +int nnpfs_dnlc_lookup_name(struct vnode *, const char *, struct vnode **); -void vattr2xfs_attr(const struct vattr *, struct xfs_attr *); -void xfs_attr2vattr(const struct xfs_attr *, struct vattr *, int); +void vattr2nnpfs_attr(const struct vattr *, struct nnpfs_attr *); +void nnpfs_attr2vattr(const struct nnpfs_attr *, struct vattr *, int); -int xfs_has_pag(const struct xfs_node *, xfs_pag_t); +int nnpfs_has_pag(const struct nnpfs_node *, nnpfs_pag_t); -#endif /* _xfs_h */ +#endif /* _nnpfs_h */ diff --git a/sys/xfs/xfs_global.h b/sys/nnpfs/nnpfs_global.h index bc956bf40a1..bc956bf40a1 100644 --- a/sys/xfs/xfs_global.h +++ b/sys/nnpfs/nnpfs_global.h diff --git a/sys/xfs/xfs_locl.h b/sys/nnpfs/nnpfs_locl.h index d05d644a2e1..8107315235a 100644 --- a/sys/xfs/xfs_locl.h +++ b/sys/nnpfs/nnpfs_locl.h @@ -31,12 +31,12 @@ * SUCH DAMAGE. */ -/* $arla: xfs_locl.h,v 1.72 2003/02/15 16:40:00 lha Exp $ */ +/* $arla: nnpfs_locl.h,v 1.72 2003/02/15 16:40:00 lha Exp $ */ #ifdef HAVE_CONFIG_H #include <config.h> #else -#include <xfs/xfs_config.h> +#include <nnpfs/nnpfs_config.h> #endif #ifndef RCSID @@ -73,7 +73,7 @@ typedef unsigned int uint32_t; #define VT_AFS VT_ADDON #define MOUNT_NNPFS MOUNT_PC -typedef struct nameidata xfs_componentname; +typedef struct nameidata nnpfs_componentname; /* XXX this is gross, but makes the code considerably more readable */ #if 0 @@ -103,17 +103,17 @@ typedef struct nameidata xfs_componentname; should do a vrele here */ #define vput(VP) vrele(VP) -#define xfs_uio_to_proc(uiop) (u.u_procp) -#define xfs_cnp_to_proc(cnp) (u.u_procp) -#define xfs_proc_to_cred(p) ((p)->p_rcred) -#define xfs_proc_to_euid(p) ((p)->p_rcred->cr_uid) +#define nnpfs_uio_to_proc(uiop) (u.u_procp) +#define nnpfs_cnp_to_proc(cnp) (u.u_procp) +#define nnpfs_proc_to_cred(p) ((p)->p_rcred) +#define nnpfs_proc_to_euid(p) ((p)->p_rcred->cr_uid) -#define xfs_curproc() (u.u_procp) +#define nnpfs_curproc() (u.u_procp) -#define xfs_vop_read VOP_READ -#define xfs_vop_write VOP_WRITE -#define xfs_vop_getattr(t, attr, cred, proc, error) VOP_GETATTR((t), (attr), (cred), (error)) -#define xfs_vop_access(dvp, mode, cred, proc, error) VOP_ACCESS((dvp), (mode), (cred), (error)) +#define nnpfs_vop_read VOP_READ +#define nnpfs_vop_write VOP_WRITE +#define nnpfs_vop_getattr(t, attr, cred, proc, error) VOP_GETATTR((t), (attr), (cred), (error)) +#define nnpfs_vop_access(dvp, mode, cred, proc, error) VOP_ACCESS((dvp), (mode), (cred), (error)) struct vop_generic_args; @@ -121,7 +121,7 @@ typedef u_long va_size_t; #else /* !__osf__ */ -typedef struct componentname xfs_componentname; +typedef struct componentname nnpfs_componentname; #include <sys/types.h> #include <sys/param.h> @@ -216,10 +216,10 @@ void cache_enter(struct vnode *, struct vnode *, struct componentname *); void cache_purgevfs(struct mount *); #endif -#define xfs_vop_read(t, uio, ioflag, cred, error) (error) = VOP_READ((t), (uio), (ioflag), (cred)) -#define xfs_vop_write(t, uio, ioflag, cred, error) (error) = VOP_WRITE((t), (uio), (ioflag), (cred)) -#define xfs_vop_getattr(t, attr, cred, proc, error) (error) = VOP_GETATTR((t), (attr), (cred), (proc)) -#define xfs_vop_access(dvp, mode, cred, proc, error) (error) = VOP_ACCESS((dvp), (mode), (cred), (proc)) +#define nnpfs_vop_read(t, uio, ioflag, cred, error) (error) = VOP_READ((t), (uio), (ioflag), (cred)) +#define nnpfs_vop_write(t, uio, ioflag, cred, error) (error) = VOP_WRITE((t), (uio), (ioflag), (cred)) +#define nnpfs_vop_getattr(t, attr, cred, proc, error) (error) = VOP_GETATTR((t), (attr), (cred), (proc)) +#define nnpfs_vop_access(dvp, mode, cred, proc, error) (error) = VOP_ACCESS((dvp), (mode), (cred), (proc)) typedef u_quad_t va_size_t; @@ -259,20 +259,20 @@ typedef struct proc d_thread_t; #include <miscfs/genfs/genfs.h> #include <miscfs/genfs/genfs_node.h> -struct genfs_ops xfs_genfsops; +struct genfs_ops nnpfs_genfsops; #endif #if defined(HAVE_FREEBSD_THREAD) -#define xfs_uio_to_thread(uiop) ((uiop)->uio_td) -#define xfs_cnp_to_thread(cnp) ((cnp)->cn_thread) -#define xfs_thread_to_cred(td) ((td)->td_proc->p_ucred) -#define xfs_thread_to_euid(td) ((td)->td_proc->p_ucred->cr_uid) +#define nnpfs_uio_to_thread(uiop) ((uiop)->uio_td) +#define nnpfs_cnp_to_thread(cnp) ((cnp)->cn_thread) +#define nnpfs_thread_to_cred(td) ((td)->td_proc->p_ucred) +#define nnpfs_thread_to_euid(td) ((td)->td_proc->p_ucred->cr_uid) #else -#define xfs_uio_to_proc(uiop) ((uiop)->uio_procp) -#define xfs_cnp_to_proc(cnp) ((cnp)->cn_proc) -#define xfs_proc_to_cred(p) ((p)->p_ucred) -#define xfs_proc_to_euid(p) ((p)->p_ucred->cr_uid) +#define nnpfs_uio_to_proc(uiop) ((uiop)->uio_procp) +#define nnpfs_cnp_to_proc(cnp) ((cnp)->cn_proc) +#define nnpfs_proc_to_cred(p) ((p)->p_ucred) +#define nnpfs_proc_to_euid(p) ((p)->p_ucred->cr_uid) #endif #if defined(__FreeBSD_version) && __FreeBSD_version >= 500043 @@ -280,37 +280,37 @@ extern const char *VT_AFS; #endif #if defined(__FreeBSD__) -typedef void * xfs_malloc_type; +typedef void * nnpfs_malloc_type; #elif defined(__NetBSD__) && __NetBSD_Version__ >= 106140000 /* 1.6N */ -typedef struct malloc_type * xfs_malloc_type; +typedef struct malloc_type * nnpfs_malloc_type; #else -typedef int xfs_malloc_type; +typedef int nnpfs_malloc_type; #endif #ifdef __APPLE__ -#define xfs_curproc() (current_proc()) +#define nnpfs_curproc() (current_proc()) #else #if defined(HAVE_FREEBSD_THREAD) -#define xfs_curthread() (curthread) +#define nnpfs_curthread() (curthread) #else -#define xfs_curproc() (curproc) +#define nnpfs_curproc() (curproc) #endif #endif #ifdef __osf__ -#define xfs_pushdirty(vp, cred, p) +#define nnpfs_pushdirty(vp, cred, p) #else -void xfs_pushdirty(struct vnode *, struct ucred *, d_thread_t *); +void nnpfs_pushdirty(struct vnode *, struct ucred *, d_thread_t *); #endif #if defined(HAVE_UINTPTR_T) /* c99 enviroment */ -#define xfs_uintptr_t uintptr_t +#define nnpfs_uintptr_t uintptr_t #else #if defined(_LP64) || defined(alpha) || defined(__alpha__) || defined(__sparc64__) || defined(__sparcv9__) -#define xfs_uintptr_t unsigned long long +#define nnpfs_uintptr_t unsigned long long #else /* !LP64 */ -#define xfs_uintptr_t unsigned long +#define nnpfs_uintptr_t unsigned long #endif /* LP64 */ #endif @@ -342,16 +342,16 @@ typedef int register_t; #endif #if defined(HAVE_DEF_STRUCT_SETGROUPS_ARGS) -#define xfs_setgroups_args setgroups_args +#define nnpfs_setgroups_args setgroups_args #elif defined(HAVE_DEF_STRUCT_SYS_SETGROUPS_ARGS) -#define xfs_setgroups_args sys_setgroups_args +#define nnpfs_setgroups_args sys_setgroups_args #elif __osf__ -struct xfs_setgroups_args { +struct nnpfs_setgroups_args { syscallarg(int) gidsetsize; syscallarg(gid_t) *gidset; }; #elif defined(__APPLE__) -struct xfs_setgroups_args{ +struct nnpfs_setgroups_args{ syscallarg(u_int) gidsetsize; syscallarg(gid_t) *gidset; }; @@ -361,25 +361,25 @@ struct xfs_setgroups_args{ #ifdef HAVE_KERNEL_VFS_GETVFS -#define xfs_vfs_getvfs vfs_getvfs +#define nnpfs_vfs_getvfs vfs_getvfs #else -#define xfs_vfs_getvfs getvfs +#define nnpfs_vfs_getvfs getvfs #endif #ifdef HAVE_FOUR_ARGUMENT_VFS_OBJECT_CREATE -#define xfs_vfs_object_create(vp,proc,ucred) vfs_object_create(vp,proc,ucred,TRUE) +#define nnpfs_vfs_object_create(vp,proc,ucred) vfs_object_create(vp,proc,ucred,TRUE) #else -#define xfs_vfs_object_create(vp,proc,ucred) vfs_object_create(vp,proc,ucred) +#define nnpfs_vfs_object_create(vp,proc,ucred) vfs_object_create(vp,proc,ucred) #endif #if defined(UVM) || (defined(__NetBSD__) && __NetBSD_Version__ >= 105280000) -#define xfs_set_vp_size(vp, sz) uvm_vnp_setsize(vp, sz) +#define nnpfs_set_vp_size(vp, sz) uvm_vnp_setsize(vp, sz) #elif HAVE_KERNEL_VNODE_PAGER_SETSIZE -#define xfs_set_vp_size(vp, sz) vnode_pager_setsize(vp, sz) +#define nnpfs_set_vp_size(vp, sz) vnode_pager_setsize(vp, sz) #elif defined(__APPLE__) -#define xfs_set_vp_size(vp, sz) ubc_setsize(vp, sz) +#define nnpfs_set_vp_size(vp, sz) ubc_setsize(vp, sz) #else -#define xfs_set_vp_size(vp, sz) +#define nnpfs_set_vp_size(vp, sz) #endif /* namei flag */ @@ -409,7 +409,7 @@ int vn_writechk (struct vnode *); int ubc_pushdirty (struct vnode *); #endif -#include <xfs/xfs_syscalls.h> +#include <nnpfs/nnpfs_syscalls.h> /* * The VOP table @@ -419,6 +419,6 @@ int ubc_pushdirty (struct vnode *); #define NNPFS_VOP_DEF(n) \ struct vop_##n##_args; \ - int xfs_##n(struct vop_##n##_args *); + int nnpfs_##n(struct vop_##n##_args *); -#include "xfs/xfs_vopdefs.h" +#include "nnpfs/nnpfs_vopdefs.h" diff --git a/sys/xfs/xfs_message.c b/sys/nnpfs/nnpfs_message.c index b17e04f8693..12f07ccdd5c 100644 --- a/sys/xfs/xfs_message.c +++ b/sys/nnpfs/nnpfs_message.c @@ -31,168 +31,168 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_msg_locl.h> -#include <xfs/xfs_syscalls.h> -#include <xfs/xfs_vfsops.h> -#include <xfs/xfs_vnodeops.h> -#include <xfs/xfs_dev.h> - -RCSID("$arla: xfs_message.c,v 1.84 2003/06/02 18:25:20 lha Exp $"); +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_msg_locl.h> +#include <nnpfs/nnpfs_syscalls.h> +#include <nnpfs/nnpfs_vfsops.h> +#include <nnpfs/nnpfs_vnodeops.h> +#include <nnpfs/nnpfs_dev.h> + +RCSID("$arla: nnpfs_message.c,v 1.84 2003/06/02 18:25:20 lha Exp $"); static void -send_inactive_node(int fd, xfs_handle *handle) +send_inactive_node(int fd, nnpfs_handle *handle) { - struct xfs_message_inactivenode msg; + struct nnpfs_message_inactivenode msg; msg.header.opcode = NNPFS_MSG_INACTIVENODE; msg.handle = *handle; msg.flag = NNPFS_NOREFS | NNPFS_DELETE; - xfs_message_send(fd, &msg.header, sizeof(msg)); + nnpfs_message_send(fd, &msg.header, sizeof(msg)); } int -xfs_message_installroot(int fd, - struct xfs_message_installroot * message, +nnpfs_message_installroot(int fd, + struct nnpfs_message_installroot * message, u_int size, d_thread_t *p) { int error = 0; - NNPFSDEB(XDEBMSG, ("xfs_message_installroot (%d,%d,%d,%d)\n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_installroot (%d,%d,%d,%d)\n", message->node.handle.a, message->node.handle.b, message->node.handle.c, message->node.handle.d)); - if (xfs[fd].root != NULL) { - printf("NNPFS PANIC WARNING! xfs_message_installroot: called again!\n"); + if (nnpfs[fd].root != NULL) { + printf("NNPFS PANIC WARNING! nnpfs_message_installroot: called again!\n"); error = EBUSY; } else { - error = new_xfs_node(&xfs[fd], &message->node, &xfs[fd].root, p); + error = new_nnpfs_node(&nnpfs[fd], &message->node, &nnpfs[fd].root, p); if (error) return error; - NNPFS_MAKE_VROOT(xfs[fd].root->vn); + NNPFS_MAKE_VROOT(nnpfs[fd].root->vn); } return error; } int -xfs_message_installnode(int fd, - struct xfs_message_installnode * message, +nnpfs_message_installnode(int fd, + struct nnpfs_message_installnode * message, u_int size, d_thread_t *p) { int error = 0; - struct xfs_node *n, *dp; + struct nnpfs_node *n, *dp; - NNPFSDEB(XDEBMSG, ("xfs_message_installnode (%d,%d,%d,%d)\n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_installnode (%d,%d,%d,%d)\n", message->node.handle.a, message->node.handle.b, message->node.handle.c, message->node.handle.d)); retry: - dp = xfs_node_find(&xfs[fd].nodehead, &message->parent_handle); + dp = nnpfs_node_find(&nnpfs[fd].nodehead, &message->parent_handle); if (dp) { struct vnode *t_vnode = XNODE_TO_VNODE(dp); - NNPFSDEB(XDEBMSG, ("xfs_message_installnode: t_vnode = %lx\n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_installnode: t_vnode = %lx\n", (unsigned long)t_vnode)); - if (xfs_do_vget(t_vnode, 0 /* LK_SHARED */, p)) + if (nnpfs_do_vget(t_vnode, 0 /* LK_SHARED */, p)) goto retry; - error = new_xfs_node(&xfs[fd], &message->node, &n, p); + error = new_nnpfs_node(&nnpfs[fd], &message->node, &n, p); if (error) { vrele (t_vnode); return error; } - xfs_dnlc_enter_name(t_vnode, + nnpfs_dnlc_enter_name(t_vnode, message->name, XNODE_TO_VNODE(n)); vrele (XNODE_TO_VNODE(n)); vrele (t_vnode); } else { - printf("NNPFS PANIC WARNING! xfs_message_installnode: no parent\n"); + printf("NNPFS PANIC WARNING! nnpfs_message_installnode: no parent\n"); error = ENOENT; } - NNPFSDEB(XDEBMSG, ("return: xfs_message_installnode: %d\n", error)); + NNPFSDEB(XDEBMSG, ("return: nnpfs_message_installnode: %d\n", error)); return error; } int -xfs_message_installattr(int fd, - struct xfs_message_installattr * message, +nnpfs_message_installattr(int fd, + struct nnpfs_message_installattr * message, u_int size, d_thread_t *p) { int error = 0; - struct xfs_node *t; + struct nnpfs_node *t; - NNPFSDEB(XDEBMSG, ("xfs_message_installattr (%d,%d,%d,%d) \n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_installattr (%d,%d,%d,%d) \n", message->node.handle.a, message->node.handle.b, message->node.handle.c, message->node.handle.d)); - t = xfs_node_find(&xfs[fd].nodehead, &message->node.handle); + t = nnpfs_node_find(&nnpfs[fd].nodehead, &message->node.handle); if (t != 0) { t->tokens = message->node.tokens; if ((t->tokens & NNPFS_DATA_MASK) && DATA_FROM_XNODE(t) == NULL) { - printf ("xfs_message_installattr: tokens and no data\n"); + printf ("nnpfs_message_installattr: tokens and no data\n"); t->tokens &= ~NNPFS_DATA_MASK; } - xfs_attr2vattr(&message->node.attr, &t->attr, 0); + nnpfs_attr2vattr(&message->node.attr, &t->attr, 0); if ((t->flags & NNPFS_VMOPEN) == 0) - xfs_set_vp_size(XNODE_TO_VNODE(t), t->attr.va_size); + nnpfs_set_vp_size(XNODE_TO_VNODE(t), t->attr.va_size); bcopy(message->node.id, t->id, sizeof(t->id)); bcopy(message->node.rights, t->rights, sizeof(t->rights)); t->anonrights = message->node.anonrights; } else { - NNPFSDEB(XDEBMSG, ("xfs_message_installattr: no such node\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_installattr: no such node\n")); } return error; } int -xfs_message_installdata(int fd, - struct xfs_message_installdata * message, +nnpfs_message_installdata(int fd, + struct nnpfs_message_installdata * message, u_int size, d_thread_t *p) { - struct xfs_node *t; + struct nnpfs_node *t; int error = 0; - NNPFSDEB(XDEBMSG, ("xfs_message_installdata (%d,%d,%d,%d)\n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_installdata (%d,%d,%d,%d)\n", message->node.handle.a, message->node.handle.b, message->node.handle.c, message->node.handle.d)); retry: - t = xfs_node_find(&xfs[fd].nodehead, &message->node.handle); + t = nnpfs_node_find(&nnpfs[fd].nodehead, &message->node.handle); if (t != NULL) { - struct xfs_fhandle_t *fh = - (struct xfs_fhandle_t *)&message->cache_handle; + struct nnpfs_fhandle_t *fh = + (struct nnpfs_fhandle_t *)&message->cache_handle; struct vnode *t_vnode = XNODE_TO_VNODE(t); struct vnode *vp; message->cache_name[sizeof(message->cache_name)-1] = '\0'; NNPFSDEB(XDEBMSG, ("cache_name = '%s'\n", message->cache_name)); - if (xfs_do_vget(t_vnode, 0 /* LK_SHARED */, p)) + if (nnpfs_do_vget(t_vnode, 0 /* LK_SHARED */, p)) goto retry; if (message->flag & NNPFS_ID_HANDLE_VALID) { - error = xfs_fhlookup (p, fh, &vp); + error = nnpfs_fhlookup (p, fh, &vp); } else { error = EINVAL; } @@ -205,7 +205,7 @@ retry: #endif NNPFSDEB(XDEBMSG, - ("xfs_message_installdata: fhlookup failed: %d, " + ("nnpfs_message_installdata: fhlookup failed: %d, " "opening by name\n", error)); NDINIT(ndp, LOOKUP, FOLLOW | NNPFS_LOCKLEAF, UIO_SYSSPACE, @@ -216,23 +216,23 @@ retry: if (error == 0) { #ifndef __osf__ - xfs_vfs_unlock(vp, p); + nnpfs_vfs_unlock(vp, p); #endif if (DATA_FROM_XNODE(t)) vrele(DATA_FROM_XNODE(t)); DATA_FROM_XNODE(t) = vp; - NNPFSDEB(XDEBMSG, ("xfs_message_installdata: t = %lx;" + NNPFSDEB(XDEBMSG, ("nnpfs_message_installdata: t = %lx;" " tokens = %x\n", (unsigned long)t, message->node.tokens)); t->tokens = message->node.tokens; - xfs_attr2vattr(&message->node.attr, &t->attr, 1); + nnpfs_attr2vattr(&message->node.attr, &t->attr, 1); if ((t->flags & NNPFS_VMOPEN) == 0) - xfs_set_vp_size(XNODE_TO_VNODE(t), t->attr.va_size); + nnpfs_set_vp_size(XNODE_TO_VNODE(t), t->attr.va_size); if (XNODE_TO_VNODE(t)->v_type == VDIR && (message->flag & NNPFS_ID_INVALID_DNLC)) - xfs_dnlc_purge (XNODE_TO_VNODE(t)); + nnpfs_dnlc_purge (XNODE_TO_VNODE(t)); bcopy(message->node.id, t->id, sizeof(t->id)); bcopy(message->node.rights, t->rights, sizeof(t->rights)); t->anonrights = message->node.anonrights; @@ -242,13 +242,13 @@ retry: t->flags |= NNPFS_AFSDIR; #endif } else { - printf("NNPFS PANIC WARNING! xfs_message_installdata failed!\n"); + printf("NNPFS PANIC WARNING! nnpfs_message_installdata failed!\n"); printf("Reason: lookup failed on cache file '%s', error = %d\n", message->cache_name, error); } vrele (t_vnode); } else { - printf("NNPFS PANIC WARNING! xfs_message_installdata failed\n"); + printf("NNPFS PANIC WARNING! nnpfs_message_installdata failed\n"); printf("Reason: No node to install the data into!\n"); error = ENOENT; } @@ -257,21 +257,21 @@ retry: } #ifdef __osf__ -#define xfs_writecount v_wrcnt +#define nnpfs_writecount v_wrcnt #else -#define xfs_writecount v_writecount +#define nnpfs_writecount v_writecount #endif int -xfs_message_invalidnode(int fd, - struct xfs_message_invalidnode * message, +nnpfs_message_invalidnode(int fd, + struct nnpfs_message_invalidnode * message, u_int size, d_thread_t *p) { int error = 0; - struct xfs_node *t; + struct nnpfs_node *t; - NNPFSDEB(XDEBMSG, ("xfs_message_invalidnode (%d,%d,%d,%d)\n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_invalidnode (%d,%d,%d,%d)\n", message->handle.a, message->handle.b, message->handle.c, @@ -280,12 +280,12 @@ xfs_message_invalidnode(int fd, #ifdef __APPLE__ retry: #endif - t = xfs_node_find(&xfs[fd].nodehead, &message->handle); + t = nnpfs_node_find(&nnpfs[fd].nodehead, &message->handle); if (t != 0) { struct vnode *vp = XNODE_TO_VNODE(t); /* If open for writing, return immediately. Last close:er wins! */ - if (vp->v_usecount >= 0 && vp->xfs_writecount >= 1) + if (vp->v_usecount >= 0 && vp->nnpfs_writecount >= 1) return 0; #ifdef __FreeBSD__ @@ -332,17 +332,17 @@ xfs_message_invalidnode(int fd, NNPFS_DATA_MASK | NNPFS_LOCK_MASK); /* Dir changed, must invalidate DNLC. */ if (vp->v_type == VDIR) - xfs_dnlc_purge(vp); + nnpfs_dnlc_purge(vp); if (vp->v_usecount == 0) { #ifndef __osf__ - NNPFSDEB(XDEBVNOPS, ("xfs_message_invalidnode: vrecycle\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_message_invalidnode: vrecycle\n")); vrecycle(vp, p); #else /* XXX */ #endif /* __osf__ */ } } else { - NNPFSDEB(XDEBMSG, ("xfs_message_invalidnode: no such node\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_invalidnode: no such node\n")); send_inactive_node(fd, &message->handle); error = ENOENT; } @@ -351,14 +351,14 @@ xfs_message_invalidnode(int fd, } int -xfs_message_updatefid(int fd, - struct xfs_message_updatefid * message, +nnpfs_message_updatefid(int fd, + struct nnpfs_message_updatefid * message, u_int size, d_thread_t *p) { int error = 0; - NNPFSDEB(XDEBMSG, ("xfs_message_updatefid (%d,%d,%d,%d) (%d,%d,%d,%d)\n", + NNPFSDEB(XDEBMSG, ("nnpfs_message_updatefid (%d,%d,%d,%d) (%d,%d,%d,%d)\n", message->old_handle.a, message->old_handle.b, message->old_handle.c, @@ -368,11 +368,11 @@ xfs_message_updatefid(int fd, message->new_handle.c, message->new_handle.d)); - error = xfs_update_handle(&xfs[fd].nodehead, + error = nnpfs_update_handle(&nnpfs[fd].nodehead, &message->old_handle, &message->new_handle); if (error) - printf ("NNPFS PANIC WARNING! xfs_message_updatefid: %d\n", error); + printf ("NNPFS PANIC WARNING! nnpfs_message_updatefid: %d\n", error); return error; } @@ -395,11 +395,11 @@ gc_vnode (struct vnode *vp, panic("vrele: ref cnt"); } - NNPFSDEB(XDEBMSG, ("xfs_message_gc: success\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_gc: success\n")); vgone(vp, VX_NOSLEEP, NULL); } else { - NNPFSDEB(XDEBMSG, ("xfs_message_gc: used\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_gc: used\n")); } } @@ -450,7 +450,7 @@ gc_vnode (struct vnode *vp, } #endif /* DIAGNOSTIC */ - NNPFSDEB(XDEBMSG, ("xfs_message_gc: success\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_gc: success\n")); #ifdef HAVE_KERNEL_VGONEL vgonel (vp, p); @@ -469,7 +469,7 @@ gc_vnode (struct vnode *vp, #else simple_unlock(&vp->v_interlock); #endif - NNPFSDEB(XDEBMSG, ("xfs_message_gc: used\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_gc: used\n")); } } @@ -477,22 +477,22 @@ gc_vnode (struct vnode *vp, #endif int -xfs_message_gc_nodes(int fd, - struct xfs_message_gc_nodes *message, +nnpfs_message_gc_nodes(int fd, + struct nnpfs_message_gc_nodes *message, u_int size, d_thread_t *p) { - struct xfs_node *node; + struct nnpfs_node *node; int i; - NNPFSDEB(XDEBMSG, ("xfs_message_gc\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_gc\n")); for (i = 0; i < message->len; i++) { - node = xfs_node_find (&xfs[fd].nodehead, &message->handle[i]); + node = nnpfs_node_find (&nnpfs[fd].nodehead, &message->handle[i]); if (node) gc_vnode(XNODE_TO_VNODE(node), p); else { - NNPFSDEB(XDEBMSG, ("xfs_message_gc_nodes: no such node\n")); + NNPFSDEB(XDEBMSG, ("nnpfs_message_gc_nodes: no such node\n")); send_inactive_node(fd, &message->handle[i]); } } @@ -502,16 +502,16 @@ xfs_message_gc_nodes(int fd, /* - * Probe what version of xfs this support + * Probe what version of nnpfs this support */ int -xfs_message_version(int fd, - struct xfs_message_version *message, +nnpfs_message_version(int fd, + struct nnpfs_message_version *message, u_int size, d_thread_t *p) { - struct xfs_message_wakeup msg; + struct nnpfs_message_wakeup msg; int ret; ret = NNPFS_VERSION; @@ -520,6 +520,6 @@ xfs_message_version(int fd, msg.sleepers_sequence_num = message->header.sequence_num; msg.error = ret; - return xfs_message_send(fd, - (struct xfs_message_header *) &msg, sizeof(msg)); + return nnpfs_message_send(fd, + (struct nnpfs_message_header *) &msg, sizeof(msg)); } diff --git a/sys/xfs/xfs_message.h b/sys/nnpfs/nnpfs_message.h index 5a3a559042b..e07d92bd277 100644 --- a/sys/xfs/xfs_message.h +++ b/sys/nnpfs/nnpfs_message.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $arla: xfs_message.h,v 1.55 2002/09/27 09:43:21 lha Exp $ */ +/* $arla: nnpfs_message.h,v 1.55 2002/09/27 09:43:21 lha Exp $ */ #ifndef _xmsg_h #define _xmsg_h @@ -40,23 +40,23 @@ #define NNPFS_VERSION 18 -#include <xfs/xfs_attr.h> +#include <nnpfs/nnpfs_attr.h> /* Temporary hack? */ #define MAX_XMSG_SIZE (1024*64) -typedef uint32_t xfs_pag_t; +typedef uint32_t nnpfs_pag_t; /* - * The xfs_cred, if pag == 0, use uid + * The nnpfs_cred, if pag == 0, use uid */ -typedef struct xfs_cred { +typedef struct nnpfs_cred { uint32_t uid; - xfs_pag_t pag; -} xfs_cred; + nnpfs_pag_t pag; +} nnpfs_cred; -typedef uint32_t xfs_locktype_t; -typedef uint32_t xfs_lockid_t; +typedef uint32_t nnpfs_locktype_t; +typedef uint32_t nnpfs_lockid_t; #define MAXHANDLE (4*4) @@ -64,11 +64,11 @@ typedef uint32_t xfs_lockid_t; #define NNPFS_ANONYMOUSID 32766 -typedef struct xfs_handle { +typedef struct nnpfs_handle { uint32_t a, b, c, d; -} xfs_handle; +} nnpfs_handle; -#define xfs_handle_eq(p, q) \ +#define nnpfs_handle_eq(p, q) \ ((p)->a == (q)->a && (p)->b == (q)->b && (p)->c == (q)->c && (p)->d == (q)->d) /* @@ -77,9 +77,9 @@ typedef struct xfs_handle { #define CACHEHANDLESIZE 80 -typedef struct xfs_cache_handle { +typedef struct nnpfs_cache_handle { u_char data[CACHEHANDLESIZE]; -} xfs_cache_handle; +} nnpfs_cache_handle; /* * Tokens that apply to nodes, open modes and attributes. Shared @@ -108,8 +108,8 @@ typedef struct xfs_cache_handle { #define NNPFS_ATTR_VALID NNPFS_ATTR_R #define NNPFS_DATA_VALID NNPFS_DATA_W -/* xfs_node.flags - * The lower 16 bit flags are reserved for common xfs flags +/* nnpfs_node.flags + * The lower 16 bit flags are reserved for common nnpfs flags * The upper 16 bit flags are reserved for operating system dependent * flags. */ @@ -138,17 +138,17 @@ typedef struct xfs_cache_handle { #define NNPFS_RIGHT_W 0x02 /* may write? */ #define NNPFS_RIGHT_X 0x04 /* may execute? */ -/* Max name length passed in xfs messages */ +/* Max name length passed in nnpfs messages */ #define NNPFS_MAX_NAME 256 #define NNPFS_MAX_SYMLINK_CONTENT 2048 -struct xfs_msg_node { - xfs_handle handle; +struct nnpfs_msg_node { + nnpfs_handle handle; uint32_t tokens; uint32_t pad1; - struct xfs_attr attr; - xfs_pag_t id[MAXRIGHTS]; + struct nnpfs_attr attr; + nnpfs_pag_t id[MAXRIGHTS]; u_char rights[MAXRIGHTS]; u_char anonrights; uint16_t pad2; @@ -156,9 +156,9 @@ struct xfs_msg_node { }; /* - * Messages passed through the xfs_dev. + * Messages passed through the nnpfs_dev. */ -struct xfs_message_header { +struct nnpfs_message_header { uint32_t size; uint32_t opcode; uint32_t sequence_num; /* Private */ @@ -236,64 +236,64 @@ enum { NNPFS_ID_INVALID_DNLC = 0x01, NNPFS_ID_AFSDIR = 0x02, #define NNPFS_MSG_COUNT 27 /* NNPFS_MESSAGE_VERSION */ -struct xfs_message_version { - struct xfs_message_header header; +struct nnpfs_message_version { + struct nnpfs_message_header header; uint32_t ret; }; /* NNPFS_MESSAGE_WAKEUP */ -struct xfs_message_wakeup { - struct xfs_message_header header; +struct nnpfs_message_wakeup { + struct nnpfs_message_header header; uint32_t sleepers_sequence_num; /* Where to send wakeup */ uint32_t error; /* Return value */ }; /* NNPFS_MESSAGE_GETROOT */ -struct xfs_message_getroot { - struct xfs_message_header header; - struct xfs_cred cred; +struct nnpfs_message_getroot { + struct nnpfs_message_header header; + struct nnpfs_cred cred; }; /* NNPFS_MESSAGE_INSTALLROOT */ -struct xfs_message_installroot { - struct xfs_message_header header; - struct xfs_msg_node node; +struct nnpfs_message_installroot { + struct nnpfs_message_header header; + struct nnpfs_msg_node node; }; /* NNPFS_MESSAGE_GETNODE */ -struct xfs_message_getnode { - struct xfs_message_header header; - struct xfs_cred cred; - xfs_handle parent_handle; +struct nnpfs_message_getnode { + struct nnpfs_message_header header; + struct nnpfs_cred cred; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; }; /* NNPFS_MESSAGE_INSTALLNODE */ -struct xfs_message_installnode { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_installnode { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; - struct xfs_msg_node node; + struct nnpfs_msg_node node; }; /* NNPFS_MESSAGE_GETATTR */ -struct xfs_message_getattr { - struct xfs_message_header header; - struct xfs_cred cred; - xfs_handle handle; +struct nnpfs_message_getattr { + struct nnpfs_message_header header; + struct nnpfs_cred cred; + nnpfs_handle handle; }; /* NNPFS_MESSAGE_INSTALLATTR */ -struct xfs_message_installattr { - struct xfs_message_header header; - struct xfs_msg_node node; +struct nnpfs_message_installattr { + struct nnpfs_message_header header; + struct nnpfs_msg_node node; }; /* NNPFS_MESSAGE_GETDATA */ -struct xfs_message_getdata { - struct xfs_message_header header; - struct xfs_cred cred; - xfs_handle handle; +struct nnpfs_message_getdata { + struct nnpfs_message_header header; + struct nnpfs_cred cred; + nnpfs_handle handle; uint32_t tokens; uint32_t pad1; uint32_t offset; @@ -301,11 +301,11 @@ struct xfs_message_getdata { }; /* NNPFS_MESSAGE_INSTALLDATA */ -struct xfs_message_installdata { - struct xfs_message_header header; - struct xfs_msg_node node; +struct nnpfs_message_installdata { + struct nnpfs_message_header header; + struct nnpfs_msg_node node; char cache_name[NNPFS_MAX_NAME]; - struct xfs_cache_handle cache_handle; + struct nnpfs_cache_handle cache_handle; uint32_t flag; uint32_t pad1; uint32_t offset; @@ -313,129 +313,129 @@ struct xfs_message_installdata { }; /* NNPFS_MSG_INACTIVENODE */ -struct xfs_message_inactivenode { - struct xfs_message_header header; - xfs_handle handle; +struct nnpfs_message_inactivenode { + struct nnpfs_message_header header; + nnpfs_handle handle; uint32_t flag; uint32_t pad1; }; /* NNPFS_MSG_INVALIDNODE */ -struct xfs_message_invalidnode { - struct xfs_message_header header; - xfs_handle handle; +struct nnpfs_message_invalidnode { + struct nnpfs_message_header header; + nnpfs_handle handle; }; /* NNPFS_MSG_OPEN */ -struct xfs_message_open { - struct xfs_message_header header; - struct xfs_cred cred; - xfs_handle handle; +struct nnpfs_message_open { + struct nnpfs_message_header header; + struct nnpfs_cred cred; + nnpfs_handle handle; uint32_t tokens; uint32_t pad1; }; /* NNPFS_MSG_PUTDATA */ -struct xfs_message_putdata { - struct xfs_message_header header; - xfs_handle handle; - struct xfs_attr attr; /* XXX ??? */ - struct xfs_cred cred; +struct nnpfs_message_putdata { + struct nnpfs_message_header header; + nnpfs_handle handle; + struct nnpfs_attr attr; /* XXX ??? */ + struct nnpfs_cred cred; uint32_t flag; uint32_t pad1; }; /* NNPFS_MSG_PUTATTR */ -struct xfs_message_putattr { - struct xfs_message_header header; - xfs_handle handle; - struct xfs_attr attr; - struct xfs_cred cred; +struct nnpfs_message_putattr { + struct nnpfs_message_header header; + nnpfs_handle handle; + struct nnpfs_attr attr; + struct nnpfs_cred cred; }; /* NNPFS_MSG_CREATE */ -struct xfs_message_create { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_create { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; - struct xfs_attr attr; + struct nnpfs_attr attr; uint32_t mode; uint32_t pad1; - struct xfs_cred cred; + struct nnpfs_cred cred; }; /* NNPFS_MSG_MKDIR */ -struct xfs_message_mkdir { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_mkdir { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; - struct xfs_attr attr; - struct xfs_cred cred; + struct nnpfs_attr attr; + struct nnpfs_cred cred; }; /* NNPFS_MSG_LINK */ -struct xfs_message_link { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_link { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; - xfs_handle from_handle; - struct xfs_cred cred; + nnpfs_handle from_handle; + struct nnpfs_cred cred; }; /* NNPFS_MSG_SYMLINK */ -struct xfs_message_symlink { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_symlink { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; char contents[NNPFS_MAX_SYMLINK_CONTENT]; - struct xfs_attr attr; - struct xfs_cred cred; + struct nnpfs_attr attr; + struct nnpfs_cred cred; }; /* NNPFS_MSG_REMOVE */ -struct xfs_message_remove { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_remove { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; - struct xfs_cred cred; + struct nnpfs_cred cred; }; /* NNPFS_MSG_RMDIR */ -struct xfs_message_rmdir { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_rmdir { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; char name[NNPFS_MAX_NAME]; - struct xfs_cred cred; + struct nnpfs_cred cred; }; /* NNPFS_MSG_RENAME */ -struct xfs_message_rename { - struct xfs_message_header header; - xfs_handle old_parent_handle; +struct nnpfs_message_rename { + struct nnpfs_message_header header; + nnpfs_handle old_parent_handle; char old_name[NNPFS_MAX_NAME]; - xfs_handle new_parent_handle; + nnpfs_handle new_parent_handle; char new_name[NNPFS_MAX_NAME]; - struct xfs_cred cred; + struct nnpfs_cred cred; }; #define NNPFS_MSG_MAX_DATASIZE 2048 /* NNPFS_MSG_PIOCTL */ -struct xfs_message_pioctl { - struct xfs_message_header header; +struct nnpfs_message_pioctl { + struct nnpfs_message_header header; uint32_t opcode ; uint32_t pad1; - xfs_cred cred; + nnpfs_cred cred; uint32_t insize; uint32_t outsize; char msg[NNPFS_MSG_MAX_DATASIZE]; - xfs_handle handle; + nnpfs_handle handle; }; /* NNPFS_MESSAGE_WAKEUP_DATA */ -struct xfs_message_wakeup_data { - struct xfs_message_header header; +struct nnpfs_message_wakeup_data { + struct nnpfs_message_header header; uint32_t sleepers_sequence_num; /* Where to send wakeup */ uint32_t error; /* Return value */ uint32_t len; @@ -444,48 +444,48 @@ struct xfs_message_wakeup_data { }; /* NNPFS_MESSAGE_UPDATEFID */ -struct xfs_message_updatefid { - struct xfs_message_header header; - xfs_handle old_handle; - xfs_handle new_handle; +struct nnpfs_message_updatefid { + struct nnpfs_message_header header; + nnpfs_handle old_handle; + nnpfs_handle new_handle; }; /* NNPFS_MESSAGE_ADVLOCK */ -struct xfs_message_advlock { - struct xfs_message_header header; - xfs_handle handle; - struct xfs_cred cred; - xfs_locktype_t locktype; +struct nnpfs_message_advlock { + struct nnpfs_message_header header; + nnpfs_handle handle; + struct nnpfs_cred cred; + nnpfs_locktype_t locktype; #define NNPFS_WR_LOCK 1 /* Write lock */ #define NNPFS_RD_LOCK 2 /* Read lock */ #define NNPFS_UN_LOCK 3 /* Unlock */ #define NNPFS_BR_LOCK 4 /* Break lock (inform that we don't want the lock) */ - xfs_lockid_t lockid; + nnpfs_lockid_t lockid; }; /* NNPFS_MESSAGE_GC_NODES */ -struct xfs_message_gc_nodes { - struct xfs_message_header header; +struct nnpfs_message_gc_nodes { + struct nnpfs_message_header header; #define NNPFS_GC_NODES_MAX_HANDLE 50 uint32_t len; uint32_t pad1; - xfs_handle handle[NNPFS_GC_NODES_MAX_HANDLE]; + nnpfs_handle handle[NNPFS_GC_NODES_MAX_HANDLE]; }; #if 0 -struct xfs_name { +struct nnpfs_name { u_int16_t name; char name[1]; }; #endif -struct xfs_message_bulkgetnode { - struct xfs_message_header header; - xfs_handle parent_handle; +struct nnpfs_message_bulkgetnode { + struct nnpfs_message_header header; + nnpfs_handle parent_handle; uint32_t flags; #define NNPFS_BGN_LAZY 0x1 uint32_t numnodes; - struct xfs_handle handles[1]; + struct nnpfs_handle handles[1]; }; #endif /* _xmsg_h */ diff --git a/sys/xfs/xfs_msg_locl.h b/sys/nnpfs/nnpfs_msg_locl.h index 8c80253c92f..d3be0f9548f 100644 --- a/sys/xfs/xfs_msg_locl.h +++ b/sys/nnpfs/nnpfs_msg_locl.h @@ -31,57 +31,57 @@ * SUCH DAMAGE. */ -/* $arla: xfs_msg_locl.h,v 1.6 2002/09/07 10:46:05 lha Exp $ */ +/* $arla: nnpfs_msg_locl.h,v 1.6 2002/09/07 10:46:05 lha Exp $ */ -#ifndef _xfs_msg_locl_h -#define _xfs_msg_locl_h +#ifndef _nnpfs_msg_locl_h +#define _nnpfs_msg_locl_h int -xfs_message_installroot(int fd, - struct xfs_message_installroot * message, +nnpfs_message_installroot(int fd, + struct nnpfs_message_installroot * message, u_int size, d_thread_t *p); int -xfs_message_installnode(int fd, - struct xfs_message_installnode * message, +nnpfs_message_installnode(int fd, + struct nnpfs_message_installnode * message, u_int size, d_thread_t *p); int -xfs_message_installattr(int fd, - struct xfs_message_installattr * message, +nnpfs_message_installattr(int fd, + struct nnpfs_message_installattr * message, u_int size, d_thread_t *p); int -xfs_message_installdata(int fd, - struct xfs_message_installdata * message, +nnpfs_message_installdata(int fd, + struct nnpfs_message_installdata * message, u_int size, d_thread_t *p); int -xfs_message_invalidnode(int fd, - struct xfs_message_invalidnode * message, +nnpfs_message_invalidnode(int fd, + struct nnpfs_message_invalidnode * message, u_int size, d_thread_t *p); int -xfs_message_updatefid(int fd, - struct xfs_message_updatefid * message, +nnpfs_message_updatefid(int fd, + struct nnpfs_message_updatefid * message, u_int size, d_thread_t *p); int -xfs_message_gc_nodes(int fd, - struct xfs_message_gc_nodes * message, +nnpfs_message_gc_nodes(int fd, + struct nnpfs_message_gc_nodes * message, u_int size, d_thread_t *p); int -xfs_message_version(int fd, - struct xfs_message_version *message, +nnpfs_message_version(int fd, + struct nnpfs_message_version *message, u_int size, d_thread_t *p); -#endif /* _xfs_msg_locl_h */ +#endif /* _nnpfs_msg_locl_h */ diff --git a/sys/xfs/xfs_node-bsd.c b/sys/nnpfs/nnpfs_node-bsd.c index 56e4f2d3638..1f6ace40860 100644 --- a/sys/xfs/xfs_node-bsd.c +++ b/sys/nnpfs/nnpfs_node-bsd.c @@ -32,15 +32,15 @@ */ #include <sys/queue.h> -#include <xfs/xfs_locl.h> -#include <xfs/xfs_common.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_vnodeops.h> +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_vnodeops.h> -RCSID("$arla: xfs_node-bsd.c,v 1.70 2003/02/28 02:01:06 lha Exp $"); +RCSID("$arla: nnpfs_node-bsd.c,v 1.70 2003/02/28 02:01:06 lha Exp $"); -extern vop_t **xfs_vnodeop_p; +extern vop_t **nnpfs_vnodeop_p; #ifndef LK_NOPAUSE #define LK_NOPAUSE 0 @@ -52,17 +52,17 @@ extern vop_t **xfs_vnodeop_p; */ int -xfs_getnewvnode(struct xfs *xfsp, struct vnode **vpp, - struct xfs_handle *handle) +nnpfs_getnewvnode(struct nnpfs *nnpfsp, struct vnode **vpp, + struct nnpfs_handle *handle) { - struct xfs_node *result, *check; + struct nnpfs_node *result, *check; int error; - error = getnewvnode(VT_XFS, NNPFS_TO_VFS(xfsp), xfs_vnodeop_p, vpp); + error = getnewvnode(VT_NNPFS, NNPFS_TO_VFS(nnpfsp), nnpfs_vnodeop_p, vpp); if (error) return error; - result = xfs_alloc(sizeof(*result), M_NNPFS_NODE); + result = nnpfs_alloc(sizeof(*result), M_NNPFS_NODE); bzero(result, sizeof(*result)); (*vpp)->v_data = result; @@ -73,7 +73,7 @@ xfs_getnewvnode(struct xfs *xfsp, struct vnode **vpp, result->tokens = 0; result->offset = 0; #if defined(HAVE_KERNEL_LOCKMGR) || defined(HAVE_KERNEL_DEBUGLOCKMGR) - lockinit (&result->lock, PVFS, "xfs_lock", 0, LK_NOPAUSE); + lockinit (&result->lock, PVFS, "nnpfs_lock", 0, LK_NOPAUSE); #else result->vnlocks = 0; #endif @@ -82,37 +82,37 @@ xfs_getnewvnode(struct xfs *xfsp, struct vnode **vpp, result->wr_cred = NULL; #if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105280000 - genfs_node_init(*vpp, &xfs_genfsops); + genfs_node_init(*vpp, &nnpfs_genfsops); #endif - check = xfs_node_find(&xfsp->nodehead, handle); + check = nnpfs_node_find(&nnpfsp->nodehead, handle); if (check) { vput(*vpp); *vpp = result->vn; return 0; } - xfs_insert(&xfs->nodehead, result); + nnpfs_insert(&nnpfs->nodehead, result); return 0; } /* - * Create a new xfs_node and make a vget + * Create a new nnpfs_node and make a vget * * Also prevents creation of duplicates. This happens * whenever there are more than one name to a file, * "." and ".." are common cases. */ int -new_xfs_node(struct xfs *xfsp, - struct xfs_msg_node *node, - struct xfs_node **xpp, +new_nnpfs_node(struct nnpfs *nnpfsp, + struct nnpfs_msg_node *node, + struct nnpfs_node **xpp, d_thread_t *p) { - struct xfs_node *result; + struct nnpfs_node *result; - NNPFSDEB(XDEBNODE, ("new_xfs_node (%d,%d,%d,%d)\n", + NNPFSDEB(XDEBNODE, ("new_nnpfs_node (%d,%d,%d,%d)\n", node->handle.a, node->handle.b, node->handle.c, @@ -120,27 +120,27 @@ new_xfs_node(struct xfs *xfsp, retry: /* Does not allow duplicates */ - result = xfs_node_find(&xfsp->nodehead, &node->handle); + result = nnpfs_node_find(&nnpfsp->nodehead, &node->handle); if (result == 0) { int error; struct vnode *v; - error = xfs_getnewvnode(xfsp, &v, &node->handle); + error = nnpfs_getnewvnode(nnpfsp, &v, &node->handle); if (error) return error; result = VNODE_TO_XNODE(v); result->anonrights = node->anonrights; - xfsp->nnodes++; + nnpfsp->nnodes++; } else { /* Node is already cached */ - if(xfs_do_vget(XNODE_TO_VNODE(result), 0, p)) + if(nnpfs_do_vget(XNODE_TO_VNODE(result), 0, p)) goto retry; } /* Init other fields */ - xfs_attr2vattr(&node->attr, &result->attr, 1); + nnpfs_attr2vattr(&node->attr, &result->attr, 1); result->vn->v_type = result->attr.va_type; result->tokens = node->tokens; bcopy(node->id, result->id, sizeof(result->id)); @@ -152,16 +152,16 @@ retry: #endif *xpp = result; - NNPFSDEB(XDEBNODE, ("return: new_xfs_node\n")); + NNPFSDEB(XDEBNODE, ("return: new_nnpfs_node\n")); return 0; } void -free_xfs_node(struct xfs_node *node) +free_nnpfs_node(struct nnpfs_node *node) { - struct xfs *xfsp = NNPFS_FROM_XNODE(node); + struct nnpfs *nnpfsp = NNPFS_FROM_XNODE(node); - NNPFSDEB(XDEBNODE, ("free_xfs_node(%lx) (%d,%d,%d,%d)\n", + NNPFSDEB(XDEBNODE, ("free_nnpfs_node(%lx) (%d,%d,%d,%d)\n", (unsigned long)node, node->handle.a, node->handle.b, @@ -174,7 +174,7 @@ free_xfs_node(struct xfs_node *node) vrele(DATA_FROM_XNODE(node)); DATA_FROM_XNODE(node) = NULL; } - xfsp->nnodes--; + nnpfsp->nnodes--; XNODE_TO_VNODE(node)->v_data = NULL; if (node->rd_cred) { crfree (node->rd_cred); @@ -185,9 +185,9 @@ free_xfs_node(struct xfs_node *node) node->wr_cred = NULL; } - xfs_free(node, sizeof(*node), M_NNPFS_NODE); + nnpfs_free(node, sizeof(*node), M_NNPFS_NODE); - NNPFSDEB(XDEBNODE, ("free_xfs_node done\n")); + NNPFSDEB(XDEBNODE, ("free_nnpfs_node done\n")); } /* @@ -195,7 +195,7 @@ free_xfs_node(struct xfs_node *node) */ static int -xfs_vflush(struct mount *mp, int flags) +nnpfs_vflush(struct mount *mp, int flags) { #if __FreeBSD__ && __FreeBSD_version > 430000 return vflush(mp, 0, flags); @@ -205,29 +205,29 @@ xfs_vflush(struct mount *mp, int flags) } int -free_all_xfs_nodes(struct xfs *xfsp, int flags, int unmountp) +free_all_nnpfs_nodes(struct nnpfs *nnpfsp, int flags, int unmountp) { int error = 0; - struct mount *mp = NNPFS_TO_VFS(xfsp); + struct mount *mp = NNPFS_TO_VFS(nnpfsp); if (mp == NULL) { - NNPFSDEB(XDEBNODE, ("free_all_xfs_nodes already freed\n")); + NNPFSDEB(XDEBNODE, ("free_all_nnpfs_nodes already freed\n")); return 0; } - NNPFSDEB(XDEBNODE, ("free_all_xfs_nodes starting\n")); + NNPFSDEB(XDEBNODE, ("free_all_nnpfs_nodes starting\n")); - xfs_dnlc_purge_mp(mp); + nnpfs_dnlc_purge_mp(mp); - if (xfsp->root) { - NNPFSDEB(XDEBNODE, ("free_all_xfs_nodes now removing root\n")); + if (nnpfsp->root) { + NNPFSDEB(XDEBNODE, ("free_all_nnpfs_nodes now removing root\n")); - vgone(XNODE_TO_VNODE(xfsp->root)); - xfsp->root = NULL; + vgone(XNODE_TO_VNODE(nnpfsp->root)); + nnpfsp->root = NULL; } - NNPFSDEB(XDEBNODE, ("free_all_xfs_nodes root removed\n")); - NNPFSDEB(XDEBNODE, ("free_all_xfs_nodes now killing all remaining nodes\n")); + NNPFSDEB(XDEBNODE, ("free_all_nnpfs_nodes root removed\n")); + NNPFSDEB(XDEBNODE, ("free_all_nnpfs_nodes now killing all remaining nodes\n")); /* * If we have a syncer vnode, release it (to emulate dounmount) @@ -256,28 +256,28 @@ free_all_xfs_nodes(struct xfs *xfsp, int flags, int unmountp) } } #endif - error = xfs_vflush(mp, flags); + error = nnpfs_vflush(mp, flags); #ifdef HAVE_STRUCT_MOUNT_MNT_SYNCER if (!unmountp) { - NNPFSDEB(XDEBNODE, ("free_all_xfs_nodes not flushing syncer vnode\n")); + NNPFSDEB(XDEBNODE, ("free_all_nnpfs_nodes not flushing syncer vnode\n")); if (mp->mnt_syncer == NULL) if (vfs_allocate_syncvnode(mp)) - panic("failed to allocate syncer node when xfs daemon died"); + panic("failed to allocate syncer node when nnpfs daemon died"); } #endif if (error) { - NNPFSDEB(XDEBNODE, ("xfree_all_xfs_nodes: vflush() error == %d\n", + NNPFSDEB(XDEBNODE, ("xfree_all_nnpfs_nodes: vflush() error == %d\n", error)); return error; } - NNPFSDEB(XDEBNODE, ("free_all_xfs_nodes done\n")); + NNPFSDEB(XDEBNODE, ("free_all_nnpfs_nodes done\n")); return error; } void -vattr2xfs_attr(const struct vattr *va, struct xfs_attr *xa) +vattr2nnpfs_attr(const struct vattr *va, struct nnpfs_attr *xa) { bzero(xa, sizeof(*xa)); if (va->va_mode != (mode_t)VNOVAL) @@ -327,14 +327,14 @@ vattr2xfs_attr(const struct vattr *va, struct xfs_attr *xa) xa->xa_type = NNPFS_FILE_BAD; break; default: - panic("xfs_attr2attr: bad value"); + panic("nnpfs_attr2attr: bad value"); } } #define SET_TIMEVAL(X, S, N) do { (X)->tv_sec = (S); (X)->tv_nsec = (N); } while(0) void -xfs_attr2vattr(const struct xfs_attr *xa, struct vattr *va, int clear_node) +nnpfs_attr2vattr(const struct nnpfs_attr *xa, struct vattr *va, int clear_node) { if (clear_node) VATTR_NULL(va); @@ -392,7 +392,7 @@ xfs_attr2vattr(const struct xfs_attr *xa, struct vattr *va, int clear_node) va->va_type = VBAD; break; default: - panic("xfs_attr2vattr: bad value"); + panic("nnpfs_attr2vattr: bad value"); } } va->va_flags = 0; @@ -468,17 +468,17 @@ tbl_lookup (struct componentname *cnp, */ int -xfs_dnlc_enter(struct vnode *dvp, - xfs_componentname *cnp, +nnpfs_dnlc_enter(struct vnode *dvp, + nnpfs_componentname *cnp, struct vnode *vp) { - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_enter_cnp(%lx, %lx, %lx)\n", + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_enter_cnp(%lx, %lx, %lx)\n", (unsigned long)dvp, (unsigned long)cnp, (unsigned long)vp)); - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_enter: v_id = %lu\n", (u_long)dvp->v_id)); + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_enter: v_id = %lu\n", (u_long)dvp->v_id)); - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_enter: calling cache_enter:" + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_enter: calling cache_enter:" "dvp = %lx, vp = %lx, cnp = (%s, %ld), " "nameiop = %lu, flags = %lx\n", (unsigned long)dvp, @@ -509,13 +509,13 @@ xfs_dnlc_enter(struct vnode *dvp, #if __NetBSD_Version__ >= 104120000 || OpenBSD > 200211 if (cache_lookup(dvp, &dummy, cnp) != -1) { - xfs_vfs_unlock(dummy, xfs_cnp_to_proc(cnp)); - printf ("NNPFS PANIC WARNING! xfs_dnlc_enter: %s already in cache\n", + nnpfs_vfs_unlock(dummy, nnpfs_cnp_to_proc(cnp)); + printf ("NNPFS PANIC WARNING! nnpfs_dnlc_enter: %s already in cache\n", cnp->cn_nameptr); } #else if (cache_lookup(dvp, &dummy, cnp) != 0) { - printf ("NNPFS PANIC WARNING! xfs_dnlc_enter: %s already in cache\n", + printf ("NNPFS PANIC WARNING! nnpfs_dnlc_enter: %s already in cache\n", cnp->cn_nameptr); } #endif @@ -534,7 +534,7 @@ xfs_dnlc_enter(struct vnode *dvp, static void -xfs_cnp_init (struct componentname *cn, +nnpfs_cnp_init (struct componentname *cn, const char *name, d_thread_t *proc, struct ucred *cred, int nameiop) @@ -581,19 +581,19 @@ xfs_cnp_init (struct componentname *cn, */ int -xfs_dnlc_enter_name(struct vnode *dvp, +nnpfs_dnlc_enter_name(struct vnode *dvp, const char *name, struct vnode *vp) { struct componentname cn; - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_enter_name(%lx, \"%s\", %lx)\n", + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_enter_name(%lx, \"%s\", %lx)\n", (unsigned long)dvp, name, (unsigned long)vp)); - xfs_cnp_init (&cn, name, NULL, NULL, LOOKUP); - return xfs_dnlc_enter (dvp, &cn, vp); + nnpfs_cnp_init (&cn, name, NULL, NULL, LOOKUP); + return nnpfs_dnlc_enter (dvp, &cn, vp); } /* @@ -602,19 +602,19 @@ xfs_dnlc_enter_name(struct vnode *dvp, */ static int -xfs_dnlc_lookup_int(struct vnode *dvp, - xfs_componentname *cnp, +nnpfs_dnlc_lookup_int(struct vnode *dvp, + nnpfs_componentname *cnp, struct vnode **res) { int error; u_long saved_flags; - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_lookup(%lx, \"%s\")\n", + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_lookup(%lx, \"%s\")\n", (unsigned long)dvp, cnp->cn_nameptr)); - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_lookup: v_id = %lu\n", (u_long)dvp->v_id)); + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_lookup: v_id = %lu\n", (u_long)dvp->v_id)); - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_lookup: calling cache_lookup:" + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_lookup: calling cache_lookup:" "dvp = %lx, cnp = (%s, %ld), flags = %lx\n", (unsigned long)dvp, cnp->cn_nameptr, cnp->cn_namelen, @@ -627,7 +627,7 @@ xfs_dnlc_lookup_int(struct vnode *dvp, cnp->cn_flags = saved_flags; - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_lookup: cache_lookup returned. " + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_lookup: cache_lookup returned. " "error = %d, *res = %lx\n", error, (unsigned long)*res)); return error; @@ -642,8 +642,8 @@ xfs_dnlc_lookup_int(struct vnode *dvp, */ static int -xfs_dnlc_lock(struct vnode *dvp, - xfs_componentname *cnp, +nnpfs_dnlc_lock(struct vnode *dvp, + nnpfs_componentname *cnp, struct vnode **res) { int error = 0; @@ -658,13 +658,13 @@ xfs_dnlc_lock(struct vnode *dvp, u_long vpid = dvp->v_id; #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_unlock(dvp, xfs_cnp_to_thread(cnp)); - error = xfs_do_vget(*res, LK_EXCLUSIVE, xfs_cnp_to_thread(cnp)); - xfs_vfs_writelock(dvp, xfs_cnp_to_thread(cnp)); + nnpfs_vfs_unlock(dvp, nnpfs_cnp_to_thread(cnp)); + error = nnpfs_do_vget(*res, LK_EXCLUSIVE, nnpfs_cnp_to_thread(cnp)); + nnpfs_vfs_writelock(dvp, nnpfs_cnp_to_thread(cnp)); #else - xfs_vfs_unlock(dvp, xfs_cnp_to_proc(cnp)); - error = xfs_do_vget(*res, LK_EXCLUSIVE, xfs_cnp_to_proc(cnp)); - xfs_vfs_writelock(dvp, xfs_cnp_to_proc(cnp)); + nnpfs_vfs_unlock(dvp, nnpfs_cnp_to_proc(cnp)); + error = nnpfs_do_vget(*res, LK_EXCLUSIVE, nnpfs_cnp_to_proc(cnp)); + nnpfs_vfs_writelock(dvp, nnpfs_cnp_to_proc(cnp)); #endif if (error == 0 && dvp->v_id != vpid) { @@ -673,9 +673,9 @@ xfs_dnlc_lock(struct vnode *dvp, } } else { #ifdef HAVE_FREEBSD_THREAD - error = xfs_do_vget(*res, LK_EXCLUSIVE, xfs_cnp_to_thread(cnp)); + error = nnpfs_do_vget(*res, LK_EXCLUSIVE, nnpfs_cnp_to_thread(cnp)); #else - error = xfs_do_vget(*res, LK_EXCLUSIVE, xfs_cnp_to_proc(cnp)); + error = nnpfs_do_vget(*res, LK_EXCLUSIVE, nnpfs_cnp_to_proc(cnp)); #endif } @@ -699,11 +699,11 @@ xfs_dnlc_lock(struct vnode *dvp, #if __NetBSD_Version__ >= 104120000 || defined(__OpenBSD__) int -xfs_dnlc_lookup(struct vnode *dvp, - xfs_componentname *cnp, +nnpfs_dnlc_lookup(struct vnode *dvp, + nnpfs_componentname *cnp, struct vnode **res) { - int error = xfs_dnlc_lookup_int (dvp, cnp, res); + int error = nnpfs_dnlc_lookup_int (dvp, cnp, res); if (error == 0) return -1; @@ -715,17 +715,17 @@ xfs_dnlc_lookup(struct vnode *dvp, if (error != -1) return error; - return xfs_dnlc_lock (dvp, cnp, res); + return nnpfs_dnlc_lock (dvp, cnp, res); } #else /* ! __NetBSD_Version__ >= 104120000 && ! OpenBSD > 200211 */ int -xfs_dnlc_lookup(struct vnode *dvp, - xfs_componentname *cnp, +nnpfs_dnlc_lookup(struct vnode *dvp, + nnpfs_componentname *cnp, struct vnode **res) { - int error = xfs_dnlc_lookup_int (dvp, cnp, res); + int error = nnpfs_dnlc_lookup_int (dvp, cnp, res); if (error == 0) error = tbl_lookup (cnp, dvp, res); @@ -733,7 +733,7 @@ xfs_dnlc_lookup(struct vnode *dvp, if (error != -1) return error; - return xfs_dnlc_lock (dvp, cnp, res); + return nnpfs_dnlc_lock (dvp, cnp, res); } #endif /* __NetBSD_Version__ >= 104120000 || OpenBSD > 200211 */ @@ -743,9 +743,9 @@ xfs_dnlc_lookup(struct vnode *dvp, */ void -xfs_dnlc_purge (struct vnode *vp) +nnpfs_dnlc_purge (struct vnode *vp) { - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_purge\n")); + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_purge\n")); if (tbl.dvp == vp || tbl.vp == vp) tbl_clear (); @@ -758,9 +758,9 @@ xfs_dnlc_purge (struct vnode *vp) */ void -xfs_dnlc_purge_mp(struct mount *mp) +nnpfs_dnlc_purge_mp(struct mount *mp) { - NNPFSDEB(XDEBDNLC, ("xfs_dnlc_purge_mp()\n")); + NNPFSDEB(XDEBDNLC, ("nnpfs_dnlc_purge_mp()\n")); tbl_clear (); cache_purgevfs(mp); @@ -771,7 +771,7 @@ xfs_dnlc_purge_mp(struct mount *mp) */ int -xfs_has_pag(const struct xfs_node *xn, xfs_pag_t pag) +nnpfs_has_pag(const struct nnpfs_node *xn, nnpfs_pag_t pag) { int i; @@ -783,7 +783,7 @@ xfs_has_pag(const struct xfs_node *xn, xfs_pag_t pag) } void -xfs_update_write_cred(struct xfs_node *xn, struct ucred *cred) +nnpfs_update_write_cred(struct nnpfs_node *xn, struct ucred *cred) { if (xn->wr_cred) crfree (xn->wr_cred); @@ -792,7 +792,7 @@ xfs_update_write_cred(struct xfs_node *xn, struct ucred *cred) } void -xfs_update_read_cred(struct xfs_node *xn, struct ucred *cred) +nnpfs_update_read_cred(struct nnpfs_node *xn, struct ucred *cred) { if (xn->rd_cred) crfree (xn->rd_cred); diff --git a/sys/xfs/xfs_node.c b/sys/nnpfs/nnpfs_node.c index 87a1726d39c..805a6a46e9b 100644 --- a/sys/xfs/xfs_node.c +++ b/sys/nnpfs/nnpfs_node.c @@ -31,17 +31,17 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> -#include <xfs/xfs_common.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_node.h> -#include <xfs/xfs_vnodeops.h> -#include <xfs/xfs_queue.h> +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_node.h> +#include <nnpfs/nnpfs_vnodeops.h> +#include <nnpfs/nnpfs_queue.h> -RCSID("$arla: xfs_node.c,v 1.3 2003/02/06 12:56:09 lha Exp $"); +RCSID("$arla: nnpfs_node.c,v 1.3 2003/02/06 12:56:09 lha Exp $"); -#define xfs_hash(node) \ +#define nnpfs_hash(node) \ (((node)->a+(node)->b+(node)->c+(node)->d) % XN_HASHSIZE) /* @@ -49,7 +49,7 @@ RCSID("$arla: xfs_node.c,v 1.3 2003/02/06 12:56:09 lha Exp $"); */ void -nnfs_init_head(struct xfs_nodelist_head *head) +nnfs_init_head(struct nnpfs_nodelist_head *head) { int i; @@ -64,26 +64,26 @@ nnfs_init_head(struct xfs_nodelist_head *head) */ void -xfs_node_purge(struct xfs_nodelist_head *head, - void (*func)(struct xfs_node *)) +nnpfs_node_purge(struct nnpfs_nodelist_head *head, + void (*func)(struct nnpfs_node *)) { - panic("xfs_node_purge"); + panic("nnpfs_node_purge"); } /* - * xfs_node_find returns the node with the handle `handlep'. + * nnpfs_node_find returns the node with the handle `handlep'. */ -struct xfs_node * -xfs_node_find(struct xfs_nodelist_head *head, xfs_handle *handlep) +struct nnpfs_node * +nnpfs_node_find(struct nnpfs_nodelist_head *head, nnpfs_handle *handlep) { struct nh_node_list *h; - struct xfs_node *nn; + struct nnpfs_node *nn; - h = &head->nh_nodelist[xfs_hash(handlep)]; + h = &head->nh_nodelist[nnpfs_hash(handlep)]; NNPQUEUE_FOREACH(nn, h, nn_hash) { - if (xfs_handle_eq(handlep, &nn->handle)) + if (nnpfs_handle_eq(handlep, &nn->handle)) break; } @@ -95,11 +95,11 @@ xfs_node_find(struct xfs_nodelist_head *head, xfs_handle *handlep) */ void -xfs_remove_node(struct xfs_nodelist_head *head, struct xfs_node *node) +nnpfs_remove_node(struct nnpfs_nodelist_head *head, struct nnpfs_node *node) { struct nh_node_list *h; - h = &head->nh_nodelist[xfs_hash(&node->handle)]; + h = &head->nh_nodelist[nnpfs_hash(&node->handle)]; NNPQUEUE_REMOVE(node, h, nn_hash); } @@ -108,11 +108,11 @@ xfs_remove_node(struct xfs_nodelist_head *head, struct xfs_node *node) */ void -xfs_insert(struct xfs_nodelist_head *head, struct xfs_node *node) +nnpfs_insert(struct nnpfs_nodelist_head *head, struct nnpfs_node *node) { struct nh_node_list *h; - h = &head->nh_nodelist[xfs_hash(&node->handle)]; + h = &head->nh_nodelist[nnpfs_hash(&node->handle)]; NNPQUEUE_INSERT_HEAD(h, node, nn_hash); } @@ -121,20 +121,20 @@ xfs_insert(struct xfs_nodelist_head *head, struct xfs_node *node) */ int -xfs_update_handle(struct xfs_nodelist_head *head, - xfs_handle *old_handlep, xfs_handle *new_handlep) +nnpfs_update_handle(struct nnpfs_nodelist_head *head, + nnpfs_handle *old_handlep, nnpfs_handle *new_handlep) { - struct xfs_node *node; + struct nnpfs_node *node; - node = xfs_node_find(head, new_handlep); + node = nnpfs_node_find(head, new_handlep); if (node) return EEXIST; - node = xfs_node_find(head, old_handlep); + node = nnpfs_node_find(head, old_handlep); if (node == NULL) return ENOENT; - xfs_remove_node(head, node); + nnpfs_remove_node(head, node); node->handle = *new_handlep; - xfs_insert(head, node); + nnpfs_insert(head, node); return 0; } diff --git a/sys/xfs/xfs_node.h b/sys/nnpfs/nnpfs_node.h index 2b1285c7a40..7747536073f 100644 --- a/sys/xfs/xfs_node.h +++ b/sys/nnpfs/nnpfs_node.h @@ -31,10 +31,10 @@ * SUCH DAMAGE. */ -/* $arla: xfs_node.h,v 1.33 2003/01/25 18:48:28 lha Exp $ */ +/* $arla: nnpfs_node.h,v 1.33 2003/01/25 18:48:28 lha Exp $ */ -#ifndef _xfs_xnode_h -#define _xfs_xnode_h +#ifndef _nnpfs_xnode_h +#define _nnpfs_xnode_h #include <sys/types.h> #include <sys/time.h> @@ -42,17 +42,17 @@ #include <sys/lockf.h> #endif -#include <xfs/xfs_attr.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_queue.h> +#include <nnpfs/nnpfs_attr.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_queue.h> #ifdef __APPLE__ -typedef struct lock__bsd__ xfs_vnode_lock; +typedef struct lock__bsd__ nnpfs_vnode_lock; #else -typedef struct lock xfs_vnode_lock; +typedef struct lock nnpfs_vnode_lock; #endif -struct xfs_node { +struct nnpfs_node { #if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105280000 struct genfs_node gnode; #endif @@ -62,12 +62,12 @@ struct xfs_node { uint32_t offset; u_int flags; u_int tokens; - xfs_handle handle; - xfs_pag_t id[MAXRIGHTS]; + nnpfs_handle handle; + nnpfs_pag_t id[MAXRIGHTS]; u_char rights[MAXRIGHTS]; u_char anonrights; #if defined(HAVE_KERNEL_LOCKMGR) || defined(HAVE_KERNEL_DEBUGLOCKMGR) - xfs_vnode_lock lock; + nnpfs_vnode_lock lock; #else int vnlocks; #endif @@ -76,32 +76,32 @@ struct xfs_node { #endif struct ucred *rd_cred; struct ucred *wr_cred; - NNPQUEUE_ENTRY(xfs_node) nn_hash; + NNPQUEUE_ENTRY(nnpfs_node) nn_hash; }; #define XN_HASHSIZE 101 -NNPQUEUE_HEAD(nh_node_list, xfs_node); +NNPQUEUE_HEAD(nh_node_list, nnpfs_node); -struct xfs_nodelist_head { +struct nnpfs_nodelist_head { struct nh_node_list nh_nodelist[XN_HASHSIZE]; }; -void nnfs_init_head(struct xfs_nodelist_head *); -void xfs_node_purge(struct xfs_nodelist_head *, - void (*func)(struct xfs_node *)); -struct xfs_node * - xfs_node_find(struct xfs_nodelist_head *, xfs_handle *); -void xfs_remove_node(struct xfs_nodelist_head *, struct xfs_node *); -void xfs_insert(struct xfs_nodelist_head *, struct xfs_node *); -int xfs_update_handle(struct xfs_nodelist_head *, xfs_handle *, - xfs_handle *); +void nnfs_init_head(struct nnpfs_nodelist_head *); +void nnpfs_node_purge(struct nnpfs_nodelist_head *, + void (*func)(struct nnpfs_node *)); +struct nnpfs_node * + nnpfs_node_find(struct nnpfs_nodelist_head *, nnpfs_handle *); +void nnpfs_remove_node(struct nnpfs_nodelist_head *, struct nnpfs_node *); +void nnpfs_insert(struct nnpfs_nodelist_head *, struct nnpfs_node *); +int nnpfs_update_handle(struct nnpfs_nodelist_head *, nnpfs_handle *, + nnpfs_handle *); -struct xfs; +struct nnpfs; -int xfs_getnewvnode(struct xfs *xfsp, struct vnode **vpp, - struct xfs_handle *handle); +int nnpfs_getnewvnode(struct nnpfs *nnpfsp, struct vnode **vpp, + struct nnpfs_handle *handle); #define DATA_FROM_VNODE(vp) DATA_FROM_XNODE(VNODE_TO_XNODE(vp)) @@ -109,14 +109,14 @@ int xfs_getnewvnode(struct xfs *xfsp, struct vnode **vpp, #define DATA_FROM_XNODE(xp) ((xp)->data) #define XNODE_TO_VNODE(xp) ((xp)->vn) -#define VNODE_TO_XNODE(vp) ((struct xfs_node *) (vp)->v_data) +#define VNODE_TO_XNODE(vp) ((struct nnpfs_node *) (vp)->v_data) #if defined(HAVE_ONE_ARGUMENT_VGET) -#define xfs_do_vget(vp, lockflag, proc) vget((vp)) +#define nnpfs_do_vget(vp, lockflag, proc) vget((vp)) #elif defined(HAVE_TWO_ARGUMENT_VGET) -#define xfs_do_vget(vp, lockflag, proc) vget((vp), (lockflag)) +#define nnpfs_do_vget(vp, lockflag, proc) vget((vp), (lockflag)) #elif defined(HAVE_THREE_ARGUMENT_VGET) -#define xfs_do_vget(vp, lockflag, proc) vget((vp), (lockflag), (proc)) +#define nnpfs_do_vget(vp, lockflag, proc) vget((vp), (lockflag), (proc)) #else #error what kind of vget #endif @@ -155,7 +155,7 @@ typedef int vop_t (void *); #define LK_SHARED 1 #endif -void xfs_update_write_cred(struct xfs_node *, struct ucred *); -void xfs_update_read_cred(struct xfs_node *, struct ucred *); +void nnpfs_update_write_cred(struct nnpfs_node *, struct ucred *); +void nnpfs_update_read_cred(struct nnpfs_node *, struct ucred *); -#endif /* _xfs_xnode_h */ +#endif /* _nnpfs_xnode_h */ diff --git a/sys/xfs/xfs_pioctl.h b/sys/nnpfs/nnpfs_pioctl.h index 9f9d104c5cd..2ffa9a2ed75 100644 --- a/sys/xfs/xfs_pioctl.h +++ b/sys/nnpfs/nnpfs_pioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xfs_pioctl.h,v 1.5 2003/09/08 05:46:08 beck Exp $ */ +/* $OpenBSD: nnpfs_pioctl.h,v 1.1 2009/06/03 14:45:54 jj Exp $ */ /* * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). @@ -37,8 +37,8 @@ * SUCH DAMAGE. */ -#ifndef _XFS_XFS_PIOCTL_H_ -#define _XFS_XFS_PIOCTL_H_ +#ifndef _NNPFS_NNPFS_PIOCTL_H_ +#define _NNPFS_NNPFS_PIOCTL_H_ /* */ @@ -128,7 +128,7 @@ #define VIOC_FHGET _VICEIOCTL(58) #define VIOC_FHOPEN _VICEIOCTL(59) #define VIOC_NNPFSDEBUG _VICEIOCTL(60) -#define VIOC_XFSDEBUG _VICEIOCTL(60) +#define VIOC_NNPFSDEBUG _VICEIOCTL(60) #define VIOC_ARLADEBUG _VICEIOCTL(61) #define VIOC_AVIATOR _VICEIOCTL(62) #define VIOC_NNPFSDEBUG_PRINT _VICEIOCTL(63) diff --git a/sys/xfs/xfs_queue.h b/sys/nnpfs/nnpfs_queue.h index 2eb884b4f3f..bbe4e94097e 100644 --- a/sys/xfs/xfs_queue.h +++ b/sys/nnpfs/nnpfs_queue.h @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* $arla: xfs_queue.h,v 1.1 2002/11/28 06:24:23 lha Exp $ */ +/* $arla: nnpfs_queue.h,v 1.1 2002/11/28 06:24:23 lha Exp $ */ /* Inspirered by the queue macros in BSD. */ diff --git a/sys/xfs/xfs_syscalls-common.c b/sys/nnpfs/nnpfs_syscalls-common.c index e7dae1e49e9..cfe06490fe4 100644 --- a/sys/xfs/xfs_syscalls-common.c +++ b/sys/nnpfs/nnpfs_syscalls-common.c @@ -31,21 +31,21 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> +#include <nnpfs/nnpfs_locl.h> -RCSID("$arla: xfs_syscalls-common.c,v 1.72 2003/01/19 20:53:49 lha Exp $"); +RCSID("$arla: nnpfs_syscalls-common.c,v 1.72 2003/01/19 20:53:49 lha Exp $"); /* * NNPFS system calls. */ -#include <xfs/xfs_syscalls.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_node.h> -#include <xfs/xfs_vfsops.h> -#include <xfs/xfs_deb.h> +#include <nnpfs/nnpfs_syscalls.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_node.h> +#include <nnpfs/nnpfs_vfsops.h> +#include <nnpfs/nnpfs_deb.h> /* Misc syscalls */ #ifdef HAVE_SYS_IOCCOM_H @@ -64,7 +64,7 @@ RCSID("$arla: xfs_syscalls-common.c,v 1.72 2003/01/19 20:53:49 lha Exp $"); #endif #ifdef NNPFS_NOT_LKM -#include <xfs/xfs_pioctl.h> +#include <nnpfs/nnpfs_pioctl.h> #else #include <kafs.h> #endif @@ -76,7 +76,7 @@ int (*old_setgroups_func)(syscall_d_thread_t *p, void *v, register_t *retval); * XXX This is wrong */ static struct ucred * -xfs_crcopy(struct ucred *cr) +nnpfs_crcopy(struct ucred *cr) { struct ucred *ncr; @@ -88,7 +88,7 @@ xfs_crcopy(struct ucred *cr) return cr; } #else -#define xfs_crcopy crcopy +#define nnpfs_crcopy crcopy #endif @@ -98,14 +98,14 @@ xfs_crcopy(struct ucred *cr) #ifdef NNPFS_NOT_LKM int -sys_xfspioctl(syscall_d_thread_t *proc, void *varg, register_t *return_value) +sys_nnpfspioctl(syscall_d_thread_t *proc, void *varg, register_t *return_value) #else int -xfspioctl(syscall_d_thread_t *proc, void *varg, register_t *return_value) +nnpfspioctl(syscall_d_thread_t *proc, void *varg, register_t *return_value) #endif { #ifdef NNPFS_NOT_LKM - struct sys_xfspioctl_args *arg = (struct sys_xfspioctl_args *) varg; + struct sys_nnpfspioctl_args *arg = (struct sys_nnpfspioctl_args *) varg; #else struct sys_pioctl_args *arg = (struct sys_pioctl_args *) varg; #endif @@ -113,18 +113,18 @@ xfspioctl(syscall_d_thread_t *proc, void *varg, register_t *return_value) switch (SCARG(arg, operation)) { case AFSCALL_PIOCTL: - error = xfs_pioctl_call(syscall_thread_to_thread(proc), + error = nnpfs_pioctl_call(syscall_thread_to_thread(proc), varg, return_value); break; case AFSCALL_SETPAG: #ifdef HAVE_FREEBSD_THREAD - error = xfs_setpag_call(&xfs_thread_to_cred(proc)); + error = nnpfs_setpag_call(&nnpfs_thread_to_cred(proc)); #else - error = xfs_setpag_call(&xfs_proc_to_cred(syscall_thread_to_thread(proc))); + error = nnpfs_setpag_call(&nnpfs_proc_to_cred(syscall_thread_to_thread(proc))); #endif break; default: - NNPFSDEB(XDEBSYS, ("Unimplemeted xfspioctl: %d\n", + NNPFSDEB(XDEBSYS, ("Unimplemeted nnpfspioctl: %d\n", SCARG(arg, operation))); error = EINVAL; break; @@ -152,7 +152,7 @@ static gid_t pag_part_two = NNPFS_PAG2_LLIM; */ static int -xfs_is_pag(struct ucred *cred) +nnpfs_is_pag(struct ucred *cred) { /* The first group is the gid of the user ? */ @@ -170,10 +170,10 @@ xfs_is_pag(struct ucred *cred) * Return the pag used by `cred' */ -xfs_pag_t -xfs_get_pag(struct ucred *cred) +nnpfs_pag_t +nnpfs_get_pag(struct ucred *cred) { - if (xfs_is_pag(cred)) { + if (nnpfs_is_pag(cred)) { return (((cred->cr_groups[1] << 16) & 0xFFFF0000) | ((cred->cr_groups[2] & 0x0000FFFF))); @@ -191,20 +191,20 @@ store_pag (struct ucred **ret_cred, gid_t part1, gid_t part2) { struct ucred *cred = *ret_cred; - if (!xfs_is_pag (cred)) { + if (!nnpfs_is_pag (cred)) { int i; if (cred->cr_ngroups + 2 >= NGROUPS) return E2BIG; - cred = xfs_crcopy (cred); + cred = nnpfs_crcopy (cred); for (i = cred->cr_ngroups - 1; i > 0; i--) { cred->cr_groups[i + 2] = cred->cr_groups[i]; } cred->cr_ngroups += 2; } else { - cred = xfs_crcopy (cred); + cred = nnpfs_crcopy (cred); } cred->cr_groups[1] = part1; cred->cr_groups[2] = part2; @@ -218,7 +218,7 @@ store_pag (struct ucred **ret_cred, gid_t part1, gid_t part2) */ int -xfs_setpag_call(struct ucred **ret_cred) +nnpfs_setpag_call(struct ucred **ret_cred) { int ret; @@ -239,9 +239,9 @@ xfs_setpag_call(struct ucred **ret_cred) */ static int -xfs_unpag (struct ucred *cred) +nnpfs_unpag (struct ucred *cred) { - while (xfs_is_pag (cred)) { + while (nnpfs_is_pag (cred)) { int i; for (i = 0; i < cred->cr_ngroups - 2; ++i) @@ -256,18 +256,18 @@ xfs_unpag (struct ucred *cred) */ int -xfs_setgroups (syscall_d_thread_t *p, +nnpfs_setgroups (syscall_d_thread_t *p, void *varg, register_t *retval) { - struct xfs_setgroups_args *uap = (struct xfs_setgroups_args *)varg; + struct nnpfs_setgroups_args *uap = (struct nnpfs_setgroups_args *)varg; #ifdef HAVE_FREEBSD_THREAD - struct ucred **cred = &xfs_thread_to_cred(p); + struct ucred **cred = &nnpfs_thread_to_cred(p); #else - struct ucred **cred = &xfs_proc_to_cred(syscall_thread_to_thread(p)); + struct ucred **cred = &nnpfs_proc_to_cred(syscall_thread_to_thread(p)); #endif - if (xfs_is_pag (*cred)) { + if (nnpfs_is_pag (*cred)) { gid_t part1, part2; int ret; @@ -285,8 +285,8 @@ xfs_setgroups (syscall_d_thread_t *p, ret = (*old_setgroups_func) (p, uap, retval); /* don't support setting a PAG */ - if (xfs_is_pag (*cred)) { - xfs_unpag (*cred); + if (nnpfs_is_pag (*cred)) { + nnpfs_unpag (*cred); return EINVAL; } return ret; @@ -314,12 +314,12 @@ lookup_node (const char *pathptr, struct vnode *vp; size_t count; - NNPFSDEB(XDEBSYS, ("xfs_syscall: looking up: %lx\n", + NNPFSDEB(XDEBSYS, ("nnpfs_syscall: looking up: %lx\n", (unsigned long)pathptr)); error = copyinstr((char *) pathptr, path, MAXPATHLEN, &count); - NNPFSDEB(XDEBSYS, ("xfs_syscall: looking up: %s, error: %d\n", path, error)); + NNPFSDEB(XDEBSYS, ("nnpfs_syscall: looking up: %s, error: %d\n", path, error)); if (error) return error; @@ -331,7 +331,7 @@ lookup_node (const char *pathptr, error = namei(ndp); if (error != 0) { - NNPFSDEB(XDEBSYS, ("xfs_syscall: error during namei: %d\n", error)); + NNPFSDEB(XDEBSYS, ("nnpfs_syscall: error during namei: %d\n", error)); return EINVAL; } @@ -342,7 +342,7 @@ lookup_node (const char *pathptr, } /* - * implement xfs fhget in a way that should be compatible with the native + * implement nnpfs fhget in a way that should be compatible with the native * getfh */ @@ -372,7 +372,7 @@ getfh_compat (d_thread_t *p, } /* - * implement xfs fhget by combining (dev, ino, generation) + * implement nnpfs fhget by combining (dev, ino, generation) */ #ifndef __OpenBSD__ @@ -385,13 +385,13 @@ trad_fhget (d_thread_t *p, struct mount *mnt; struct vattr vattr; size_t len; - struct xfs_fhandle_t xfs_handle; - struct xfs_fh_args fh_args; + struct nnpfs_fhandle_t nnpfs_handle; + struct nnpfs_fh_args fh_args; #ifdef HAVE_FREEBSD_THREAD - xfs_vop_getattr(vp, &vattr, xfs_thread_to_cred(p), p, error); + nnpfs_vop_getattr(vp, &vattr, nnpfs_thread_to_cred(p), p, error); #else - xfs_vop_getattr(vp, &vattr, xfs_proc_to_cred(p), p, error); + nnpfs_vop_getattr(vp, &vattr, nnpfs_proc_to_cred(p), p, error); #endif if (error) return error; @@ -402,14 +402,14 @@ trad_fhget (d_thread_t *p, SCARG(&fh_args, fileid) = vattr.va_fileid; SCARG(&fh_args, gen) = vattr.va_gen; - xfs_handle.len = sizeof(fh_args); - memcpy (xfs_handle.fhdata, &fh_args, sizeof(fh_args)); - len = sizeof(xfs_handle); + nnpfs_handle.len = sizeof(fh_args); + memcpy (nnpfs_handle.fhdata, &fh_args, sizeof(fh_args)); + len = sizeof(nnpfs_handle); if (vice_ioctl->out_size < len) return EINVAL; - error = copyout (&xfs_handle, vice_ioctl->out, len); + error = copyout (&nnpfs_handle, vice_ioctl->out, len); if (error) { NNPFSDEB(XDEBSYS, ("fhget_call: copyout failed: %d\n", error)); } @@ -439,7 +439,7 @@ fhget_call (d_thread_t *p, goto out; #endif - error = xfs_suser (p); + error = nnpfs_suser (p); if (error) goto out; @@ -476,8 +476,8 @@ fhopen_call (d_thread_t *p, return EINVAL; /* XXX: Leaks vnodes if fhget/fhopen is used */ #endif - return xfs_fhopen (p, - (struct xfs_fhandle_t *)vice_ioctl->in, + return nnpfs_fhopen (p, + (struct nnpfs_fhandle_t *)vice_ioctl->in, flags, retval); } @@ -493,8 +493,8 @@ remote_pioctl (d_thread_t *p, struct vnode *vp) { int error = 0; - struct xfs_message_pioctl *msg = NULL; - struct xfs_message_wakeup_data *msg2; + struct nnpfs_message_pioctl *msg = NULL; + struct nnpfs_message_wakeup_data *msg2; msg = malloc(sizeof(*msg), M_TEMP, M_WAITOK | M_ZERO); if (msg == NULL) { @@ -503,10 +503,10 @@ remote_pioctl (d_thread_t *p, } if (vp != NULL) { - struct xfs_node *xn; + struct nnpfs_node *xn; - if (vp->v_tag != VT_XFS) { - NNPFSDEB(XDEBSYS, ("xfs_syscall: file is not in afs\n")); + if (vp->v_tag != VT_NNPFS) { + NNPFSDEB(XDEBSYS, ("nnpfs_syscall: file is not in afs\n")); vrele(vp); error = EINVAL; goto done; @@ -519,14 +519,14 @@ remote_pioctl (d_thread_t *p, } if (vice_ioctl->in_size < 0) { - printf("xfs: remote pioctl: got a negative data size: opcode: %d", + printf("nnpfs: remote pioctl: got a negative data size: opcode: %d", SCARG(arg, a_opcode)); error = EINVAL; goto done; } if (vice_ioctl->in_size > NNPFS_MSG_MAX_DATASIZE) { - printf("xfs_pioctl_call: got a humongous in packet: opcode: %d", + printf("nnpfs_pioctl_call: got a humongous in packet: opcode: %d", SCARG(arg, a_opcode)); error = EINVAL; goto done; @@ -544,15 +544,15 @@ remote_pioctl (d_thread_t *p, msg->insize = vice_ioctl->in_size; msg->outsize = vice_ioctl->out_size; #ifdef HAVE_FREEBSD_THREAD - msg->cred.uid = xfs_thread_to_euid(p); - msg->cred.pag = xfs_get_pag(xfs_thread_to_cred(p)); + msg->cred.uid = nnpfs_thread_to_euid(p); + msg->cred.pag = nnpfs_get_pag(nnpfs_thread_to_cred(p)); #else - msg->cred.uid = xfs_proc_to_euid(p); - msg->cred.pag = xfs_get_pag(xfs_proc_to_cred(p)); + msg->cred.uid = nnpfs_proc_to_euid(p); + msg->cred.pag = nnpfs_get_pag(nnpfs_proc_to_cred(p)); #endif - error = xfs_message_rpc(0, &(msg->header), sizeof(*msg), p); /* XXX */ - msg2 = (struct xfs_message_wakeup_data *) msg; + error = nnpfs_message_rpc(0, &(msg->header), sizeof(*msg), p); /* XXX */ + msg2 = (struct nnpfs_message_wakeup_data *) msg; if (error == 0) error = msg2->error; @@ -578,7 +578,7 @@ remote_pioctl (d_thread_t *p, } static int -xfs_debug (d_thread_t *p, +nnpfs_debug (d_thread_t *p, struct ViceIoctl *vice_ioctl) { int32_t flags; @@ -588,7 +588,7 @@ xfs_debug (d_thread_t *p, if (vice_ioctl->in_size < sizeof(int32_t)) return EINVAL; - error = xfs_suser (p); + error = nnpfs_suser (p); if (error) return error; @@ -598,14 +598,14 @@ xfs_debug (d_thread_t *p, if (error) return error; - xfsdeb = flags; + nnpfsdeb = flags; } if (vice_ioctl->out_size != 0) { if (vice_ioctl->out_size < sizeof(int32_t)) return EINVAL; - error = copyout (&xfsdeb, + error = copyout (&nnpfsdeb, vice_ioctl->out, sizeof(int32_t)); if (error) @@ -621,7 +621,7 @@ xfs_debug (d_thread_t *p, */ int -xfs_pioctl_call(d_thread_t *proc, +nnpfs_pioctl_call(d_thread_t *proc, struct sys_pioctl_args *arg, register_t *return_value) { @@ -630,7 +630,7 @@ xfs_pioctl_call(d_thread_t *proc, char *pathptr; struct vnode *vp = NULL; - NNPFSDEB(XDEBSYS, ("xfs_syscall(%d, %lx, %d, %lx, %d)\n", + NNPFSDEB(XDEBSYS, ("nnpfs_syscall(%d, %lx, %d, %lx, %d)\n", SCARG(arg, operation), (unsigned long)SCARG(arg, a_pathP), SCARG(arg, a_opcode), @@ -661,10 +661,10 @@ xfs_pioctl_call(d_thread_t *proc, case VIOC_FHOPEN : return fhopen_call (proc, &vice_ioctl, vp, SCARG(arg, a_followSymlinks), return_value); - case VIOC_XFSDEBUG : + case VIOC_NNPFSDEBUG : if (vp != NULL) vrele (vp); - return xfs_debug (proc, &vice_ioctl); + return nnpfs_debug (proc, &vice_ioctl); default : NNPFSDEB(XDEBSYS, ("a_opcode = %x\n", SCARG(arg, a_opcode))); return remote_pioctl (proc, arg, &vice_ioctl, vp); diff --git a/sys/xfs/xfs_syscalls-dummy.c b/sys/nnpfs/nnpfs_syscalls-dummy.c index 67f30fc4e67..8685070aa82 100644 --- a/sys/xfs/xfs_syscalls-dummy.c +++ b/sys/nnpfs/nnpfs_syscalls-dummy.c @@ -1,10 +1,10 @@ /* * This code released into public domain by Artur Grabowski <art@openbsd.org> */ -#include <xfs/xfs_locl.h> +#include <nnpfs/nnpfs_locl.h> int -sys_xfspioctl(struct proc *proc, void *varg, register_t *retval) +sys_nnpfspioctl(struct proc *proc, void *varg, register_t *retval) { return ENOSYS; } diff --git a/sys/xfs/xfs_syscalls.h b/sys/nnpfs/nnpfs_syscalls.h index 1a43a0f2d19..5b5d01a4ce3 100644 --- a/sys/xfs/xfs_syscalls.h +++ b/sys/nnpfs/nnpfs_syscalls.h @@ -31,15 +31,15 @@ * SUCH DAMAGE. */ -/* $arla: xfs_syscalls.h,v 1.29 2003/01/19 20:53:54 lha Exp $ */ +/* $arla: nnpfs_syscalls.h,v 1.29 2003/01/19 20:53:54 lha Exp $ */ -#ifndef __xfs_syscalls -#define __xfs_syscalls +#ifndef __nnpfs_syscalls +#define __nnpfs_syscalls -#include <xfs/xfs_common.h> -#include <xfs/xfs_message.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_message.h> -#include <xfs/afssysdefs.h> +#include <nnpfs/afssysdefs.h> struct sys_pioctl_args { syscallarg(int) operation; @@ -51,34 +51,34 @@ struct sys_pioctl_args { #define NNPFS_FHMAXDATA 40 -struct xfs_fhandle_t { +struct nnpfs_fhandle_t { u_short len; u_short pad; char fhdata[NNPFS_FHMAXDATA]; }; -struct xfs_fh_args { +struct nnpfs_fh_args { syscallarg(fsid_t) fsid; syscallarg(long) fileid; syscallarg(long) gen; }; -int xfs_install_syscalls(void); -int xfs_uninstall_syscalls(void); -int xfs_stat_syscalls(void); -xfs_pag_t xfs_get_pag(struct ucred *); +int nnpfs_install_syscalls(void); +int nnpfs_uninstall_syscalls(void); +int nnpfs_stat_syscalls(void); +nnpfs_pag_t nnpfs_get_pag(struct ucred *); -int xfs_setpag_call(struct ucred **ret_cred); -int xfs_pioctl_call(d_thread_t *proc, +int nnpfs_setpag_call(struct ucred **ret_cred); +int nnpfs_pioctl_call(d_thread_t *proc, struct sys_pioctl_args *args, register_t *return_value); -int xfspioctl(syscall_d_thread_t *proc, void *varg, register_t *retval); +int nnpfspioctl(syscall_d_thread_t *proc, void *varg, register_t *retval); -int xfs_setgroups(syscall_d_thread_t *p, void *varg, register_t *retval); +int nnpfs_setgroups(syscall_d_thread_t *p, void *varg, register_t *retval); extern int (*old_setgroups_func)(syscall_d_thread_t *, void *, register_t *); -extern int xfs_syscall_num; /* The old syscall number */ +extern int nnpfs_syscall_num; /* The old syscall number */ #ifndef HAVE_KERNEL_SYS_LKMNOSYS @@ -89,4 +89,4 @@ extern int xfs_syscall_num; /* The old syscall number */ #define SYS_MAXSYSCALL nsysent #endif -#endif /* __xfs_syscalls */ +#endif /* __nnpfs_syscalls */ diff --git a/sys/xfs/xfs_vfsops-bsd.c b/sys/nnpfs/nnpfs_vfsops-bsd.c index 4abbfffd7b0..2e29829aa27 100644 --- a/sys/xfs/xfs_vfsops-bsd.c +++ b/sys/nnpfs/nnpfs_vfsops-bsd.c @@ -31,65 +31,65 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> +#include <nnpfs/nnpfs_locl.h> -RCSID("$arla: xfs_vfsops-bsd.c,v 1.72 2002/12/19 10:30:17 lha Exp $"); +RCSID("$arla: nnpfs_vfsops-bsd.c,v 1.72 2002/12/19 10:30:17 lha Exp $"); /* * NNPFS vfs operations. */ -#include <xfs/xfs_common.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_vfsops.h> -#include <xfs/xfs_vfsops-bsd.h> -#include <xfs/xfs_vnodeops.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_vfsops.h> +#include <nnpfs/nnpfs_vfsops-bsd.h> +#include <nnpfs/nnpfs_vnodeops.h> int -xfs_mount_caddr(struct mount *mp, +nnpfs_mount_caddr(struct mount *mp, const char *user_path, caddr_t user_data, struct nameidata *ndp, d_thread_t *p) { - return xfs_mount_common(mp, user_path, user_data, ndp, p); + return nnpfs_mount_common(mp, user_path, user_data, ndp, p); } int -xfs_start(struct mount * mp, int flags, d_thread_t * p) +nnpfs_start(struct mount * mp, int flags, d_thread_t * p) { - NNPFSDEB(XDEBVFOPS, ("xfs_start mp = %lx, flags = %d, proc = %lx\n", + NNPFSDEB(XDEBVFOPS, ("nnpfs_start mp = %lx, flags = %d, proc = %lx\n", (unsigned long)mp, flags, (unsigned long)p)); return 0; } int -xfs_unmount(struct mount * mp, int mntflags, d_thread_t *p) +nnpfs_unmount(struct mount * mp, int mntflags, d_thread_t *p) { - NNPFSDEB(XDEBVFOPS, ("xfs_umount: mp = %lx, mntflags = %d, proc = %lx\n", + NNPFSDEB(XDEBVFOPS, ("nnpfs_umount: mp = %lx, mntflags = %d, proc = %lx\n", (unsigned long)mp, mntflags, (unsigned long)p)); - return xfs_unmount_common(mp, mntflags); + return nnpfs_unmount_common(mp, mntflags); } int -xfs_root(struct mount *mp, struct vnode **vpp) +nnpfs_root(struct mount *mp, struct vnode **vpp) { - NNPFSDEB(XDEBVFOPS, ("xfs_root mp = %lx\n", (unsigned long)mp)); + NNPFSDEB(XDEBVFOPS, ("nnpfs_root mp = %lx\n", (unsigned long)mp)); #ifdef HAVE_FREEBSD_THREAD - return xfs_root_common(mp, vpp, xfs_curthread(), xfs_curthread()->td_proc->p_ucred); + return nnpfs_root_common(mp, vpp, nnpfs_curthread(), nnpfs_curthread()->td_proc->p_ucred); #else - return xfs_root_common(mp, vpp, xfs_curproc(), xfs_curproc()->p_ucred); + return nnpfs_root_common(mp, vpp, nnpfs_curproc(), nnpfs_curproc()->p_ucred); #endif } int -xfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p) +nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p) { - NNPFSDEB(XDEBVFOPS, ("xfs_quotactl: mp = %lx, cmd = %d, uid = %u, " + NNPFSDEB(XDEBVFOPS, ("nnpfs_quotactl: mp = %lx, cmd = %d, uid = %u, " "arg = %lx, proc = %lx\n", (unsigned long)mp, cmd, uid, (unsigned long)arg, (unsigned long)p)); @@ -97,9 +97,9 @@ xfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p) } int -xfs_statfs(struct mount *mp, struct statfs *sbp, d_thread_t *p) +nnpfs_statfs(struct mount *mp, struct statfs *sbp, d_thread_t *p) { - NNPFSDEB(XDEBVFOPS, ("xfs_statfs: mp = %lx, sbp = %lx, proc = %lx\n", + NNPFSDEB(XDEBVFOPS, ("nnpfs_statfs: mp = %lx, sbp = %lx, proc = %lx\n", (unsigned long)mp, (unsigned long)sbp, (unsigned long)p)); @@ -108,9 +108,9 @@ xfs_statfs(struct mount *mp, struct statfs *sbp, d_thread_t *p) } int -xfs_sync(struct mount *mp, int waitfor, struct ucred *cred, d_thread_t *p) +nnpfs_sync(struct mount *mp, int waitfor, struct ucred *cred, d_thread_t *p) { - NNPFSDEB(XDEBVFOPS, ("xfs_sync: mp = %lx, waitfor = %d, " + NNPFSDEB(XDEBVFOPS, ("nnpfs_sync: mp = %lx, waitfor = %d, " "cred = %lx, proc = %lx\n", (unsigned long)mp, waitfor, @@ -120,7 +120,7 @@ xfs_sync(struct mount *mp, int waitfor, struct ucred *cred, d_thread_t *p) } int -xfs_vget(struct mount * mp, +nnpfs_vget(struct mount * mp, #ifdef __APPLE__ void *ino, #else @@ -128,7 +128,7 @@ xfs_vget(struct mount * mp, #endif struct vnode ** vpp) { - NNPFSDEB(XDEBVFOPS, ("xfs_vget\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_vget\n")); return EOPNOTSUPP; } @@ -139,33 +139,33 @@ common_fhtovp(struct mount * mp, { #ifdef ARLA_KNFS struct netcred *np = NULL; - struct xfs_node *xn; + struct nnpfs_node *xn; struct vnode *vp; - xfs_handle handle; + nnpfs_handle handle; int error; - NNPFSDEB(XDEBVFOPS, ("xfs_fhtovp\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp\n")); if (fhp->fid_len != 16) { - printf("xfs_fhtovp: *PANIC* got a invalid length of a fid\n"); + printf("nnpfs_fhtovp: *PANIC* got a invalid length of a fid\n"); return EINVAL; } memcpy(&handle, fhp->fid_data, sizeof(handle)); - NNPFSDEB(XDEBVFOPS, ("xfs_fhtovp: fid: %d.%d.%d.%d\n", + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp: fid: %d.%d.%d.%d\n", handle.a, handle.d, handle.c, handle.d)); - NNPFSDEB(XDEBVFOPS, ("xfs_fhtovp: xfs_vnode_find\n")); - xn = xfs_node_find(&xfs[0].nodehead, &handle); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp: nnpfs_vnode_find\n")); + xn = nnpfs_node_find(&nnpfs[0].nodehead, &handle); if (xn == NULL) { - struct xfs_message_getattr msg; + struct nnpfs_message_getattr msg; - error = xfs_getnewvnode(xfs[0].mp, &vp, &handle); + error = nnpfs_getnewvnode(nnpfs[0].mp, &vp, &handle); if (error) return error; - xfs_do_vget(vp, 0, curproc); + nnpfs_do_vget(vp, 0, curproc); } else { /* XXX access ? */ @@ -173,7 +173,7 @@ common_fhtovp(struct mount * mp, /* XXX wrong ? (we tell arla below) */ if (vp->v_usecount <= 0) - xfs_do_vget(vp, 0, curproc); + nnpfs_do_vget(vp, 0, curproc); else VREF(vp); error = 0; @@ -182,14 +182,14 @@ common_fhtovp(struct mount * mp, *vpp = vp; if (error == 0) { - NNPFSDEB(XDEBVFOPS, ("xfs_fhtovp done\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp done\n")); /* * XXX tell arla about this node is hold by nfsd. - * There need to be code in xfs_write too. + * There need to be code in nnpfs_write too. */ } else - NNPFSDEB(XDEBVFOPS, ("xfs_fhtovp failed (%d)\n", error)); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhtovp failed (%d)\n", error)); return error; #else /* !ARLA_KNFS */ @@ -201,7 +201,7 @@ common_fhtovp(struct mount * mp, #ifdef HAVE_STRUCT_VFSOPS_VFS_CHECKEXP int -xfs_fhtovp(struct mount * mp, +nnpfs_fhtovp(struct mount * mp, struct fid * fhp, struct vnode ** vpp) { @@ -213,7 +213,7 @@ xfs_fhtovp(struct mount * mp, /* old style fhtovp */ int -xfs_fhtovp(struct mount * mp, +nnpfs_fhtovp(struct mount * mp, struct fid * fhp, struct mbuf * nam, struct vnode ** vpp, @@ -247,7 +247,7 @@ xfs_fhtovp(struct mount * mp, #endif /* !HAVE_STRUCT_VFSOPS_VFS_CHECKEXP */ int -xfs_checkexp (struct mount *mp, +nnpfs_checkexp (struct mount *mp, #ifdef __FreeBSD__ struct sockaddr *nam, #else @@ -256,7 +256,7 @@ xfs_checkexp (struct mount *mp, int *exflagsp, struct ucred **credanonp) { - NNPFSDEB(XDEBVFOPS, ("xfs_checkexp\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_checkexp\n")); #if 0 np = vfs_export_lookup(mp, &ump->um_export, nam); @@ -267,12 +267,12 @@ xfs_checkexp (struct mount *mp, } int -xfs_vptofh(struct vnode * vp, +nnpfs_vptofh(struct vnode * vp, struct fid * fhp) { #ifdef ARLA_KNFS - struct xfs_node *xn; - NNPFSDEB(XDEBVFOPS, ("xfs_vptofh\n")); + struct nnpfs_node *xn; + NNPFSDEB(XDEBVFOPS, ("nnpfs_vptofh\n")); if (MAXFIDSZ < 16) return EOPNOTSUPP; @@ -287,20 +287,20 @@ xfs_vptofh(struct vnode * vp, return 0; #else - NNPFSDEB(XDEBVFOPS, ("xfs_vptofh\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_vptofh\n")); return EOPNOTSUPP; #endif } /* - * xfs complete dead vnodes implementation. + * nnpfs complete dead vnodes implementation. * * this is because the dead_vnodeops_p is _not_ filesystem, but rather * a part of the vfs-layer. */ int -xfs_dead_lookup(struct vop_lookup_args * ap) +nnpfs_dead_lookup(struct vop_lookup_args * ap) /* struct vop_lookup_args { struct vnodeop_desc *a_desc; struct vnode *a_dvp; @@ -320,8 +320,8 @@ xfs_dead_lookup(struct vop_lookup_args * ap) */ int -xfs_fhlookup (d_thread_t *proc, - struct xfs_fhandle_t *fhp, +nnpfs_fhlookup (d_thread_t *proc, + struct nnpfs_fhandle_t *fhp, struct vnode **vpp) { int error; @@ -330,20 +330,20 @@ xfs_fhlookup (d_thread_t *proc, struct ucred *cred = proc->p_ucred; struct vattr vattr; fsid_t fsid; - struct xfs_fh_args *fh_args = (struct xfs_fh_args *)fhp->fhdata; + struct nnpfs_fh_args *fh_args = (struct nnpfs_fh_args *)fhp->fhdata; - NNPFSDEB(XDEBVFOPS, ("xfs_fhlookup (xfs)\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhlookup (nnpfs)\n")); - error = xfs_suser (proc); + error = nnpfs_suser (proc); if (error) return EPERM; - if (fhp->len < sizeof(struct xfs_fh_args)) + if (fhp->len < sizeof(struct nnpfs_fh_args)) return EINVAL; fsid = SCARG(fh_args, fsid); - mp = xfs_vfs_getvfs (&fsid); + mp = nnpfs_vfs_getvfs (&fsid); if (mp == NULL) return ENXIO; @@ -376,9 +376,9 @@ xfs_fhlookup (d_thread_t *proc, { fhandle_t *fh = (fhandle_t *) fhp; - NNPFSDEB(XDEBVFOPS, ("xfs_fhlookup (native)\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhlookup (native)\n")); - mp = xfs_vfs_getvfs (&fh->fh_fsid); + mp = nnpfs_vfs_getvfs (&fh->fh_fsid); if (mp == NULL) return ESTALE; @@ -392,9 +392,9 @@ xfs_fhlookup (d_thread_t *proc, #ifdef HAVE_KERNEL_VFS_OBJECT_CREATE if ((*vpp)->v_type == VREG && (*vpp)->v_object == NULL) #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_object_create (*vpp, proc, proc->td_proc->p_ucred); + nnpfs_vfs_object_create (*vpp, proc, proc->td_proc->p_ucred); #else - xfs_vfs_object_create (*vpp, proc, proc->p_ucred); + nnpfs_vfs_object_create (*vpp, proc, proc->p_ucred); #endif #elif __APPLE__ if ((*vpp)->v_type == VREG && (!UBCINFOEXISTS(*vpp))) { @@ -408,16 +408,16 @@ xfs_fhlookup (d_thread_t *proc, /* - * Perform an open operation on the vnode identified by a `xfs_fhandle_t' - * (see xfs_fhlookup) with flags `user_flags'. Returns 0 or + * Perform an open operation on the vnode identified by a `nnpfs_fhandle_t' + * (see nnpfs_fhlookup) with flags `user_flags'. Returns 0 or * error. If successful, the file descriptor is returned in `retval'. */ extern struct fileops vnops; /* sometimes declared in <file.h> */ int -xfs_fhopen (d_thread_t *proc, - struct xfs_fhandle_t *fhp, +nnpfs_fhopen (d_thread_t *proc, + struct nnpfs_fhandle_t *fhp, int user_flags, register_t *retval) { @@ -432,16 +432,16 @@ xfs_fhopen (d_thread_t *proc, int index; struct file *fp; int mode; - struct xfs_fhandle_t fh; + struct nnpfs_fhandle_t fh; - NNPFSDEB(XDEBVFOPS, ("xfs_fhopen: flags = %d\n", user_flags)); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhopen: flags = %d\n", user_flags)); error = copyin (fhp, &fh, sizeof(fh)); if (error) return error; - error = xfs_fhlookup (proc, &fh, &vp); - NNPFSDEB(XDEBVFOPS, ("xfs_fhlookup returned %d\n", error)); + error = nnpfs_fhlookup (proc, &fh, &vp); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhlookup returned %d\n", error)); if (error) return error; @@ -499,9 +499,9 @@ xfs_fhopen (d_thread_t *proc, #if defined(__FreeBSD_version) && __FreeBSD_version >= 300000 if (vp->v_type == VREG) { #ifdef HAVE_FREEBSD_THREAD - error = xfs_vfs_object_create(vp, proc, proc->td_proc->p_ucred); + error = nnpfs_vfs_object_create(vp, proc, proc->td_proc->p_ucred); #else - error = xfs_vfs_object_create(vp, proc, proc->p_ucred); + error = nnpfs_vfs_object_create(vp, proc, proc->p_ucred); #endif if (error) goto out; @@ -512,7 +512,7 @@ xfs_fhopen (d_thread_t *proc, fp->f_type = DTYPE_VNODE; fp->f_ops = &vnops; fp->f_data = (caddr_t)vp; - xfs_vfs_unlock(vp, proc); + nnpfs_vfs_unlock(vp, proc); *retval = index; #ifdef FILE_UNUSE FILE_UNUSE(fp, proc); @@ -522,7 +522,7 @@ xfs_fhopen (d_thread_t *proc, #endif return 0; out: - NNPFSDEB(XDEBVFOPS, ("xfs_fhopen: error = %d\n", error)); + NNPFSDEB(XDEBVFOPS, ("nnpfs_fhopen: error = %d\n", error)); vput(vp); return error; } diff --git a/sys/xfs/xfs_vfsops-bsd.h b/sys/nnpfs/nnpfs_vfsops-bsd.h index dfaa225df87..1d67f3d764b 100644 --- a/sys/xfs/xfs_vfsops-bsd.h +++ b/sys/nnpfs/nnpfs_vfsops-bsd.h @@ -31,35 +31,35 @@ * SUCH DAMAGE. */ -/* $arla: xfs_vfsops-bsd.h,v 1.14 2002/09/07 10:46:09 lha Exp $ */ +/* $arla: nnpfs_vfsops-bsd.h,v 1.14 2002/09/07 10:46:09 lha Exp $ */ -#ifndef _xfs_vfsops_bsd_h -#define _xfs_vfsops_bsd_h +#ifndef _nnpfs_vfsops_bsd_h +#define _nnpfs_vfsops_bsd_h int -xfs_mount_caddr(struct mount *mp, const char *user_path, caddr_t user_data, +nnpfs_mount_caddr(struct mount *mp, const char *user_path, caddr_t user_data, struct nameidata *ndp, d_thread_t *p); int -xfs_start(struct mount * mp, int flags, d_thread_t * p); +nnpfs_start(struct mount * mp, int flags, d_thread_t * p); int -xfs_unmount(struct mount * mp, int mntflags, d_thread_t *p); +nnpfs_unmount(struct mount * mp, int mntflags, d_thread_t *p); int -xfs_root(struct mount *mp, struct vnode **vpp); +nnpfs_root(struct mount *mp, struct vnode **vpp); int -xfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p); +nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p); int -xfs_statfs(struct mount *mp, struct statfs *sbp, d_thread_t *p); +nnpfs_statfs(struct mount *mp, struct statfs *sbp, d_thread_t *p); int -xfs_sync(struct mount *mp, int waitfor, struct ucred *cred, d_thread_t *p); +nnpfs_sync(struct mount *mp, int waitfor, struct ucred *cred, d_thread_t *p); int -xfs_vget(struct mount * mp, +nnpfs_vget(struct mount * mp, #ifdef __APPLE__ void *ino, #else @@ -69,12 +69,12 @@ xfs_vget(struct mount * mp, #ifdef HAVE_STRUCT_VFSOPS_VFS_CHECKEXP int -xfs_fhtovp(struct mount * mp, +nnpfs_fhtovp(struct mount * mp, struct fid * fhp, struct vnode ** vpp); #else int -xfs_fhtovp(struct mount * mp, +nnpfs_fhtovp(struct mount * mp, struct fid * fhp, struct mbuf * nam, struct vnode ** vpp, @@ -84,7 +84,7 @@ xfs_fhtovp(struct mount * mp, struct mbuf; int -xfs_checkexp (struct mount *mp, +nnpfs_checkexp (struct mount *mp, #ifdef __FreeBSD__ struct sockaddr *nam, #else @@ -94,10 +94,10 @@ xfs_checkexp (struct mount *mp, struct ucred **credanonp); int -xfs_vptofh(struct vnode * vp, +nnpfs_vptofh(struct vnode * vp, struct fid * fhp); int -xfs_dead_lookup(struct vop_lookup_args * ap); +nnpfs_dead_lookup(struct vop_lookup_args * ap); -#endif /* _xfs_vfsops_bsd_h */ +#endif /* _nnpfs_vfsops_bsd_h */ diff --git a/sys/xfs/xfs_vfsops-common.c b/sys/nnpfs/nnpfs_vfsops-common.c index b808910c4fc..a3a992453bd 100644 --- a/sys/xfs/xfs_vfsops-common.c +++ b/sys/nnpfs/nnpfs_vfsops-common.c @@ -31,21 +31,21 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> +#include <nnpfs/nnpfs_locl.h> -RCSID("$arla: xfs_vfsops-common.c,v 1.40 2003/06/02 18:26:40 lha Exp $"); +RCSID("$arla: nnpfs_vfsops-common.c,v 1.40 2003/06/02 18:26:40 lha Exp $"); /* * NNPFS vfs operations. */ -#include <xfs/xfs_common.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_syscalls.h> -#include <xfs/xfs_vfsops.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_syscalls.h> +#include <nnpfs/nnpfs_vfsops.h> #ifdef HAVE_KERNEL_UDEV2DEV #define VA_RDEV_TO_DEV(x) udev2dev(x, 0) /* XXX what is the 0 */ @@ -54,14 +54,14 @@ RCSID("$arla: xfs_vfsops-common.c,v 1.40 2003/06/02 18:26:40 lha Exp $"); #endif -struct xfs xfs[NNNPFS]; +struct nnpfs nnpfs[NNNPFS]; /* * path and data is in system memory */ int -xfs_mount_common_sys(struct mount *mp, +nnpfs_mount_common_sys(struct mount *mp, const char *path, void *data, struct nameidata *ndp, @@ -72,12 +72,12 @@ xfs_mount_common_sys(struct mount *mp, int error; struct vattr vat; - NNPFSDEB(XDEBVFOPS, ("xfs_mount: " + NNPFSDEB(XDEBVFOPS, ("nnpfs_mount: " "struct mount mp = %lx path = '%s' data = '%s'\n", (unsigned long)mp, path, (char *)data)); #ifdef ARLA_KNFS - NNPFSDEB(XDEBVFOPS, ("xfs_mount: mount flags = %x\n", mp->mnt_flag)); + NNPFSDEB(XDEBVFOPS, ("nnpfs_mount: mount flags = %x\n", mp->mnt_flag)); /* * mountd(8) flushes all export entries when it starts @@ -88,7 +88,7 @@ xfs_mount_common_sys(struct mount *mp, mp->mnt_flag & MNT_DELEXPORT) { NNPFSDEB(XDEBVFOPS, - ("xfs_mount: ignoring MNT_UPDATE or MNT_DELEXPORT\n")); + ("nnpfs_mount: ignoring MNT_UPDATE or MNT_DELEXPORT\n")); return 0; } #endif @@ -124,23 +124,23 @@ xfs_mount_common_sys(struct mount *mp, NNPFSDEB(XDEBVFOPS, ("dev = %d.%d\n", major(dev), minor(dev))); - if (!xfs_is_xfs_dev (dev)) { - NNPFSDEB(XDEBVFOPS, ("%s is not a xfs device\n", (char *)data)); + if (!nnpfs_is_nnpfs_dev (dev)) { + NNPFSDEB(XDEBVFOPS, ("%s is not a nnpfs device\n", (char *)data)); return ENXIO; } - if (xfs[minor(dev)].status & NNPFS_MOUNTED) + if (nnpfs[minor(dev)].status & NNPFS_MOUNTED) return EBUSY; - xfs[minor(dev)].status = NNPFS_MOUNTED; - xfs[minor(dev)].mp = mp; - xfs[minor(dev)].root = 0; - xfs[minor(dev)].nnodes = 0; - xfs[minor(dev)].fd = minor(dev); + nnpfs[minor(dev)].status = NNPFS_MOUNTED; + nnpfs[minor(dev)].mp = mp; + nnpfs[minor(dev)].root = 0; + nnpfs[minor(dev)].nnodes = 0; + nnpfs[minor(dev)].fd = minor(dev); - nnfs_init_head(&xfs[minor(dev)].nodehead); + nnfs_init_head(&nnpfs[minor(dev)].nodehead); - VFS_ASSIGN(mp, &xfs[minor(dev)]); + VFS_ASSIGN(mp, &nnpfs[minor(dev)]); #if defined(HAVE_KERNEL_VFS_GETNEWFSID) #if defined(HAVE_TWO_ARGUMENT_VFS_GETNEWFSID) vfs_getnewfsid(mp, MOUNT_AFS); @@ -180,7 +180,7 @@ xfs_mount_common_sys(struct mount *mp, sizeof(mp->mnt_stat.f_mntfromname)); strncpy(mp->mnt_stat.f_fstypename, - "xfs", + "nnpfs", sizeof(mp->mnt_stat.f_fstypename)); #endif /* __osf__ */ @@ -188,7 +188,7 @@ xfs_mount_common_sys(struct mount *mp, } int -xfs_mount_common(struct mount *mp, +nnpfs_mount_common(struct mount *mp, const char *user_path, void *user_data, struct nameidata *ndp, @@ -217,7 +217,7 @@ xfs_mount_common(struct mount *mp, error = copyinstr(user_data, data, MAXPATHLEN, &count); if (error) goto done; - error = xfs_mount_common_sys (mp, path, data, ndp, p); + error = nnpfs_mount_common_sys (mp, path, data, ndp, p); done: free(data, M_TEMP); free(path, M_TEMP); @@ -229,9 +229,9 @@ extern int doforce; #endif int -xfs_unmount_common(struct mount *mp, int mntflags) +nnpfs_unmount_common(struct mount *mp, int mntflags) { - struct xfs *xfsp = VFS_TO_NNPFS(mp); + struct nnpfs *nnpfsp = VFS_TO_NNPFS(mp); int flags = 0; int error; @@ -243,42 +243,42 @@ xfs_unmount_common(struct mount *mp, int mntflags) flags |= FORCECLOSE; } - error = free_all_xfs_nodes(xfsp, flags, 1); + error = free_all_nnpfs_nodes(nnpfsp, flags, 1); if (error) return error; - xfsp->status = 0; - NNPFS_TO_VFS(xfsp) = NULL; + nnpfsp->status = 0; + NNPFS_TO_VFS(nnpfsp) = NULL; return 0; } int -xfs_root_common(struct mount *mp, struct vnode **vpp, +nnpfs_root_common(struct mount *mp, struct vnode **vpp, d_thread_t *proc, struct ucred *cred) { - struct xfs *xfsp = VFS_TO_NNPFS(mp); - struct xfs_message_getroot msg; + struct nnpfs *nnpfsp = VFS_TO_NNPFS(mp); + struct nnpfs_message_getroot msg; int error; do { - if (xfsp->root != NULL) { - *vpp = XNODE_TO_VNODE(xfsp->root); - xfs_do_vget(*vpp, LK_EXCLUSIVE, proc); + if (nnpfsp->root != NULL) { + *vpp = XNODE_TO_VNODE(nnpfsp->root); + nnpfs_do_vget(*vpp, LK_EXCLUSIVE, proc); return 0; } msg.header.opcode = NNPFS_MSG_GETROOT; msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), proc); + msg.cred.pag = nnpfs_get_pag(cred); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), proc); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } while (error == 0); /* * Failed to get message through, need to pretend that all went well * and return a fake dead vnode to be able to unmount. */ - if ((error = xfs_make_dead_vnode(mp, vpp))) + if ((error = nnpfs_make_dead_vnode(mp, vpp))) return error; NNPFS_MAKE_VROOT(*vpp); diff --git a/sys/xfs/xfs_vfsops-openbsd.c b/sys/nnpfs/nnpfs_vfsops-openbsd.c index 6561487af30..e5a99b731c7 100644 --- a/sys/xfs/xfs_vfsops-openbsd.c +++ b/sys/nnpfs/nnpfs_vfsops-openbsd.c @@ -31,80 +31,80 @@ * SUCH DAMAGE. */ -#include <xfs/xfs_locl.h> +#include <nnpfs/nnpfs_locl.h> -RCSID("$arla: xfs_vfsops-openbsd.c,v 1.16 2003/06/02 18:26:50 lha Exp $"); +RCSID("$arla: nnpfs_vfsops-openbsd.c,v 1.16 2003/06/02 18:26:50 lha Exp $"); -#include <xfs/xfs_common.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_vfsops.h> -#include <xfs/xfs_vfsops-bsd.h> -#include <xfs/xfs_vnodeops.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_vfsops.h> +#include <nnpfs/nnpfs_vfsops-bsd.h> +#include <nnpfs/nnpfs_vnodeops.h> -static vop_t **xfs_dead_vnodeop_p; +static vop_t **nnpfs_dead_vnodeop_p; int -xfs_make_dead_vnode(struct mount *mp, struct vnode **vpp) +nnpfs_make_dead_vnode(struct mount *mp, struct vnode **vpp) { NNPFSDEB(XDEBNODE, ("make_dead_vnode mp = %lx\n", (unsigned long)mp)); - return getnewvnode(VT_NON, mp, xfs_dead_vnodeop_p, vpp); + return getnewvnode(VT_NON, mp, nnpfs_dead_vnodeop_p, vpp); } -static struct vnodeopv_entry_desc xfs_dead_vnodeop_entries[] = { - {&vop_default_desc, (vop_t *) xfs_eopnotsupp}, - {&vop_lookup_desc, (vop_t *) xfs_dead_lookup}, - {&vop_reclaim_desc, (vop_t *) xfs_returnzero}, +static struct vnodeopv_entry_desc nnpfs_dead_vnodeop_entries[] = { + {&vop_default_desc, (vop_t *) nnpfs_eopnotsupp}, + {&vop_lookup_desc, (vop_t *) nnpfs_dead_lookup}, + {&vop_reclaim_desc, (vop_t *) nnpfs_returnzero}, {&vop_lock_desc, (vop_t *) vop_generic_lock}, {&vop_unlock_desc, (vop_t *) vop_generic_unlock}, {&vop_islocked_desc,(vop_t *) vop_generic_islocked}, {NULL, NULL}}; -static struct vnodeopv_desc xfs_dead_vnodeop_opv_desc = -{&xfs_dead_vnodeop_p, xfs_dead_vnodeop_entries}; +static struct vnodeopv_desc nnpfs_dead_vnodeop_opv_desc = +{&nnpfs_dead_vnodeop_p, nnpfs_dead_vnodeop_entries}; -extern struct vnodeopv_desc xfs_vnodeop_opv_desc; +extern struct vnodeopv_desc nnpfs_vnodeop_opv_desc; static int -xfs_init(struct vfsconf *vfs) +nnpfs_init(struct vfsconf *vfs) { - NNPFSDEB(XDEBVFOPS, ("xfs_init\n")); - vfs_opv_init_explicit(&xfs_vnodeop_opv_desc); - vfs_opv_init_default(&xfs_vnodeop_opv_desc); - vfs_opv_init_explicit(&xfs_dead_vnodeop_opv_desc); - vfs_opv_init_default(&xfs_dead_vnodeop_opv_desc); + NNPFSDEB(XDEBVFOPS, ("nnpfs_init\n")); + vfs_opv_init_explicit(&nnpfs_vnodeop_opv_desc); + vfs_opv_init_default(&nnpfs_vnodeop_opv_desc); + vfs_opv_init_explicit(&nnpfs_dead_vnodeop_opv_desc); + vfs_opv_init_default(&nnpfs_dead_vnodeop_opv_desc); return 0; } -const struct vfsops xfs_vfsops = { +const struct vfsops nnpfs_vfsops = { #ifdef HAVE_STRUCT_VFSOPS_VFS_MOUNT - xfs_mount_common, + nnpfs_mount_common, #else - xfs_mount_caddr, + nnpfs_mount_caddr, #endif - xfs_start, - xfs_unmount, - xfs_root, - xfs_quotactl, - xfs_statfs, - xfs_sync, - xfs_vget, - xfs_fhtovp, - xfs_vptofh, - xfs_init, + nnpfs_start, + nnpfs_unmount, + nnpfs_root, + nnpfs_quotactl, + nnpfs_statfs, + nnpfs_sync, + nnpfs_vget, + nnpfs_fhtovp, + nnpfs_vptofh, + nnpfs_init, NULL, #ifdef HAVE_STRUCT_VFSOPS_VFS_CHECKEXP - xfs_checkexp, /* checkexp */ + nnpfs_checkexp, /* checkexp */ #endif }; -static struct vfsconf xfs_vfc = { - &xfs_vfsops, - "xfs", +static struct vfsconf nnpfs_vfc = { + &nnpfs_vfsops, + "nnpfs", 0, 0, 0, @@ -172,19 +172,19 @@ vfs_unregister (struct vfsconf *vfs) #endif int -xfs_install_filesys(void) +nnpfs_install_filesys(void) { - return vfs_register (&xfs_vfc); + return vfs_register (&nnpfs_vfc); } int -xfs_uninstall_filesys(void) +nnpfs_uninstall_filesys(void) { - return vfs_unregister (&xfs_vfc); + return vfs_unregister (&nnpfs_vfc); } int -xfs_stat_filesys (void) +nnpfs_stat_filesys (void) { return 0; } diff --git a/sys/xfs/xfs_vfsops.h b/sys/nnpfs/nnpfs_vfsops.h index feb057ef145..717745bb98d 100644 --- a/sys/xfs/xfs_vfsops.h +++ b/sys/nnpfs/nnpfs_vfsops.h @@ -31,45 +31,45 @@ * SUCH DAMAGE. */ -/* $arla: xfs_vfsops.h,v 1.17 2003/06/02 18:27:10 lha Exp $ */ +/* $arla: nnpfs_vfsops.h,v 1.17 2003/06/02 18:27:10 lha Exp $ */ -#ifndef _xfs_vfsops_h -#define _xfs_vfsops_h +#ifndef _nnpfs_vfsops_h +#define _nnpfs_vfsops_h int -xfs_mount_common(struct mount *mp, +nnpfs_mount_common(struct mount *mp, const char *user_path, void *user_data, struct nameidata *ndp, d_thread_t *p); int -xfs_mount_common_sys(struct mount *mp, +nnpfs_mount_common_sys(struct mount *mp, const char *path, void *data, struct nameidata *ndp, d_thread_t *p); int -xfs_unmount_common(struct mount *mp, int mntflags); +nnpfs_unmount_common(struct mount *mp, int mntflags); int -xfs_root_common(struct mount *mp, +nnpfs_root_common(struct mount *mp, struct vnode **vpp, d_thread_t *proc, struct ucred *cred); int -xfs_fhlookup (d_thread_t *proc, - struct xfs_fhandle_t *fhp, +nnpfs_fhlookup (d_thread_t *proc, + struct nnpfs_fhandle_t *fhp, struct vnode **vpp); int -xfs_fhopen (d_thread_t *proc, - struct xfs_fhandle_t *fhp, +nnpfs_fhopen (d_thread_t *proc, + struct nnpfs_fhandle_t *fhp, int flags, register_t *retval); -int xfs_make_dead_vnode(struct mount *mp, struct vnode **vpp); +int nnpfs_make_dead_vnode(struct mount *mp, struct vnode **vpp); -#endif /* _xfs_vfsops_h */ +#endif /* _nnpfs_vfsops_h */ diff --git a/sys/xfs/xfs_vnodeops-bsd.c b/sys/nnpfs/nnpfs_vnodeops-bsd.c index 3256b1c0160..7e740d3f8f5 100644 --- a/sys/xfs/xfs_vnodeops-bsd.c +++ b/sys/nnpfs/nnpfs_vnodeops-bsd.c @@ -39,21 +39,21 @@ #define MACH_KERNEL 1 #endif -#include <xfs/xfs_locl.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_common.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_syscalls.h> -#include <xfs/xfs_vnodeops.h> +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_syscalls.h> +#include <nnpfs/nnpfs_vnodeops.h> #ifdef HAVE_VM_VNODE_PAGER_H #include <vm/vnode_pager.h> #endif #include <sys/pool.h> -RCSID("$arla: xfs_vnodeops-bsd.c,v 1.123 2003/02/15 16:40:36 lha Exp $"); +RCSID("$arla: nnpfs_vnodeops-bsd.c,v 1.123 2003/02/15 16:40:36 lha Exp $"); /* * vnode functions @@ -61,7 +61,7 @@ RCSID("$arla: xfs_vnodeops-bsd.c,v 1.123 2003/02/15 16:40:36 lha Exp $"); #ifdef HAVE_VOP_OPEN int -xfs_open(struct vop_open_args * ap) +nnpfs_open(struct vop_open_args * ap) /* struct vop_open { struct vnode *vp; @@ -71,16 +71,16 @@ xfs_open(struct vop_open_args * ap) }; */ { #ifdef HAVE_FREEBSD_THREAD - return xfs_open_common (ap->a_vp, ap->a_mode, ap->a_cred, ap->a_td); + return nnpfs_open_common (ap->a_vp, ap->a_mode, ap->a_cred, ap->a_td); #else - return xfs_open_common (ap->a_vp, ap->a_mode, ap->a_cred, ap->a_p); + return nnpfs_open_common (ap->a_vp, ap->a_mode, ap->a_cred, ap->a_p); #endif } #endif /* HAVE_VOP_OPEN */ #ifdef HAVE_VOP_FSYNC int -xfs_fsync(struct vop_fsync_args * ap) +nnpfs_fsync(struct vop_fsync_args * ap) /* vop_fsync { struct vnode *vp; @@ -90,12 +90,12 @@ xfs_fsync(struct vop_fsync_args * ap) }; */ { #ifdef HAVE_STRUCT_VOP_FSYNC_ARGS_A_FLAGS - return xfs_fsync_common(ap->a_vp, ap->a_cred, ap->a_flags, ap->a_p); + return nnpfs_fsync_common(ap->a_vp, ap->a_cred, ap->a_flags, ap->a_p); #else #ifdef HAVE_FREEBSD_THREAD - return xfs_fsync_common(ap->a_vp, ap->a_cred, ap->a_waitfor, ap->a_td); + return nnpfs_fsync_common(ap->a_vp, ap->a_cred, ap->a_waitfor, ap->a_td); #else - return xfs_fsync_common(ap->a_vp, ap->a_cred, ap->a_waitfor, ap->a_p); + return nnpfs_fsync_common(ap->a_vp, ap->a_cred, ap->a_waitfor, ap->a_p); #endif #endif } @@ -103,7 +103,7 @@ xfs_fsync(struct vop_fsync_args * ap) #ifdef HAVE_VOP_CLOSE int -xfs_close(struct vop_close_args * ap) +nnpfs_close(struct vop_close_args * ap) /* vop_close { IN struct vnode *vp; IN int fflag; @@ -112,16 +112,16 @@ xfs_close(struct vop_close_args * ap) }; */ { #ifdef HAVE_FREEBSD_THREAD - return xfs_close_common(ap->a_vp, ap->a_fflag, ap->a_td, ap->a_cred); + return nnpfs_close_common(ap->a_vp, ap->a_fflag, ap->a_td, ap->a_cred); #else - return xfs_close_common(ap->a_vp, ap->a_fflag, ap->a_p, ap->a_cred); + return nnpfs_close_common(ap->a_vp, ap->a_fflag, ap->a_p, ap->a_cred); #endif } #endif /* HAVE_VOP_CLOSE */ #ifdef HAVE_VOP_READ int -xfs_read(struct vop_read_args * ap) +nnpfs_read(struct vop_read_args * ap) /* vop_read { IN struct vnode *vp; INOUT struct uio *uio; @@ -129,13 +129,13 @@ xfs_read(struct vop_read_args * ap) IN struct ucred *cred; }; */ { - return xfs_read_common(ap->a_vp, ap->a_uio, ap->a_ioflag, ap->a_cred); + return nnpfs_read_common(ap->a_vp, ap->a_uio, ap->a_ioflag, ap->a_cred); } #endif /* HAVE_VOP_READ */ #ifdef HAVE_VOP_WRITE int -xfs_write(struct vop_write_args * ap) +nnpfs_write(struct vop_write_args * ap) /* vop_write { IN struct vnode *vp; INOUT struct uio *uio; @@ -143,20 +143,20 @@ xfs_write(struct vop_write_args * ap) IN struct ucred *cred; }; */ { - return xfs_write_common(ap->a_vp, ap->a_uio, ap->a_ioflag, ap->a_cred); + return nnpfs_write_common(ap->a_vp, ap->a_uio, ap->a_ioflag, ap->a_cred); } #endif /* HAVE_VOP_WRITE */ #ifdef HAVE_VOP_IOCTL int -xfs_ioctl(struct vop_ioctl_args * ap) +nnpfs_ioctl(struct vop_ioctl_args * ap) /* struct vnode *vp, int com, caddr_t data, int flag, struct ucred *cred) */ { - NNPFSDEB(XDEBVNOPS, ("xfs_ioctl\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_ioctl\n")); return EOPNOTSUPP; } @@ -164,12 +164,12 @@ xfs_ioctl(struct vop_ioctl_args * ap) #ifdef HAVE_VOP_SELECT int -xfs_select(struct vop_select_args * ap) +nnpfs_select(struct vop_select_args * ap) /* struct vnode *vp, int which, struct ucred *cred ) */ { - NNPFSDEB(XDEBVNOPS, ("xfs_select\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_select\n")); return EOPNOTSUPP; } @@ -177,7 +177,7 @@ xfs_select(struct vop_select_args * ap) #ifdef HAVE_VOP_SEEK int -xfs_seek(struct vop_seek_args * ap) +nnpfs_seek(struct vop_seek_args * ap) /* struct vop_seek_args { struct vnodeop_desc *a_desc; @@ -188,44 +188,44 @@ struct vop_seek_args { }; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_seek\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_seek\n")); return 0; } #endif /* HAVE_VOP_SEEK */ #ifdef HAVE_VOP_POLL int -xfs_poll(struct vop_poll_args * ap) +nnpfs_poll(struct vop_poll_args * ap) /* vop_poll { IN struct vnode *vp; IN int events; IN struct proc *p; }; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_poll\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_poll\n")); return EOPNOTSUPP; } #endif /* HAVE_VOP_POLL */ #ifdef HAVE_VOP_GETATTR int -xfs_getattr(struct vop_getattr_args * ap) +nnpfs_getattr(struct vop_getattr_args * ap) /* struct vnode *vp, struct vattr *vap, struct ucred *cred, struct proc *p) */ { #ifdef HAVE_FREEBSD_THREAD - return xfs_getattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_td); + return nnpfs_getattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_td); #else - return xfs_getattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_p); + return nnpfs_getattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_p); #endif } #endif /* HAVE_VOP_GETATTR */ #ifdef HAVE_VOP_SETATTR int -xfs_setattr(struct vop_setattr_args * ap) +nnpfs_setattr(struct vop_setattr_args * ap) /* struct vnode *vp, struct vattr *vap, struct ucred *cred, @@ -233,16 +233,16 @@ xfs_setattr(struct vop_setattr_args * ap) */ { #ifdef HAVE_FREEBSD_THREAD - return xfs_setattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_td); + return nnpfs_setattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_td); #else - return xfs_setattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_p); + return nnpfs_setattr_common(ap->a_vp, ap->a_vap, ap->a_cred, ap->a_p); #endif } #endif /* HAVE_VOP_SETATTR */ #ifdef HAVE_VOP_ACCESS int -xfs_access(struct vop_access_args * ap) +nnpfs_access(struct vop_access_args * ap) /* struct vnode *vp, int mode, @@ -251,16 +251,16 @@ struct vnode *vp, */ { #ifdef HAVE_FREEBSD_THREAD - return xfs_access_common(ap->a_vp, ap->a_mode, ap->a_cred, ap->a_td); + return nnpfs_access_common(ap->a_vp, ap->a_mode, ap->a_cred, ap->a_td); #else - return xfs_access_common(ap->a_vp, ap->a_mode, ap->a_cred, ap->a_p); + return nnpfs_access_common(ap->a_vp, ap->a_mode, ap->a_cred, ap->a_p); #endif } #endif /* HAVE_VOP_ACCESS */ #ifdef HAVE_VOP_LOOKUP int -xfs_lookup(struct vop_lookup_args * ap) +nnpfs_lookup(struct vop_lookup_args * ap) /* struct vop_lookup_args { struct vnodeop_desc *a_desc; struct vnode *a_dvp; @@ -273,7 +273,7 @@ xfs_lookup(struct vop_lookup_args * ap) int lockparent = (cnp->cn_flags & (LOCKPARENT | ISLASTCN)) == (LOCKPARENT | ISLASTCN); - NNPFSDEB(XDEBVNOPS, ("xfs_lookup: (%s, %ld), nameiop = %lu, flags = %lu\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup: (%s, %ld), nameiop = %lu, flags = %lu\n", cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_nameiop, @@ -283,7 +283,7 @@ xfs_lookup(struct vop_lookup_args * ap) cnp->cn_flags &= ~PDIRUNLOCK; #endif - error = xfs_lookup_common(ap->a_dvp, cnp, ap->a_vpp); + error = nnpfs_lookup_common(ap->a_dvp, cnp, ap->a_vpp); if (error == ENOENT && (cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME) @@ -301,9 +301,9 @@ xfs_lookup(struct vop_lookup_args * ap) /* if we isn't last component and is isn't requested, * return parent unlocked */ #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_unlock (ap->a_dvp, xfs_cnp_to_thread(cnp)); + nnpfs_vfs_unlock (ap->a_dvp, nnpfs_cnp_to_thread(cnp)); #else - xfs_vfs_unlock (ap->a_dvp, xfs_cnp_to_proc(cnp)); + nnpfs_vfs_unlock (ap->a_dvp, nnpfs_cnp_to_proc(cnp)); #endif #ifdef PDIRUNLOCK cnp->cn_flags |= PDIRUNLOCK; @@ -313,7 +313,7 @@ xfs_lookup(struct vop_lookup_args * ap) /* in case of a error do nothing */ } - NNPFSDEB(XDEBVNOPS, ("xfs_lookup: error = %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup: error = %d\n", error)); return error; } @@ -321,7 +321,7 @@ xfs_lookup(struct vop_lookup_args * ap) #ifdef HAVE_VOP_CACHEDLOOKUP int -xfs_cachedlookup(struct vop_cachedlookup_args * ap) +nnpfs_cachedlookup(struct vop_cachedlookup_args * ap) /* struct vop_cachedlookup_args { struct vnodeop_desc *a_desc; struct vnode *a_dvp; @@ -329,7 +329,7 @@ xfs_cachedlookup(struct vop_cachedlookup_args * ap) struct componentname *a_cnp; }; */ { - return xfs_lookup((struct vop_lookup_args *)ap); + return nnpfs_lookup((struct vop_lookup_args *)ap); } #endif /* HAVE_VOP_CACHEDLOOKUP */ @@ -362,23 +362,23 @@ cleanup_cnp (struct componentname *cnp, int error) #ifdef HAVE_VOP_CREATE int -xfs_create(struct vop_create_args *ap) +nnpfs_create(struct vop_create_args *ap) { struct vnode *dvp = ap->a_dvp; struct componentname *cnp = ap->a_cnp; const char *name = cnp->cn_nameptr; struct ucred *cred = cnp->cn_cred; #ifdef HAVE_FREEBSD_THREAD - d_thread_t *p = xfs_cnp_to_thread(cnp); + d_thread_t *p = nnpfs_cnp_to_thread(cnp); #else - d_thread_t *p = xfs_cnp_to_proc(cnp); + d_thread_t *p = nnpfs_cnp_to_proc(cnp); #endif int error; - error = xfs_create_common(dvp, name, ap->a_vap, cred, p); + error = nnpfs_create_common(dvp, name, ap->a_vap, cred, p); if (error == 0) { - error = xfs_lookup_common(dvp, cnp, ap->a_vpp); + error = nnpfs_lookup_common(dvp, cnp, ap->a_vpp); } cleanup_cnp (cnp, error); @@ -387,7 +387,7 @@ xfs_create(struct vop_create_args *ap) vput (dvp); #endif - NNPFSDEB(XDEBVNOPS, ("xfs_create: error = %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_create: error = %d\n", error)); return error; } @@ -395,7 +395,7 @@ xfs_create(struct vop_create_args *ap) #ifdef HAVE_VOP_REMOVE int -xfs_remove(struct vop_remove_args * ap) +nnpfs_remove(struct vop_remove_args * ap) /* struct vnode *dvp, struct vnode *vp, struct componentname *cnp */ @@ -405,11 +405,11 @@ xfs_remove(struct vop_remove_args * ap) struct vnode *vp = ap->a_vp; #ifdef HAVE_FREEBSD_THREAD - int error = xfs_remove_common(dvp, vp, cnp->cn_nameptr, - cnp->cn_cred, xfs_cnp_to_thread(cnp)); + int error = nnpfs_remove_common(dvp, vp, cnp->cn_nameptr, + cnp->cn_cred, nnpfs_cnp_to_thread(cnp)); #else - int error = xfs_remove_common(dvp, vp, cnp->cn_nameptr, - cnp->cn_cred, xfs_cnp_to_proc(cnp)); + int error = nnpfs_remove_common(dvp, vp, cnp->cn_nameptr, + cnp->cn_cred, nnpfs_cnp_to_proc(cnp)); #endif cleanup_cnp (cnp, error); @@ -438,7 +438,7 @@ xfs_remove(struct vop_remove_args * ap) #ifdef HAVE_VOP_RENAME int -xfs_rename(struct vop_rename_args * ap) +nnpfs_rename(struct vop_rename_args * ap) /* vop_rename { IN WILLRELE struct vnode *fdvp; IN WILLRELE struct vnode *fvp; @@ -453,7 +453,7 @@ xfs_rename(struct vop_rename_args * ap) struct vnode *fdvp = ap->a_fdvp; struct vnode *fvp = ap->a_fvp; - int error = xfs_rename_common(fdvp, + int error = nnpfs_rename_common(fdvp, fvp, ap->a_fcnp->cn_nameptr, tdvp, @@ -461,9 +461,9 @@ xfs_rename(struct vop_rename_args * ap) ap->a_tcnp->cn_nameptr, ap->a_tcnp->cn_cred, #ifdef HAVE_FREEBSD_THREAD - xfs_cnp_to_thread (ap->a_fcnp)); + nnpfs_cnp_to_thread (ap->a_fcnp)); #else - xfs_cnp_to_proc (ap->a_fcnp)); + nnpfs_cnp_to_proc (ap->a_fcnp)); #endif if(tdvp == tvp) vrele(tdvp); @@ -479,7 +479,7 @@ xfs_rename(struct vop_rename_args * ap) #ifdef HAVE_VOP_MKDIR int -xfs_mkdir(struct vop_mkdir_args * ap) +nnpfs_mkdir(struct vop_mkdir_args * ap) /* struct vnode *dvp, char *nm, struct vattr *va, @@ -491,16 +491,16 @@ xfs_mkdir(struct vop_mkdir_args * ap) const char *name = cnp->cn_nameptr; struct ucred *cred = cnp->cn_cred; #ifdef HAVE_FREEBSD_THREAD - d_thread_t *p = xfs_cnp_to_thread(cnp); + d_thread_t *p = nnpfs_cnp_to_thread(cnp); #else - d_thread_t *p = xfs_cnp_to_proc(cnp); + d_thread_t *p = nnpfs_cnp_to_proc(cnp); #endif int error; - error = xfs_mkdir_common(dvp, name, ap->a_vap, cred, p); + error = nnpfs_mkdir_common(dvp, name, ap->a_vap, cred, p); if (error == 0) - error = xfs_lookup_common(dvp, cnp, ap->a_vpp); + error = nnpfs_lookup_common(dvp, cnp, ap->a_vpp); cleanup_cnp (cnp, error); @@ -508,7 +508,7 @@ xfs_mkdir(struct vop_mkdir_args * ap) vput(dvp); #endif - NNPFSDEB(XDEBVNOPS, ("xfs_mkdir: error = %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_mkdir: error = %d\n", error)); return error; } @@ -516,7 +516,7 @@ xfs_mkdir(struct vop_mkdir_args * ap) #ifdef HAVE_VOP_RMDIR int -xfs_rmdir(struct vop_rmdir_args * ap) +nnpfs_rmdir(struct vop_rmdir_args * ap) /* struct vnode *dvp, struct vnode *vp, struct componentname *cnp */ @@ -524,13 +524,13 @@ xfs_rmdir(struct vop_rmdir_args * ap) struct componentname *cnp = ap->a_cnp; struct vnode *dvp = ap->a_dvp; struct vnode *vp = ap->a_vp; - int error = xfs_rmdir_common(ap->a_dvp, ap->a_vp, + int error = nnpfs_rmdir_common(ap->a_dvp, ap->a_vp, cnp->cn_nameptr, cnp->cn_cred, #ifdef HAVE_FREEBSD_THREAD - xfs_cnp_to_thread(cnp)); + nnpfs_cnp_to_thread(cnp)); #else - xfs_cnp_to_proc(cnp)); + nnpfs_cnp_to_proc(cnp)); #endif cleanup_cnp (cnp, error); @@ -549,15 +549,15 @@ xfs_rmdir(struct vop_rmdir_args * ap) #ifdef HAVE_VOP_READDIR #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) -typedef u_long xfs_cookie_t; +typedef u_long nnpfs_cookie_t; #elif defined(__NetBSD__) -typedef off_t xfs_cookie_t; +typedef off_t nnpfs_cookie_t; #else #error dunno want kind of cookies you have #endif int -xfs_readdir(struct vop_readdir_args * ap) +nnpfs_readdir(struct vop_readdir_args * ap) /* struct vnode *vp, struct uio *uiop, struct ucred *cred) */ @@ -567,11 +567,11 @@ xfs_readdir(struct vop_readdir_args * ap) off = ap->a_uio->uio_offset; - error = xfs_readdir_common(ap->a_vp, ap->a_uio, ap->a_cred, + error = nnpfs_readdir_common(ap->a_vp, ap->a_uio, ap->a_cred, #ifdef HAVE_FREEBSD_THREAD - xfs_uio_to_thread (ap->a_uio), + nnpfs_uio_to_thread (ap->a_uio), #else - xfs_uio_to_proc (ap->a_uio), + nnpfs_uio_to_proc (ap->a_uio), #endif ap->a_eofflag); @@ -579,10 +579,10 @@ xfs_readdir(struct vop_readdir_args * ap) struct uio *uio = ap->a_uio; const struct dirent *dp, *dp_start, *dp_end; int ncookies; - xfs_cookie_t *cookies, *cookiep; + nnpfs_cookie_t *cookies, *cookiep; if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1) - panic("xfs_readdir: mail arla-drinkers and tell them to bake burned cookies"); + panic("nnpfs_readdir: mail arla-drinkers and tell them to bake burned cookies"); dp = (const struct dirent *) ((const char *)uio->uio_iov->iov_base - (uio->uio_offset - off)); @@ -595,7 +595,7 @@ xfs_readdir(struct vop_readdir_args * ap) ncookies++; } - cookies = malloc(ncookies * sizeof(xfs_cookie_t), M_TEMP, M_WAITOK); + cookies = malloc(ncookies * sizeof(nnpfs_cookie_t), M_TEMP, M_WAITOK); for (dp = dp_start, cookiep = cookies; dp < dp_end; dp = (const struct dirent *)((const char *) dp + dp->d_reclen)) { @@ -613,7 +613,7 @@ xfs_readdir(struct vop_readdir_args * ap) #ifdef HAVE_VOP_LINK int -xfs_link(struct vop_link_args * ap) +nnpfs_link(struct vop_link_args * ap) /* WILLRELE struct vnode *tdvp; struct vnode *vp; @@ -655,7 +655,7 @@ xfs_link(struct vop_link_args * ap) /* FreeBSD 5.0 doesn't need to lock the vnode in VOP_LINK */ #if !defined(__FreeBSD_version) || __FreeBSD_version < 500043 - if (dvp != vp && (error = xfs_vfs_writelock(vp, p))) { + if (dvp != vp && (error = nnpfs_vfs_writelock(vp, p))) { #ifdef HAVE_VOP_ABORTOP VOP_ABORTOP(dvp, cnp); #endif @@ -663,21 +663,21 @@ xfs_link(struct vop_link_args * ap) } #endif /* defined(__FreeBSD_version) || __FreeBSD_version < 500043 */ - error = xfs_link_common( + error = nnpfs_link_common( dvp, vp, cnp->cn_nameptr, cnp->cn_cred, #ifdef HAVE_FREEBSD_THREAD - xfs_cnp_to_thread (cnp)); + nnpfs_cnp_to_thread (cnp)); #else - xfs_cnp_to_proc (cnp)); + nnpfs_cnp_to_proc (cnp)); #endif cleanup_cnp (cnp, error); if (dvp != vp) - xfs_vfs_unlock(vp, p); + nnpfs_vfs_unlock(vp, p); out: #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) @@ -690,7 +690,7 @@ out: #ifdef HAVE_VOP_SYMLINK int -xfs_symlink(struct vop_symlink_args * ap) +nnpfs_symlink(struct vop_symlink_args * ap) /* IN WILLRELE struct vnode *dvp; OUT WILLRELE struct vnode **vpp; @@ -703,14 +703,14 @@ xfs_symlink(struct vop_symlink_args * ap) struct vnode *dvp = ap->a_dvp; struct vnode **vpp = ap->a_vpp; - int error = xfs_symlink_common(dvp, + int error = nnpfs_symlink_common(dvp, vpp, cnp, ap->a_vap, ap->a_target); if (error == 0) { - error = xfs_lookup_common(dvp, cnp, vpp); + error = nnpfs_lookup_common(dvp, cnp, vpp); if (error == 0) vput (*vpp); } @@ -725,32 +725,32 @@ xfs_symlink(struct vop_symlink_args * ap) #ifdef HAVE_VOP_READLINK int -xfs_readlink(struct vop_readlink_args * ap) +nnpfs_readlink(struct vop_readlink_args * ap) /* struct vnode *vp, struct uio *uiop, struct ucred *cred) */ { - return xfs_readlink_common(ap->a_vp, ap->a_uio, ap->a_cred); + return nnpfs_readlink_common(ap->a_vp, ap->a_uio, ap->a_cred); } #endif /* HAVE_VOP_READLINK */ #ifdef HAVE_VOP_INACTIVE int -xfs_inactive(struct vop_inactive_args * ap) +nnpfs_inactive(struct vop_inactive_args * ap) /*struct vnode *vp, struct ucred *cred)*/ { #ifdef HAVE_FREEBSD_THREAD - return xfs_inactive_common(ap->a_vp, xfs_curthread()); + return nnpfs_inactive_common(ap->a_vp, nnpfs_curthread()); #else - return xfs_inactive_common(ap->a_vp, xfs_curproc()); + return nnpfs_inactive_common(ap->a_vp, nnpfs_curproc()); #endif } #endif /* HAVE_VOP_INACTICE */ #ifdef HAVE_VOP_RECLAIM int -xfs_reclaim(struct vop_reclaim_args * ap) +nnpfs_reclaim(struct vop_reclaim_args * ap) /*struct vop_reclaim_args { struct vnodeop_desc *a_desc; struct vnode *a_vp; @@ -759,7 +759,7 @@ xfs_reclaim(struct vop_reclaim_args * ap) struct vnode *vp = ap->a_vp; int ret; - ret = xfs_reclaim_common(vp); + ret = nnpfs_reclaim_common(vp); vp->v_data = NULL; return ret; } @@ -773,26 +773,26 @@ xfs_reclaim(struct vop_reclaim_args * ap) #ifdef HAVE_VOP_LOCK int -xfs_lock(struct vop_lock_args * ap) +nnpfs_lock(struct vop_lock_args * ap) { struct vnode *vp = ap->a_vp; - struct xfs_node *xn = VNODE_TO_XNODE(vp); - xfs_vnode_lock *l = &xn->lock; + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); + nnpfs_vnode_lock *l = &xn->lock; int flags = ap->a_flags; int ret; - NNPFSDEB(XDEBVNOPS, ("xfs_lock: %lx, flags 0x%x\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_lock: %lx, flags 0x%x\n", (unsigned long)vp, flags)); if (l == NULL) - panic("xfs_lock: lock NULL"); + panic("nnpfs_lock: lock NULL"); - NNPFSDEB(XDEBVNOPS, ("xfs_lock before: lk flags: %d share: %d " + NNPFSDEB(XDEBVNOPS, ("nnpfs_lock before: lk flags: %d share: %d " "wait: %d excl: %d holder: 0x%llx\n", l->lk_flags, l->lk_sharecount, l->lk_waitcount, l->lk_exclusivecount, (unsigned long long) - (xfs_uintptr_t)l->lk_lockholder)); + (nnpfs_uintptr_t)l->lk_lockholder)); #ifndef DEBUG_LOCKS #ifdef HAVE_FOUR_ARGUMENT_LOCKMGR @@ -807,47 +807,47 @@ xfs_lock(struct vop_lock_args * ap) #else #ifdef HAVE_FREEBSD_THREAD ret = debuglockmgr(l, flags, &vp->v_interlock, ap->a_td, - "xfs_lock", ap->a_vp->filename, ap->a_vp->line); + "nnpfs_lock", ap->a_vp->filename, ap->a_vp->line); #else ret = debuglockmgr(l, flags, &vp->v_interlock, ap->a_p, - "xfs_lock", ap->a_vp->filename, ap->a_vp->line); + "nnpfs_lock", ap->a_vp->filename, ap->a_vp->line); #endif #endif - NNPFSDEB(XDEBVNOPS, ("xfs_lock: lk flags: %d share: %d " + NNPFSDEB(XDEBVNOPS, ("nnpfs_lock: lk flags: %d share: %d " "wait: %d excl: %d holder: 0x%llx\n", l->lk_flags, l->lk_sharecount, l->lk_waitcount, l->lk_exclusivecount, (unsigned long long) - (xfs_uintptr_t)l->lk_lockholder)); + (nnpfs_uintptr_t)l->lk_lockholder)); return ret; } #endif /* HAVE_VOP_LOCK */ #ifdef HAVE_VOP_UNLOCK int -xfs_unlock(struct vop_unlock_args * ap) +nnpfs_unlock(struct vop_unlock_args * ap) { struct vnode *vp = ap->a_vp; - struct xfs_node *xn = VNODE_TO_XNODE(vp); - xfs_vnode_lock *l = &xn->lock; + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); + nnpfs_vnode_lock *l = &xn->lock; int flags = ap->a_flags; int ret; if (l == NULL) - panic("xfs_unlock: lock NULL"); + panic("nnpfs_unlock: lock NULL"); NNPFSDEB(XDEBVNOPS, - ("xfs_unlock: %lx, flags 0x%x, l %lx, ap %lx\n", + ("nnpfs_unlock: %lx, flags 0x%x, l %lx, ap %lx\n", (unsigned long)vp, flags, (unsigned long)l, (unsigned long)ap)); - NNPFSDEB(XDEBVNOPS, ("xfs_unlock: lk flags: %d share: %d " + NNPFSDEB(XDEBVNOPS, ("nnpfs_unlock: lk flags: %d share: %d " "wait: %d excl: %d holder: 0x%lld\n", l->lk_flags, l->lk_sharecount, l->lk_waitcount, l->lk_exclusivecount, (unsigned long long) - (xfs_uintptr_t)l->lk_lockholder)); + (nnpfs_uintptr_t)l->lk_lockholder)); #ifndef DEBUG_LOCKS #ifdef HAVE_FOUR_ARGUMENT_LOCKMGR #ifdef HAVE_FREEBSD_THREAD @@ -861,26 +861,26 @@ xfs_unlock(struct vop_unlock_args * ap) #else #ifdef HAVE_FREEBSD_THREAD ret = debuglockmgr (l, flags | LK_RELEASE, &vp->v_interlock, ap->a_td, - "xfs_lock", ap->a_vp->filename, ap->a_vp->line); + "nnpfs_lock", ap->a_vp->filename, ap->a_vp->line); #else ret = debuglockmgr (l, flags | LK_RELEASE, &vp->v_interlock, ap->a_p, - "xfs_lock", ap->a_vp->filename, ap->a_vp->line); + "nnpfs_lock", ap->a_vp->filename, ap->a_vp->line); #endif #endif - NNPFSDEB(XDEBVNOPS, ("xfs_unlock: return %d\n", ret)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_unlock: return %d\n", ret)); return ret; } #endif /* HAVE_VOP_UNLOCK */ #ifdef HAVE_VOP_ISLOCKED int -xfs_islocked (struct vop_islocked_args *ap) +nnpfs_islocked (struct vop_islocked_args *ap) { struct vnode *vp = ap->a_vp; - struct xfs_node *xn = VNODE_TO_XNODE(vp); - xfs_vnode_lock *l = &xn->lock; + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); + nnpfs_vnode_lock *l = &xn->lock; - NNPFSDEB(XDEBVNOPS, ("xfs_islocked: %lx\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_islocked: %lx\n", (unsigned long)vp)); #if defined(HAVE_TWO_ARGUMENT_LOCKSTATUS) @@ -901,17 +901,17 @@ xfs_islocked (struct vop_islocked_args *ap) #ifdef HAVE_VOP_LOCK int -xfs_lock(struct vop_lock_args * ap) +nnpfs_lock(struct vop_lock_args * ap) { struct vnode *vp = ap->a_vp; - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); - NNPFSDEB(XDEBVNOPS, ("xfs_lock: %lx, %d\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_lock: %lx, %d\n", (unsigned long)vp, xn->vnlocks)); while (vp->v_flag & VXLOCK) { vp->v_flag |= VXWANT; - (void) tsleep((caddr_t)vp, PINOD, "xfs_vnlock", 0); + (void) tsleep((caddr_t)vp, PINOD, "nnpfs_vnlock", 0); } if (vp->v_tag == VT_NON) return (ENOENT); @@ -922,19 +922,19 @@ xfs_lock(struct vop_lock_args * ap) #ifdef HAVE_VOP_UNLOCK int -xfs_unlock(struct vop_unlock_args * ap) +nnpfs_unlock(struct vop_unlock_args * ap) { struct vnode *vp = ap->a_vp; - struct xfs_node *xn = VNODE_TO_XNODE(vp); - NNPFSDEB(XDEBVNOPS, ("xfs_unlock: %lx, %d\n", + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); + NNPFSDEB(XDEBVNOPS, ("nnpfs_unlock: %lx, %d\n", (unsigned long)vp, xn->vnlocks)); --xn->vnlocks; if (xn->vnlocks < 0) { - printf ("PANIC: xfs_unlock: unlocking unlocked\n"); + printf ("PANIC: nnpfs_unlock: unlocking unlocked\n"); xn->vnlocks = 0; } - NNPFSDEB(XDEBVNOPS, ("xfs_unlock: return\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_unlock: return\n")); return 0; } @@ -942,12 +942,12 @@ xfs_unlock(struct vop_unlock_args * ap) #ifdef HAVE_VOP_ISLOCKED int -xfs_islocked (struct vop_islocked_args *ap) +nnpfs_islocked (struct vop_islocked_args *ap) { struct vnode *vp = ap->a_vp; - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); - NNPFSDEB(XDEBVNOPS, ("xfs_islocked: %lx, %d\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_islocked: %lx, %d\n", (unsigned long)vp, xn->vnlocks)); return xn->vnlocks; @@ -957,7 +957,7 @@ xfs_islocked (struct vop_islocked_args *ap) #ifdef HAVE_VOP_ABORTOP int -xfs_abortop (struct vop_abortop_args *ap) +nnpfs_abortop (struct vop_abortop_args *ap) /* struct vnode *dvp; struct componentname *cnp; */ { @@ -986,7 +986,7 @@ xfs_abortop (struct vop_abortop_args *ap) #ifdef HAVE_VOP_MMAP int -xfs_mmap(struct vop_mmap_args *ap) +nnpfs_mmap(struct vop_mmap_args *ap) /* IN struct vnode *vp; IN int fflags; @@ -994,7 +994,7 @@ xfs_mmap(struct vop_mmap_args *ap) IN struct proc *p; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_mmap\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_mmap\n")); #ifdef HAVE_KERNEL_GENFS_MMAP return genfs_mmap(ap); #else @@ -1005,7 +1005,7 @@ xfs_mmap(struct vop_mmap_args *ap) #ifdef HAVE_VOP_BMAP int -xfs_bmap(struct vop_bmap_args *ap) +nnpfs_bmap(struct vop_bmap_args *ap) /* IN struct vnode *vp; IN daddr64_t bn; OUT struct vnode **vpp; @@ -1014,7 +1014,7 @@ xfs_bmap(struct vop_bmap_args *ap) OUT int *runb; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_bmap\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_bmap\n")); return EOPNOTSUPP; } #endif /* HAVE_VOP_BMAP */ @@ -1033,7 +1033,7 @@ get_pages_endlength (struct vop_getpages_args *ap) } int -xfs_getpages (struct vop_getpages_args *ap) +nnpfs_getpages (struct vop_getpages_args *ap) /* Old BSD IN struct vnode *vp; IN vm_page_t *m; @@ -1054,14 +1054,14 @@ xfs_getpages (struct vop_getpages_args *ap) { int error; - NNPFSDEB(XDEBVNOPS, ("xfs_getpages\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_getpages\n")); #if HAVE_KERNEL_VNODE_PAGER_GENERIC_GETPAGES error = vnode_pager_generic_getpages (ap->a_vp, ap->a_m, ap->a_count, ap->a_reqpage); #else - error = xfs_data_valid (ap->a_vp, VNODE_TO_XNODE(ap->a_vp)->rd_cred, - xfs_curproc(), NNPFS_DATA_R, + error = nnpfs_data_valid (ap->a_vp, VNODE_TO_XNODE(ap->a_vp)->rd_cred, + nnpfs_curproc(), NNPFS_DATA_R, get_pages_endlength(ap)); if (error == 0) error = VOP_GETPAGES(DATA_FROM_VNODE(ap->a_vp), @@ -1069,14 +1069,14 @@ xfs_getpages (struct vop_getpages_args *ap) ap->a_count, ap->a_centeridx, ap->a_access_type, ap->a_advice, ap->a_flags); #endif - NNPFSDEB(XDEBVNOPS, ("xfs_getpages = %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_getpages = %d\n", error)); return error; } #endif /* HAVE_VOP_GETPAGES */ #ifdef HAVE_VOP_PUTPAGES int -xfs_putpages (struct vop_putpages_args *ap) +nnpfs_putpages (struct vop_putpages_args *ap) /* Old BSD IN struct vnode *vp; IN vm_page_t *m; @@ -1093,11 +1093,11 @@ xfs_putpages (struct vop_putpages_args *ap) */ { struct vnode *vp = ap->a_vp; - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); struct vnode *t = DATA_FROM_XNODE(xn); int error; - NNPFSDEB(XDEBVNOPS, ("xfs_putpages\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_putpages\n")); if (t == NULL) return 0; @@ -1137,54 +1137,54 @@ xfs_putpages (struct vop_putpages_args *ap) #ifdef HAVE_VOP_CMP int -xfs_cmp(struct vnode * vp1, struct vnode * vp2) +nnpfs_cmp(struct vnode * vp1, struct vnode * vp2) { - NNPFSDEB(XDEBVNOPS, ("xfs_cmp\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_cmp\n")); return EOPNOTSUPP; } #endif /* HAVE_VOP_CMP */ #ifdef HAVE_VOP_REALVP int -xfs_realvp(struct vnode * vp, +nnpfs_realvp(struct vnode * vp, struct vnode ** vpp) { - NNPFSDEB(XDEBVNOPS, ("xfs_realvp\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_realvp\n")); return EOPNOTSUPP; } #endif /* HAVE_VOP_REALVP */ #ifdef HAVE_VOP_CNTL int -xfs_cntl(struct vnode * vp, +nnpfs_cntl(struct vnode * vp, int cmd, caddr_t idata, caddr_t odata, int iflag, int oflag) { - NNPFSDEB(XDEBVNOPS, ("xfs_cntl\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_cntl\n")); return EOPNOTSUPP; } #endif /* HAVE_VOP_CNTL */ #ifdef HAVE_VOP_PRINT int -xfs_print (struct vop_print_args *v) +nnpfs_print (struct vop_print_args *v) { struct vop_print_args *ap = v; - xfs_printnode_common (ap->a_vp); + nnpfs_printnode_common (ap->a_vp); return 0; } #endif #ifdef HAVE_VOP_ADVLOCK int -xfs_advlock(struct vop_advlock_args *v) +nnpfs_advlock(struct vop_advlock_args *v) { struct vop_advlock_args *ap = v; #if defined(HAVE_KERNEL_LF_ADVLOCK) && !defined(__APPLE__) - struct xfs_node *xn = VNODE_TO_XNODE(ap->a_vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(ap->a_vp); return (lf_advlock(&xn->lockf, xn->attr.va_size, ap->a_id, ap->a_op, ap->a_fl, ap->a_flags)); @@ -1196,7 +1196,7 @@ xfs_advlock(struct vop_advlock_args *v) #ifdef HAVE_VOP_REVOKE int -xfs_revoke(struct vop_revoke_args *v) +nnpfs_revoke(struct vop_revoke_args *v) { #if defined(HAVE_KERNEL_GENFS_REVOKE) return genfs_revoke (v); @@ -1210,7 +1210,7 @@ xfs_revoke(struct vop_revoke_args *v) #ifdef HAVE_VOP_PAGEIN int -xfs_pagein(struct vop_pagein_args *ap) +nnpfs_pagein(struct vop_pagein_args *ap) { #ifdef __APPLE__ struct uio uio; @@ -1227,7 +1227,7 @@ xfs_pagein(struct vop_pagein_args *ap) uio.uio_resid=ap->a_size; uio.uio_segflg=UIO_SYSSPACE; /* XXX what is it? */ uio.uio_rw=UIO_READ; - uio.uio_procp=xfs_curproc(); + uio.uio_procp=nnpfs_curproc(); ret = VOP_READ(ap->a_vp, &uio, 0, ap->a_cred); @@ -1256,7 +1256,7 @@ xfs_pagein(struct vop_pagein_args *ap) #ifdef HAVE_VOP_PAGEOUT int -xfs_pageout(struct vop_pageout_args *ap) +nnpfs_pageout(struct vop_pageout_args *ap) { #ifdef __APPLE__ struct uio uio; @@ -1273,7 +1273,7 @@ xfs_pageout(struct vop_pageout_args *ap) uio.uio_resid=ap->a_size; uio.uio_segflg=UIO_SYSSPACE; /* XXX what is it? */ uio.uio_rw=UIO_WRITE; - uio.uio_procp=xfs_curproc(); + uio.uio_procp=nnpfs_curproc(); ret = VOP_WRITE(ap->a_vp, &uio, 0, ap->a_cred); @@ -1297,7 +1297,7 @@ xfs_pageout(struct vop_pageout_args *ap) #ifdef HAVE_VOP_CREATEVOBJECT int -xfs_createvobject(struct vop_createvobject_args *ap) +nnpfs_createvobject(struct vop_createvobject_args *ap) /* struct vop_createvobject_args { struct vnode *vp; @@ -1306,7 +1306,7 @@ struct vop_createvobject_args { }; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_createvobject\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_createvobject\n")); return vop_stdcreatevobject (ap); } @@ -1314,14 +1314,14 @@ struct vop_createvobject_args { #ifdef HAVE_VOP_DESTROYVOBJECT int -xfs_destroyvobject(struct vop_destroyvobject_args *ap) +nnpfs_destroyvobject(struct vop_destroyvobject_args *ap) /* struct vop_destroyvobject_args { struct vnode *vp; }; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_destroyvobject\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_destroyvobject\n")); return vop_stddestroyvobject (ap); } @@ -1329,7 +1329,7 @@ struct vop_destroyvobject_args { #ifdef HAVE_VOP_GETVOBJECT int -xfs_getvobject(struct vop_getvobject_args *ap) +nnpfs_getvobject(struct vop_getvobject_args *ap) /* struct vop_getvobject_args { struct vnode *vp; @@ -1337,7 +1337,7 @@ struct vop_getvobject_args { }; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_getvobject\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_getvobject\n")); return vop_stdgetvobject (ap); } @@ -1345,7 +1345,7 @@ struct vop_getvobject_args { #ifdef HAVE_VOP_PATHCONF int -xfs_pathconf(struct vop_pathconf_args *ap) +nnpfs_pathconf(struct vop_pathconf_args *ap) /* struct vop_pathconf_args { struct vnodeop_desc *a_desc; @@ -1354,7 +1354,7 @@ struct vop_pathconf_args { }; */ { - NNPFSDEB(XDEBVNOPS, ("xfs_pathconf\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_pathconf\n")); #ifdef HAVE_KERNEL_VOP_STDPATHCONF return vop_stdpathconf(ap); @@ -1366,24 +1366,24 @@ struct vop_pathconf_args { -vop_t **xfs_vnodeop_p; +vop_t **nnpfs_vnodeop_p; int -xfs_eopnotsupp (struct vop_generic_args *ap) +nnpfs_eopnotsupp (struct vop_generic_args *ap) { - NNPFSDEB(XDEBVNOPS, ("xfs_eopnotsupp %s\n", ap->a_desc->vdesc_name)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_eopnotsupp %s\n", ap->a_desc->vdesc_name)); return EOPNOTSUPP; } int -xfs_returnzero (struct vop_generic_args *ap) +nnpfs_returnzero (struct vop_generic_args *ap) { - NNPFSDEB(XDEBVNOPS, ("xfs_returnzero %s\n", ap->a_desc->vdesc_name)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_returnzero %s\n", ap->a_desc->vdesc_name)); return 0; } void -xfs_pushdirty(struct vnode *vp, struct ucred *cred, d_thread_t *p) +nnpfs_pushdirty(struct vnode *vp, struct ucred *cred, d_thread_t *p) { #if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105280000 VOP_PUTPAGES(vp, 0, 0, PGO_ALLPAGES|PGO_SYNCIO|PGO_CLEANIT); @@ -1394,144 +1394,144 @@ xfs_pushdirty(struct vnode *vp, struct ucred *cred, d_thread_t *p) -static struct vnodeopv_entry_desc xfs_vnodeop_entries[] = { - {&vop_default_desc, (vop_t *) xfs_eopnotsupp}, +static struct vnodeopv_entry_desc nnpfs_vnodeop_entries[] = { + {&vop_default_desc, (vop_t *) nnpfs_eopnotsupp}, #ifdef HAVE_VOP_LOOKUP #ifdef HAVE_KERNEL_VFS_CACHE_LOOKUP {&vop_lookup_desc, (vop_t *) vfs_cache_lookup }, #else - {&vop_lookup_desc, (vop_t *) xfs_lookup }, + {&vop_lookup_desc, (vop_t *) nnpfs_lookup }, #endif #endif #ifdef HAVE_VOP_CACHEDLOOKUP - {&vop_cachedlookup_desc, (vop_t *) xfs_cachedlookup }, + {&vop_cachedlookup_desc, (vop_t *) nnpfs_cachedlookup }, #endif #ifdef HAVE_VOP_OPEN - {&vop_open_desc, (vop_t *) xfs_open }, + {&vop_open_desc, (vop_t *) nnpfs_open }, #endif #ifdef HAVE_VOP_FSYNC - {&vop_fsync_desc, (vop_t *) xfs_fsync }, + {&vop_fsync_desc, (vop_t *) nnpfs_fsync }, #endif #ifdef HAVE_VOP_CLOSE - {&vop_close_desc, (vop_t *) xfs_close }, + {&vop_close_desc, (vop_t *) nnpfs_close }, #endif #ifdef HAVE_VOP_READ - {&vop_read_desc, (vop_t *) xfs_read }, + {&vop_read_desc, (vop_t *) nnpfs_read }, #endif #ifdef HAVE_VOP_WRITE - {&vop_write_desc, (vop_t *) xfs_write }, + {&vop_write_desc, (vop_t *) nnpfs_write }, #endif #ifdef HAVE_VOP_MMAP - {&vop_mmap_desc, (vop_t *) xfs_mmap }, + {&vop_mmap_desc, (vop_t *) nnpfs_mmap }, #endif #ifdef HAVE_VOP_BMAP - {&vop_bmap_desc, (vop_t *) xfs_bmap }, + {&vop_bmap_desc, (vop_t *) nnpfs_bmap }, #endif #ifdef HAVE_VOP_IOCTL - {&vop_ioctl_desc, (vop_t *) xfs_ioctl }, + {&vop_ioctl_desc, (vop_t *) nnpfs_ioctl }, #endif #ifdef HAVE_VOP_SELECT - {&vop_select_desc, (vop_t *) xfs_select }, + {&vop_select_desc, (vop_t *) nnpfs_select }, #endif #ifdef HAVE_VOP_SEEK - {&vop_seek_desc, (vop_t *) xfs_seek }, + {&vop_seek_desc, (vop_t *) nnpfs_seek }, #endif #ifdef HAVE_VOP_POLL - {&vop_poll_desc, (vop_t *) xfs_poll }, + {&vop_poll_desc, (vop_t *) nnpfs_poll }, #endif #ifdef HAVE_VOP_GETATTR - {&vop_getattr_desc, (vop_t *) xfs_getattr }, + {&vop_getattr_desc, (vop_t *) nnpfs_getattr }, #endif #ifdef HAVE_VOP_SETATTR - {&vop_setattr_desc, (vop_t *) xfs_setattr }, + {&vop_setattr_desc, (vop_t *) nnpfs_setattr }, #endif #ifdef HAVE_VOP_ACCESS - {&vop_access_desc, (vop_t *) xfs_access }, + {&vop_access_desc, (vop_t *) nnpfs_access }, #endif #ifdef HAVE_VOP_CREATE - {&vop_create_desc, (vop_t *) xfs_create }, + {&vop_create_desc, (vop_t *) nnpfs_create }, #endif #ifdef HAVE_VOP_REMOVE - {&vop_remove_desc, (vop_t *) xfs_remove }, + {&vop_remove_desc, (vop_t *) nnpfs_remove }, #endif #ifdef HAVE_VOP_LINK - {&vop_link_desc, (vop_t *) xfs_link }, + {&vop_link_desc, (vop_t *) nnpfs_link }, #endif #ifdef HAVE_VOP_RENAME - {&vop_rename_desc, (vop_t *) xfs_rename }, + {&vop_rename_desc, (vop_t *) nnpfs_rename }, #endif #ifdef HAVE_VOP_MKDIR - {&vop_mkdir_desc, (vop_t *) xfs_mkdir }, + {&vop_mkdir_desc, (vop_t *) nnpfs_mkdir }, #endif #ifdef HAVE_VOP_RMDIR - {&vop_rmdir_desc, (vop_t *) xfs_rmdir }, + {&vop_rmdir_desc, (vop_t *) nnpfs_rmdir }, #endif #ifdef HAVE_VOP_READDIR - {&vop_readdir_desc, (vop_t *) xfs_readdir }, + {&vop_readdir_desc, (vop_t *) nnpfs_readdir }, #endif #ifdef HAVE_VOP_SYMLINK - {&vop_symlink_desc, (vop_t *) xfs_symlink }, + {&vop_symlink_desc, (vop_t *) nnpfs_symlink }, #endif #ifdef HAVE_VOP_READLINK - {&vop_readlink_desc, (vop_t *) xfs_readlink }, + {&vop_readlink_desc, (vop_t *) nnpfs_readlink }, #endif #ifdef HAVE_VOP_INACTIVE - {&vop_inactive_desc, (vop_t *) xfs_inactive }, + {&vop_inactive_desc, (vop_t *) nnpfs_inactive }, #endif #ifdef HAVE_VOP_RECLAIM - {&vop_reclaim_desc, (vop_t *) xfs_reclaim }, + {&vop_reclaim_desc, (vop_t *) nnpfs_reclaim }, #endif #ifdef HAVE_VOP_LOCK - {&vop_lock_desc, (vop_t *) xfs_lock }, + {&vop_lock_desc, (vop_t *) nnpfs_lock }, #endif #ifdef HAVE_VOP_UNLOCK - {&vop_unlock_desc, (vop_t *) xfs_unlock }, + {&vop_unlock_desc, (vop_t *) nnpfs_unlock }, #endif #ifdef HAVE_VOP_ISLOCKED - {&vop_islocked_desc, (vop_t *) xfs_islocked }, + {&vop_islocked_desc, (vop_t *) nnpfs_islocked }, #endif #ifdef HAVE_VOP_ABORTOP - {&vop_abortop_desc, (vop_t *) xfs_abortop }, + {&vop_abortop_desc, (vop_t *) nnpfs_abortop }, #endif #ifdef HAVE_VOP_GETPAGES - {&vop_getpages_desc, (vop_t *) xfs_getpages }, + {&vop_getpages_desc, (vop_t *) nnpfs_getpages }, #endif #ifdef HAVE_VOP_PUTPAGES - {&vop_putpages_desc, (vop_t *) xfs_putpages }, + {&vop_putpages_desc, (vop_t *) nnpfs_putpages }, #endif #ifdef HAVE_VOP_REVOKE - {&vop_revoke_desc, (vop_t *) xfs_revoke }, + {&vop_revoke_desc, (vop_t *) nnpfs_revoke }, #endif #ifdef HAVE_VOP_PRINT - {&vop_print_desc, (vop_t *) xfs_print}, + {&vop_print_desc, (vop_t *) nnpfs_print}, #endif #ifdef HAVE_VOP_ADVLOCK - {&vop_advlock_desc, (vop_t *) xfs_advlock }, + {&vop_advlock_desc, (vop_t *) nnpfs_advlock }, #endif #ifdef HAVE_VOP_PAGEIN - {&vop_pagein_desc, (vop_t *) xfs_pagein }, + {&vop_pagein_desc, (vop_t *) nnpfs_pagein }, #endif #ifdef HAVE_VOP_PAGEOUT - {&vop_pageout_desc, (vop_t *) xfs_pageout }, + {&vop_pageout_desc, (vop_t *) nnpfs_pageout }, #endif #ifdef HAVE_VOP_CREATEVOBJECT - {&vop_createvobject_desc, (vop_t *) xfs_createvobject }, + {&vop_createvobject_desc, (vop_t *) nnpfs_createvobject }, #endif #ifdef HAVE_VOP_DESTROYVOBJECT - {&vop_destroyvobject_desc, (vop_t *) xfs_destroyvobject }, + {&vop_destroyvobject_desc, (vop_t *) nnpfs_destroyvobject }, #endif #ifdef HAVE_VOP_GETVOBJECT - {&vop_getvobject_desc, (vop_t *) xfs_getvobject }, + {&vop_getvobject_desc, (vop_t *) nnpfs_getvobject }, #endif #ifdef HAVE_VOP_PATHCONF - {&vop_pathconf_desc, (vop_t *) xfs_pathconf }, + {&vop_pathconf_desc, (vop_t *) nnpfs_pathconf }, #endif {(struct vnodeop_desc *) NULL, (int (*) (void *)) NULL} }; -struct vnodeopv_desc xfs_vnodeop_opv_desc = -{&xfs_vnodeop_p, xfs_vnodeop_entries}; +struct vnodeopv_desc nnpfs_vnodeop_opv_desc = +{&nnpfs_vnodeop_p, nnpfs_vnodeop_entries}; #ifdef VNODEOP_SET -VNODEOP_SET(xfs_vnodeop_opv_desc); +VNODEOP_SET(nnpfs_vnodeop_opv_desc); #endif diff --git a/sys/xfs/xfs_vnodeops-common.c b/sys/nnpfs/nnpfs_vnodeops-common.c index 9531c0a719a..e8ed71842e9 100644 --- a/sys/xfs/xfs_vnodeops-common.c +++ b/sys/nnpfs/nnpfs_vnodeops-common.c @@ -35,19 +35,19 @@ * NNPFS operations. */ -#include <xfs/xfs_locl.h> -#include <xfs/xfs_message.h> -#include <xfs/xfs_common.h> -#include <xfs/xfs_fs.h> -#include <xfs/xfs_dev.h> -#include <xfs/xfs_deb.h> -#include <xfs/xfs_syscalls.h> -#include <xfs/xfs_vnodeops.h> +#include <nnpfs/nnpfs_locl.h> +#include <nnpfs/nnpfs_message.h> +#include <nnpfs/nnpfs_common.h> +#include <nnpfs/nnpfs_fs.h> +#include <nnpfs/nnpfs_dev.h> +#include <nnpfs/nnpfs_deb.h> +#include <nnpfs/nnpfs_syscalls.h> +#include <nnpfs/nnpfs_vnodeops.h> -RCSID("$arla: xfs_vnodeops-common.c,v 1.94 2003/01/27 11:58:50 lha Exp $"); +RCSID("$arla: nnpfs_vnodeops-common.c,v 1.94 2003/01/27 11:58:50 lha Exp $"); static void -xfs_handle_stale(struct xfs_node *xn) +nnpfs_handle_stale(struct nnpfs_node *xn) { #if __APPLE__ struct vnode *vp = XNODE_TO_VNODE(xn); @@ -68,62 +68,62 @@ xfs_handle_stale(struct xfs_node *xn) } int -xfs_open_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, +nnpfs_open_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, u_int tok) { - struct xfs *xfsp = NNPFS_FROM_VNODE(vp); - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int error = 0; - NNPFSDEB(XDEBVFOPS, ("xfs_open_valid\n")); + NNPFSDEB(XDEBVFOPS, ("nnpfs_open_valid\n")); - xfs_handle_stale(xn); + nnpfs_handle_stale(xn); do { if (!NNPFS_TOKEN_GOT(xn, tok)) { - struct xfs_message_open msg; + struct nnpfs_message_open msg; msg.header.opcode = NNPFS_MSG_OPEN; msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); msg.handle = xn->handle; msg.tokens = tok; - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } else { goto done; } } while (error == 0); done: - NNPFSDEB(XDEBVFOPS, ("xfs_open_valid: error = %d\n", error)); + NNPFSDEB(XDEBVFOPS, ("nnpfs_open_valid: error = %d\n", error)); return error; } int -xfs_attr_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, +nnpfs_attr_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, u_int tok) { - struct xfs *xfsp = NNPFS_FROM_VNODE(vp); - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int error = 0; - xfs_pag_t pag = xfs_get_pag(cred); + nnpfs_pag_t pag = nnpfs_get_pag(cred); do { - if (!NNPFS_TOKEN_GOT(xn, tok) || !xfs_has_pag(xn, pag)) { - struct xfs_message_getattr msg; + if (!NNPFS_TOKEN_GOT(xn, tok) || !nnpfs_has_pag(xn, pag)) { + struct nnpfs_message_getattr msg; msg.header.opcode = NNPFS_MSG_GETATTR; msg.cred.uid = cred->cr_uid; msg.cred.pag = pag; msg.handle = xn->handle; - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } else { goto done; } @@ -134,14 +134,14 @@ done: } int -xfs_data_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, +nnpfs_data_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, u_int tok, uint32_t want_offset) { - struct xfs *xfsp = NNPFS_FROM_VNODE(vp); - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int error = 0; uint32_t offset; - struct xfs_message_getdata msg; + struct nnpfs_message_getdata msg; do { offset = want_offset; @@ -149,7 +149,7 @@ xfs_data_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, offset = xn->attr.va_size; } - NNPFSDEB(XDEBVNOPS, ("xfs_data_valid: offset: want %ld has %ld, " + NNPFSDEB(XDEBVNOPS, ("nnpfs_data_valid: offset: want %ld has %ld, " "tokens: want %lx has %lx length: %ld\n", (long) offset, (long) xn->offset, (long) tok, (long) xn->tokens, @@ -163,15 +163,15 @@ xfs_data_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, msg.header.opcode = NNPFS_MSG_GETDATA; msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); msg.handle = xn->handle; msg.tokens = tok; msg.offset = offset; - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } while (error == 0); @@ -179,57 +179,57 @@ xfs_data_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, } int -xfs_open_common(struct vnode *vp, +nnpfs_open_common(struct vnode *vp, int mode, struct ucred *cred, d_thread_t *p) { - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int ret; - NNPFSDEB(XDEBVNOPS, ("xfs_open\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_open\n")); if (mode & FWRITE) { - ret = xfs_open_valid(vp, cred, p, NNPFS_OPEN_NW); + ret = nnpfs_open_valid(vp, cred, p, NNPFS_OPEN_NW); } else { - ret = xfs_open_valid(vp, cred, p, NNPFS_OPEN_NR); + ret = nnpfs_open_valid(vp, cred, p, NNPFS_OPEN_NR); } /* always update the read cred */ if (mode & FWRITE) - xfs_update_write_cred(xn, cred); - xfs_update_read_cred(xn, cred); + nnpfs_update_write_cred(xn, cred); + nnpfs_update_read_cred(xn, cred); return ret; } static int -do_fsync(struct xfs *xfsp, - struct xfs_node *xn, +do_fsync(struct nnpfs *nnpfsp, + struct nnpfs_node *xn, struct ucred *cred, d_thread_t *p, u_int flag) { int error; - struct xfs_message_putdata msg; + struct nnpfs_message_putdata msg; msg.header.opcode = NNPFS_MSG_PUTDATA; if (cred != NOCRED) { msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); } else { msg.cred.uid = 0; msg.cred.pag = NNPFS_ANONYMOUSID; } msg.handle = xn->handle; - vattr2xfs_attr(&xn->attr, &msg.attr); + vattr2nnpfs_attr(&xn->attr, &msg.attr); msg.flag = flag; - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; if (error == 0) xn->flags &= ~NNPFS_DATA_DIRTY; @@ -238,14 +238,14 @@ do_fsync(struct xfs *xfsp, } int -xfs_fsync_common(struct vnode *vp, struct ucred *cred, +nnpfs_fsync_common(struct vnode *vp, struct ucred *cred, int waitfor, d_thread_t *proc) { - struct xfs *xfsp = NNPFS_FROM_VNODE(vp); - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_fsync: %lx\n", (unsigned long)vp)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_fsync: %lx\n", (unsigned long)vp)); /* * It seems that fsync is sometimes called after reclaiming a node. @@ -253,50 +253,50 @@ xfs_fsync_common(struct vnode *vp, struct ucred *cred, */ if (xn == NULL) { - printf("NNPFS PANIC WARNING! xfs_fsync called after reclaiming!\n"); + printf("NNPFS PANIC WARNING! nnpfs_fsync called after reclaiming!\n"); return 0; } - xfs_pushdirty(vp, cred, proc); + nnpfs_pushdirty(vp, cred, proc); if (xn->flags & NNPFS_DATA_DIRTY) { #ifdef FSYNC_RECLAIM /* writing back the data from this vnode failed */ if (waitfor & FSYNC_RECLAIM) { - printf("xfs_fsync: data lost, failed to write back\n"); + printf("nnpfs_fsync: data lost, failed to write back\n"); xn->flags &= ~NNPFS_DATA_DIRTY; return 0; } #endif - error = do_fsync(xfsp, xn, cred, proc, NNPFS_WRITE | NNPFS_FSYNC); + error = do_fsync(nnpfsp, xn, cred, proc, NNPFS_WRITE | NNPFS_FSYNC); } return error; } int -xfs_close_common(struct vnode *vp, int fflag, +nnpfs_close_common(struct vnode *vp, int fflag, d_thread_t *proc, struct ucred *cred) { - struct xfs *xfsp = NNPFS_FROM_VNODE(vp); - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int error = 0; NNPFSDEB(XDEBVNOPS, - ("xfs_close cred = %lx, fflag = %x, xn->flags = %x\n", + ("nnpfs_close cred = %lx, fflag = %x, xn->flags = %x\n", (unsigned long)cred, fflag, xn->flags)); if (vp->v_type == VREG) - xfs_pushdirty(vp, cred, proc); + nnpfs_pushdirty(vp, cred, proc); if (fflag & FWRITE && xn->flags & NNPFS_DATA_DIRTY) - error = do_fsync(xfsp, xn, cred, proc, NNPFS_WRITE); + error = do_fsync(nnpfsp, xn, cred, proc, NNPFS_WRITE); return error; } size_t -xfs_uio_end_length (struct uio *uio) +nnpfs_uio_end_length (struct uio *uio) { #ifdef DIAGNOSTIC size_t sz = 0; @@ -305,32 +305,32 @@ xfs_uio_end_length (struct uio *uio) for (i = 0; i < uio->uio_iovcnt; i++) sz += uio->uio_iov[i].iov_len; if (sz != uio->uio_resid) - panic("xfs_uio_end_length"); + panic("nnpfs_uio_end_length"); #endif return uio->uio_offset + uio->uio_resid; } int -xfs_read_common(struct vnode *vp, struct uio *uio, int ioflag, +nnpfs_read_common(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) { int error = 0; int i; - NNPFSDEB(XDEBVNOPS, ("xfs_read\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_read\n")); - xfs_update_read_cred(VNODE_TO_XNODE(vp), cred); + nnpfs_update_read_cred(VNODE_TO_XNODE(vp), cred); #ifdef HAVE_FREEBSD_THREAD - error = xfs_data_valid(vp, cred, xfs_uio_to_thread(uio), NNPFS_DATA_R, - xfs_uio_end_length(uio)); + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_thread(uio), NNPFS_DATA_R, + nnpfs_uio_end_length(uio)); #else - error = xfs_data_valid(vp, cred, xfs_uio_to_proc(uio), NNPFS_DATA_R, - xfs_uio_end_length(uio)); + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_proc(uio), NNPFS_DATA_R, + nnpfs_uio_end_length(uio)); #endif - NNPFSDEB(XDEBVNOPS, ("xfs_read: iovcnt: %d\n", uio->uio_iovcnt)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_read: iovcnt: %d\n", uio->uio_iovcnt)); for (i = 0; i < uio->uio_iovcnt; i++) NNPFSDEB(XDEBVNOPS, (" base: %lx len: %lu\n", (unsigned long)uio->uio_iov[i].iov_base, @@ -340,40 +340,40 @@ xfs_read_common(struct vnode *vp, struct uio *uio, int ioflag, struct vnode *t = DATA_FROM_VNODE(vp); #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_readlock(t, xfs_uio_to_thread(uio)); - xfs_vop_read(t, uio, ioflag, cred, error); - xfs_vfs_unlock(t, xfs_uio_to_thread(uio)); + nnpfs_vfs_readlock(t, nnpfs_uio_to_thread(uio)); + nnpfs_vop_read(t, uio, ioflag, cred, error); + nnpfs_vfs_unlock(t, nnpfs_uio_to_thread(uio)); #else - xfs_vfs_readlock(t, xfs_uio_to_proc(uio)); - xfs_vop_read(t, uio, ioflag, cred, error); - xfs_vfs_unlock(t, xfs_uio_to_proc(uio)); + nnpfs_vfs_readlock(t, nnpfs_uio_to_proc(uio)); + nnpfs_vop_read(t, uio, ioflag, cred, error); + nnpfs_vfs_unlock(t, nnpfs_uio_to_proc(uio)); #endif } - NNPFSDEB(XDEBVNOPS, ("xfs_read offset: %lu resid: %lu\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_read offset: %lu resid: %lu\n", (unsigned long)uio->uio_offset, (unsigned long)uio->uio_resid)); - NNPFSDEB(XDEBVNOPS, ("xfs_read error: %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_read error: %d\n", error)); return error; } int -xfs_write_common(struct vnode *vp, struct uio *uiop, int ioflag, +nnpfs_write_common(struct vnode *vp, struct uio *uiop, int ioflag, struct ucred *cred) { - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_write\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_write\n")); - xfs_update_write_cred(xn, cred); + nnpfs_update_write_cred(xn, cred); #ifdef HAVE_FREEBSD_THREAD - error = xfs_data_valid(vp, cred, xfs_uio_to_thread(uiop), NNPFS_DATA_W, + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_thread(uiop), NNPFS_DATA_W, VNODE_TO_XNODE(vp)->attr.va_size); #else - error = xfs_data_valid(vp, cred, xfs_uio_to_proc(uiop), NNPFS_DATA_W, + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_proc(uiop), NNPFS_DATA_W, VNODE_TO_XNODE(vp)->attr.va_size); #endif @@ -383,28 +383,28 @@ xfs_write_common(struct vnode *vp, struct uio *uiop, int ioflag, int error2 = 0; #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_writelock(t, xfs_uio_to_thread(uiop)); - xfs_vop_write(t, uiop, ioflag, cred, error); + nnpfs_vfs_writelock(t, nnpfs_uio_to_thread(uiop)); + nnpfs_vop_write(t, uiop, ioflag, cred, error); VNODE_TO_XNODE(vp)->flags |= NNPFS_DATA_DIRTY; - xfs_vop_getattr(t, &sub_attr, cred, xfs_uio_to_thread(uiop), error2); + nnpfs_vop_getattr(t, &sub_attr, cred, nnpfs_uio_to_thread(uiop), error2); #else - xfs_vfs_writelock(t, xfs_uio_to_proc(uiop)); - xfs_vop_write(t, uiop, ioflag, cred, error); + nnpfs_vfs_writelock(t, nnpfs_uio_to_proc(uiop)); + nnpfs_vop_write(t, uiop, ioflag, cred, error); VNODE_TO_XNODE(vp)->flags |= NNPFS_DATA_DIRTY; - xfs_vop_getattr(t, &sub_attr, cred, xfs_uio_to_proc(uiop), error2); + nnpfs_vop_getattr(t, &sub_attr, cred, nnpfs_uio_to_proc(uiop), error2); #endif if (error2 == 0) { xn->attr.va_size = sub_attr.va_size; xn->attr.va_bytes = sub_attr.va_size; xn->attr.va_mtime = sub_attr.va_mtime; - xfs_set_vp_size(vp, sub_attr.va_size); + nnpfs_set_vp_size(vp, sub_attr.va_size); xn->offset = sub_attr.va_size; } #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_unlock(t, xfs_uio_to_thread(uiop)); + nnpfs_vfs_unlock(t, nnpfs_uio_to_thread(uiop)); #else - xfs_vfs_unlock(t, xfs_uio_to_proc(uiop)); + nnpfs_vfs_unlock(t, nnpfs_uio_to_proc(uiop)); #endif } @@ -412,30 +412,30 @@ xfs_write_common(struct vnode *vp, struct uio *uiop, int ioflag, } int -xfs_getattr_common(struct vnode *vp, struct vattr *vap, +nnpfs_getattr_common(struct vnode *vp, struct vattr *vap, struct ucred *cred, d_thread_t *p) { int error = 0; - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); - NNPFSDEB(XDEBVNOPS, ("xfs_getattr\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_getattr\n")); - error = xfs_attr_valid(vp, cred, p, NNPFS_ATTR_R); + error = nnpfs_attr_valid(vp, cred, p, NNPFS_ATTR_R); if (error == 0) *vap = xn->attr; return error; } int -xfs_setattr_common(struct vnode *vp, struct vattr *vap, +nnpfs_setattr_common(struct vnode *vp, struct vattr *vap, struct ucred *cred, d_thread_t *p) { - struct xfs *xfsp = NNPFS_FROM_VNODE(vp); - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_setattr\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_setattr\n")); #define CHECK_NNPFSATTR(A, cast) (vap->A == cast VNOVAL || vap->A == xn->attr.A) if (CHECK_NNPFSATTR(va_mode,(mode_t)) && @@ -455,18 +455,18 @@ xfs_setattr_common(struct vnode *vp, struct vattr *vap, error = EINVAL; /* XXX not yet implemented */ goto done; } else { - struct xfs_message_putattr msg; + struct nnpfs_message_putattr msg; msg.header.opcode = NNPFS_MSG_PUTATTR; if (cred != NOCRED) { msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); } else { msg.cred.uid = 0; msg.cred.pag = NNPFS_ANONYMOUSID; } msg.handle = xn->handle; - vattr2xfs_attr(vap, &msg.attr); + vattr2nnpfs_attr(vap, &msg.attr); if (NNPFS_TOKEN_GOT(xn, NNPFS_DATA_R)) { if (vp->v_type == VREG) { if (vap->va_size != (va_size_t)VNOVAL) @@ -486,9 +486,9 @@ xfs_setattr_common(struct vnode *vp, struct vattr *vap, } NNPFS_TOKEN_CLEAR(xn, NNPFS_ATTR_VALID, NNPFS_ATTR_MASK); - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } done: @@ -513,17 +513,17 @@ check_rights (u_char rights, int mode) } int -xfs_access_common(struct vnode *vp, int mode, struct ucred *cred, +nnpfs_access_common(struct vnode *vp, int mode, struct ucred *cred, d_thread_t *p) { int error = 0; - xfs_pag_t pag = xfs_get_pag(cred); + nnpfs_pag_t pag = nnpfs_get_pag(cred); - NNPFSDEB(XDEBVNOPS, ("xfs_access mode = 0%o\n", mode)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_access mode = 0%o\n", mode)); - error = xfs_attr_valid(vp, cred, p, NNPFS_ATTR_R); + error = nnpfs_attr_valid(vp, cred, p, NNPFS_ATTR_R); if (error == 0) { - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); int i; error = check_rights (xn->anonrights, mode); @@ -531,7 +531,7 @@ xfs_access_common(struct vnode *vp, int mode, struct ucred *cred, if (error == 0) goto done; - NNPFSDEB(XDEBVNOPS, ("xfs_access anonaccess failed\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_access anonaccess failed\n")); error = EACCES; /* default to EACCES if pag isn't in xn->id */ @@ -543,29 +543,29 @@ xfs_access_common(struct vnode *vp, int mode, struct ucred *cred, } done: - NNPFSDEB(XDEBVNOPS, ("xfs_access(0%o) = %d\n", mode, error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_access(0%o) = %d\n", mode, error)); return error; } int -xfs_lookup_common(struct vnode *dvp, - xfs_componentname *cnp, +nnpfs_lookup_common(struct vnode *dvp, + nnpfs_componentname *cnp, struct vnode **vpp) { - struct xfs_message_getnode msg; - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *d = VNODE_TO_XNODE(dvp); + struct nnpfs_message_getnode msg; + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *d = VNODE_TO_XNODE(dvp); int error = 0; #ifdef HAVE_FREEBSD_THREAD - d_thread_t *proc = xfs_cnp_to_thread(cnp); - struct ucred *cred = xfs_thread_to_cred(proc); + d_thread_t *proc = nnpfs_cnp_to_thread(cnp); + struct ucred *cred = nnpfs_thread_to_cred(proc); #else - d_thread_t *proc = xfs_cnp_to_proc(cnp); - struct ucred *cred = xfs_proc_to_cred(proc); + d_thread_t *proc = nnpfs_cnp_to_proc(cnp); + struct ucred *cred = nnpfs_proc_to_cred(proc); #endif - NNPFSDEB(XDEBVNOPS, ("xfs_lookup_common: enter\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup_common: enter\n")); *vpp = NULL; @@ -582,18 +582,18 @@ xfs_lookup_common(struct vnode *dvp, } do { - xfs_vop_access(dvp, VEXEC, cred, proc, error); + nnpfs_vop_access(dvp, VEXEC, cred, proc, error); if (error != 0) goto done; - NNPFSDEB(XDEBVNOPS, ("xfs_lookup_common: dvp = %lx\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup_common: dvp = %lx\n", (unsigned long) dvp)); - NNPFSDEB(XDEBVNOPS, ("xfs_lookup_common: cnp = %lx, " + NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup_common: cnp = %lx, " "cnp->cn_nameiop = %d\n", (unsigned long) cnp, (int)cnp->cn_nameiop)); - error = xfs_dnlc_lookup(dvp, cnp, vpp); + error = nnpfs_dnlc_lookup(dvp, cnp, vpp); if (error == 0) { /* @@ -611,7 +611,7 @@ xfs_lookup_common(struct vnode *dvp, msg.header.opcode = NNPFS_MSG_GETNODE; if (cnp->cn_cred != NOCRED) { msg.cred.uid = cnp->cn_cred->cr_uid; - msg.cred.pag = xfs_get_pag(cnp->cn_cred); + msg.cred.pag = nnpfs_get_pag(cnp->cn_cred); } else { msg.cred.uid = 0; msg.cred.pag = NNPFS_ANONYMOUSID; @@ -619,15 +619,15 @@ xfs_lookup_common(struct vnode *dvp, msg.parent_handle = d->handle; memcpy(msg.name, cnp->cn_nameptr, cnp->cn_namelen); msg.name[cnp->cn_namelen] = '\0'; - error = xfs_message_rpc(xfsp->fd, &msg.header, + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), proc); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; if(error == ENOENT && cnp->cn_nameiop != CREATE) { - NNPFSDEB(XDEBVNOPS, ("xfs_lookup: neg cache %lx (%s, %ld)\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup: neg cache %lx (%s, %ld)\n", (unsigned long)dvp, cnp->cn_nameptr, cnp->cn_namelen)); - xfs_dnlc_enter (dvp, cnp, NULL); + nnpfs_dnlc_enter (dvp, cnp, NULL); } } else if (error == -1) { error = 0; @@ -636,46 +636,46 @@ xfs_lookup_common(struct vnode *dvp, } while (error == 0); done: - NNPFSDEB(XDEBVNOPS, ("xfs_lookup_common: return error = %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup_common: return error = %d\n", error)); return error; } int -xfs_create_common(struct vnode *dvp, +nnpfs_create_common(struct vnode *dvp, const char *name, struct vattr *vap, struct ucred *cred, d_thread_t *p) { - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *xn = VNODE_TO_XNODE(dvp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *xn = VNODE_TO_XNODE(dvp); int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_create: (%lx, %s)\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_create: (%lx, %s)\n", (unsigned long)dvp, name)); { - struct xfs_message_create msg; + struct nnpfs_message_create msg; msg.header.opcode = NNPFS_MSG_CREATE; msg.parent_handle = xn->handle; if (strlcpy(msg.name, name, sizeof(msg.name)) >= NNPFS_MAX_NAME) return ENAMETOOLONG; - vattr2xfs_attr(vap, &msg.attr); + vattr2nnpfs_attr(vap, &msg.attr); msg.mode = 0; /* XXX - mode */ if (cred != NOCRED) { msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); } else { msg.cred.uid = 0; msg.cred.pag = NNPFS_ANONYMOUSID; } - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } #if 0 @@ -687,39 +687,39 @@ xfs_create_common(struct vnode *dvp, } int -xfs_remove_common(struct vnode *dvp, +nnpfs_remove_common(struct vnode *dvp, struct vnode *vp, const char *name, struct ucred *cred, d_thread_t *p) { - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *xn = VNODE_TO_XNODE(dvp); - struct xfs_message_remove msg; + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *xn = VNODE_TO_XNODE(dvp); + struct nnpfs_message_remove msg; int error; - NNPFSDEB(XDEBVNOPS, ("xfs_remove: %s\n", name)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_remove: %s\n", name)); msg.header.opcode = NNPFS_MSG_REMOVE; msg.parent_handle = xn->handle; msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); if (strlcpy(msg.name, name, sizeof(msg.name)) >= NNPFS_MAX_NAME) error = ENAMETOOLONG; else - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) &msg)->error; + error = ((struct nnpfs_message_wakeup *) &msg)->error; if (error == 0) - xfs_dnlc_purge (vp); + nnpfs_dnlc_purge (vp); return error; } int -xfs_rename_common(struct vnode *fdvp, +nnpfs_rename_common(struct vnode *fdvp, struct vnode *fvp, const char *fname, struct vnode *tdvp, @@ -728,10 +728,10 @@ xfs_rename_common(struct vnode *fdvp, struct ucred *cred, d_thread_t *p) { - struct xfs *xfsp = NNPFS_FROM_VNODE(fdvp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(fdvp); int error; - NNPFSDEB(XDEBVNOPS, ("xfs_rename: %s %s\n", fname, tname)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_rename: %s %s\n", fname, tname)); if ((fvp->v_mount != tdvp->v_mount) || (tvp && (fvp->v_mount != tvp->v_mount))) { @@ -739,7 +739,7 @@ xfs_rename_common(struct vnode *fdvp, } { - struct xfs_message_rename msg; + struct nnpfs_message_rename msg; msg.header.opcode = NNPFS_MSG_RENAME; msg.old_parent_handle = VNODE_TO_XNODE(fdvp)->handle; @@ -749,88 +749,88 @@ xfs_rename_common(struct vnode *fdvp, if (strlcpy(msg.new_name, tname, sizeof(msg.new_name)) >= NNPFS_MAX_NAME) return ENAMETOOLONG; msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + msg.cred.pag = nnpfs_get_pag(cred); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) &msg)->error; + error = ((struct nnpfs_message_wakeup *) &msg)->error; } - NNPFSDEB(XDEBVNOPS, ("xfs_rename: error = %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_rename: error = %d\n", error)); return error; } int -xfs_mkdir_common(struct vnode *dvp, +nnpfs_mkdir_common(struct vnode *dvp, const char *name, struct vattr *vap, struct ucred *cred, d_thread_t *p) { - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *xn = VNODE_TO_XNODE(dvp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *xn = VNODE_TO_XNODE(dvp); int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_mkdir: %s\n", name)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_mkdir: %s\n", name)); { - struct xfs_message_mkdir msg; + struct nnpfs_message_mkdir msg; msg.header.opcode = NNPFS_MSG_MKDIR; msg.parent_handle = xn->handle; if (strlcpy(msg.name, name, sizeof(msg.name)) >= NNPFS_MAX_NAME) return ENAMETOOLONG; - vattr2xfs_attr(vap, &msg.attr); + vattr2nnpfs_attr(vap, &msg.attr); if (cred != NOCRED) { msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); } else { msg.cred.uid = 0; msg.cred.pag = NNPFS_ANONYMOUSID; } - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } return error; } int -xfs_rmdir_common(struct vnode *dvp, +nnpfs_rmdir_common(struct vnode *dvp, struct vnode *vp, const char *name, struct ucred *cred, d_thread_t *p) { - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *xn = VNODE_TO_XNODE(dvp); - struct xfs_message_rmdir msg; + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *xn = VNODE_TO_XNODE(dvp); + struct nnpfs_message_rmdir msg; int error; - NNPFSDEB(XDEBVNOPS, ("xfs_rmdir: %s\n", name)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_rmdir: %s\n", name)); msg.header.opcode = NNPFS_MSG_RMDIR; msg.parent_handle = xn->handle; msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); if (strlcpy(msg.name, name, sizeof(msg.name)) >= NNPFS_MAX_NAME) error = ENAMETOOLONG; else - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) &msg)->error; + error = ((struct nnpfs_message_wakeup *) &msg)->error; if (error == 0) - xfs_dnlc_purge (vp); + nnpfs_dnlc_purge (vp); - NNPFSDEB(XDEBVNOPS, ("xfs_rmdir error: %d\n", error)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_rmdir error: %d\n", error)); return error; } int -xfs_readdir_common(struct vnode *vp, +nnpfs_readdir_common(struct vnode *vp, struct uio *uiop, struct ucred *cred, d_thread_t *p, @@ -838,61 +838,61 @@ xfs_readdir_common(struct vnode *vp, { int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_readdir\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_readdir\n")); if(eofflag) *eofflag = 0; #ifdef HAVE_FREEBSD_THREAD - error = xfs_data_valid(vp, cred, xfs_uio_to_thread(uiop), NNPFS_DATA_R, - xfs_uio_end_length(uiop)); + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_thread(uiop), NNPFS_DATA_R, + nnpfs_uio_end_length(uiop)); #else - error = xfs_data_valid(vp, cred, xfs_uio_to_proc(uiop), NNPFS_DATA_R, - xfs_uio_end_length(uiop)); + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_proc(uiop), NNPFS_DATA_R, + nnpfs_uio_end_length(uiop)); #endif if (error == 0) { struct vnode *t = DATA_FROM_VNODE(vp); #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_readlock(t, xfs_uio_to_thread(uiop)); + nnpfs_vfs_readlock(t, nnpfs_uio_to_thread(uiop)); #else - xfs_vfs_readlock(t, xfs_uio_to_proc(uiop)); + nnpfs_vfs_readlock(t, nnpfs_uio_to_proc(uiop)); #endif - xfs_vop_read(t, uiop, 0, cred, error); + nnpfs_vop_read(t, uiop, 0, cred, error); if (eofflag) { struct vattr t_attr; int error2; #ifdef HAVE_FREEBSD_THREAD - xfs_vop_getattr(t, &t_attr, cred, xfs_uio_to_thread(uiop), error2); + nnpfs_vop_getattr(t, &t_attr, cred, nnpfs_uio_to_thread(uiop), error2); #else - xfs_vop_getattr(t, &t_attr, cred, xfs_uio_to_proc(uiop), error2); + nnpfs_vop_getattr(t, &t_attr, cred, nnpfs_uio_to_proc(uiop), error2); #endif if (error2 == 0) *eofflag = t_attr.va_size <= uiop->uio_offset; } #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_unlock(t, xfs_uio_to_thread(uiop)); + nnpfs_vfs_unlock(t, nnpfs_uio_to_thread(uiop)); #else - xfs_vfs_unlock(t, xfs_uio_to_proc(uiop)); + nnpfs_vfs_unlock(t, nnpfs_uio_to_proc(uiop)); #endif } return error; } int -xfs_link_common(struct vnode *dvp, +nnpfs_link_common(struct vnode *dvp, struct vnode *vp, const char *name, struct ucred *cred, d_thread_t *p) { - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *xn = VNODE_TO_XNODE(dvp); - struct xfs_node *xn2 = VNODE_TO_XNODE(vp); - struct xfs_message_link msg; + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *xn = VNODE_TO_XNODE(dvp); + struct nnpfs_node *xn2 = VNODE_TO_XNODE(vp); + struct nnpfs_message_link msg; int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_link: %s\n", name)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_link: %s\n", name)); msg.header.opcode = NNPFS_MSG_LINK; msg.parent_handle = xn->handle; @@ -900,36 +900,36 @@ xfs_link_common(struct vnode *dvp, if (strlcpy(msg.name, name, sizeof(msg.name)) >= NNPFS_MAX_NAME) return ENAMETOOLONG; msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; return error; } int -xfs_symlink_common(struct vnode *dvp, +nnpfs_symlink_common(struct vnode *dvp, struct vnode **vpp, - xfs_componentname *cnp, + nnpfs_componentname *cnp, struct vattr *vap, char *target) { - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *xn = VNODE_TO_XNODE(dvp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *xn = VNODE_TO_XNODE(dvp); #ifdef HAVE_FREEBSD_THREAD - d_thread_t *proc = xfs_cnp_to_thread(cnp); - struct ucred *cred = xfs_thread_to_cred(proc); + d_thread_t *proc = nnpfs_cnp_to_thread(cnp); + struct ucred *cred = nnpfs_thread_to_cred(proc); #else - d_thread_t *proc = xfs_cnp_to_proc(cnp); - struct ucred *cred = xfs_proc_to_cred(proc); + d_thread_t *proc = nnpfs_cnp_to_proc(cnp); + struct ucred *cred = nnpfs_proc_to_cred(proc); #endif - struct xfs_message_symlink *msg = NULL; + struct nnpfs_message_symlink *msg = NULL; const char *name = cnp->cn_nameptr; int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_symlink: %s\n", name)); + NNPFSDEB(XDEBVNOPS, ("nnpfs_symlink: %s\n", name)); msg = malloc(sizeof(*msg), M_TEMP, M_WAITOK | M_ZERO); if (msg == NULL) { @@ -939,9 +939,9 @@ xfs_symlink_common(struct vnode *dvp, msg->header.opcode = NNPFS_MSG_SYMLINK; msg->parent_handle = xn->handle; - vattr2xfs_attr(vap, &msg->attr); + vattr2nnpfs_attr(vap, &msg->attr); msg->cred.uid = cred->cr_uid; - msg->cred.pag = xfs_get_pag(cred); + msg->cred.pag = nnpfs_get_pag(cred); if (strlcpy (msg->contents, target, sizeof(msg->contents)) >= NNPFS_MAX_SYMLINK_CONTENT) { error = ENAMETOOLONG; goto done; @@ -950,9 +950,9 @@ xfs_symlink_common(struct vnode *dvp, error = ENAMETOOLONG; goto done; } - error = xfs_message_rpc(xfsp->fd, &msg->header, sizeof(*msg), proc); + error = nnpfs_message_rpc(nnpfsp->fd, &msg->header, sizeof(*msg), proc); if (error == 0) - error = ((struct xfs_message_wakeup *) msg)->error; + error = ((struct nnpfs_message_wakeup *) msg)->error; done: free(msg, M_TEMP); @@ -960,42 +960,42 @@ xfs_symlink_common(struct vnode *dvp, } int -xfs_readlink_common(struct vnode *vp, struct uio *uiop, struct ucred *cred) +nnpfs_readlink_common(struct vnode *vp, struct uio *uiop, struct ucred *cred) { int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_readlink\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_readlink\n")); #ifdef HAVE_FREEBSD_THREAD - error = xfs_data_valid(vp, cred, xfs_uio_to_thread(uiop), NNPFS_DATA_R, - xfs_uio_end_length(uiop)); + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_thread(uiop), NNPFS_DATA_R, + nnpfs_uio_end_length(uiop)); #else - error = xfs_data_valid(vp, cred, xfs_uio_to_proc(uiop), NNPFS_DATA_R, - xfs_uio_end_length(uiop)); + error = nnpfs_data_valid(vp, cred, nnpfs_uio_to_proc(uiop), NNPFS_DATA_R, + nnpfs_uio_end_length(uiop)); #endif if (error == 0) { struct vnode *t = DATA_FROM_VNODE(vp); #ifdef HAVE_FREEBSD_THREAD - xfs_vfs_readlock(t, xfs_uio_to_thread(uiop)); - xfs_vop_read(t, uiop, 0, cred, error); - xfs_vfs_unlock(t, xfs_uio_to_thread(uiop)); + nnpfs_vfs_readlock(t, nnpfs_uio_to_thread(uiop)); + nnpfs_vop_read(t, uiop, 0, cred, error); + nnpfs_vfs_unlock(t, nnpfs_uio_to_thread(uiop)); #else - xfs_vfs_readlock(t, xfs_uio_to_proc(uiop)); - xfs_vop_read(t, uiop, 0, cred, error); - xfs_vfs_unlock(t, xfs_uio_to_proc(uiop)); + nnpfs_vfs_readlock(t, nnpfs_uio_to_proc(uiop)); + nnpfs_vop_read(t, uiop, 0, cred, error); + nnpfs_vfs_unlock(t, nnpfs_uio_to_proc(uiop)); #endif } return error; } int -xfs_inactive_common(struct vnode *vp, d_thread_t *p) +nnpfs_inactive_common(struct vnode *vp, d_thread_t *p) { int error; - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); - NNPFSDEB(XDEBVNOPS, ("xfs_inactive, %lx\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_inactive, %lx\n", (unsigned long)vp)); /* @@ -1004,18 +1004,18 @@ xfs_inactive_common(struct vnode *vp, d_thread_t *p) */ if (xn == NULL) { - NNPFSDEB(XDEBVNOPS, ("xfs_inactive: clean node\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_inactive: clean node\n")); return 0; } /* xn->wr_cred not set -> NOCRED */ if (vp->v_type == VREG) - xfs_pushdirty(vp, xn->wr_cred, p); + nnpfs_pushdirty(vp, xn->wr_cred, p); - error = xfs_fsync_common(vp, xn->wr_cred, /* XXX */ 0, p); + error = nnpfs_fsync_common(vp, xn->wr_cred, /* XXX */ 0, p); if (error) { - printf ("xfs_inactive: failed writing back data: %d\n", error); + printf ("nnpfs_inactive: failed writing back data: %d\n", error); xn->flags &= ~NNPFS_DATA_DIRTY; } @@ -1024,33 +1024,33 @@ xfs_inactive_common(struct vnode *vp, d_thread_t *p) || (xn->flags & NNPFS_STALE) == NNPFS_STALE) { #ifndef __osf__ - xfs_vfs_unlock(vp, p); - NNPFSDEB(XDEBVNOPS, ("xfs_inactive: vrecycle\n")); + nnpfs_vfs_unlock(vp, p); + NNPFSDEB(XDEBVNOPS, ("nnpfs_inactive: vrecycle\n")); vrecycle(vp, p); #else /* __osf__ */ - NNPFSDEB(XDEBVNOPS, ("xfs_inactive: vp = %lx vp->v_usecount= %d\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_inactive: vp = %lx vp->v_usecount= %d\n", (unsigned long)vp, vp?vp->v_usecount:0)); #endif /* __osf__ */ } else { #ifndef __osf__ - xfs_vfs_unlock(vp, p); + nnpfs_vfs_unlock(vp, p); #endif xn->flags &= ~NNPFS_STALE; } - NNPFSDEB(XDEBVNOPS, ("return: xfs_inactive\n")); + NNPFSDEB(XDEBVNOPS, ("return: nnpfs_inactive\n")); return 0; } int -xfs_reclaim_common(struct vnode *vp) +nnpfs_reclaim_common(struct vnode *vp) { - struct xfs_message_inactivenode msg; - struct xfs *xfsp = NNPFS_FROM_VNODE(vp); - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_message_inactivenode msg; + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); - NNPFSDEB(XDEBVNOPS, ("xfs_reclaim: %lx\n", + NNPFSDEB(XDEBVNOPS, ("nnpfs_reclaim: %lx\n", (unsigned long)vp)); NNPFS_TOKEN_CLEAR(xn, @@ -1063,15 +1063,15 @@ xfs_reclaim_common(struct vnode *vp) DATA_FROM_XNODE(xn) = 0; } - xfs_remove_node(&xfsp->nodehead, xn); + nnpfs_remove_node(&nnpfsp->nodehead, xn); msg.header.opcode = NNPFS_MSG_INACTIVENODE; msg.handle = xn->handle; msg.flag = NNPFS_NOREFS | NNPFS_DELETE; - xfs_message_send(xfsp->fd, &msg.header, sizeof(msg)); + nnpfs_message_send(nnpfsp->fd, &msg.header, sizeof(msg)); - xfs_dnlc_purge(vp); - free_xfs_node(xn); + nnpfs_dnlc_purge(vp); + free_nnpfs_node(xn); return 0; } @@ -1082,18 +1082,18 @@ xfs_reclaim_common(struct vnode *vp) #if 0 int -xfs_advlock_common(struct vnode *dvp, +nnpfs_advlock_common(struct vnode *dvp, int locktype, unsigned long lockid, /* XXX this good ? */ struct ucred *cred) { - struct xfs *xfsp = NNPFS_FROM_VNODE(dvp); - struct xfs_node *xn = VNODE_TO_XNODE(dvp); + struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(dvp); + struct nnpfs_node *xn = VNODE_TO_XNODE(dvp); int error = 0; - NNPFSDEB(XDEBVNOPS, ("xfs_advlock\n")); + NNPFSDEB(XDEBVNOPS, ("nnpfs_advlock\n")); { - struct xfs_message_advlock msg; + struct nnpfs_message_advlock msg; msg.header.opcode = NNPFS_MSG_ADVLOCK; msg.handle = xn->handle; @@ -1102,14 +1102,14 @@ xfs_advlock_common(struct vnode *dvp, if (cred != NOCRED) { msg.cred.uid = cred->cr_uid; - msg.cred.pag = xfs_get_pag(cred); + msg.cred.pag = nnpfs_get_pag(cred); } else { msg.cred.uid = 0; msg.cred.pag = NNPFS_ANONYMOUSID; } - error = xfs_message_rpc(xfsp->fd, &msg.header, sizeof(msg), p); + error = nnpfs_message_rpc(nnpfsp->fd, &msg.header, sizeof(msg), p); if (error == 0) - error = ((struct xfs_message_wakeup *) & msg)->error; + error = ((struct nnpfs_message_wakeup *) & msg)->error; } if (error == 0) { @@ -1131,9 +1131,9 @@ xfs_advlock_common(struct vnode *dvp, */ void -xfs_printnode_common (struct vnode *vp) +nnpfs_printnode_common (struct vnode *vp) { - struct xfs_node *xn = VNODE_TO_XNODE(vp); + struct nnpfs_node *xn = VNODE_TO_XNODE(vp); printf ("xnode: fid: %d.%d.%d.%d\n", xn->handle.a, xn->handle.b, xn->handle.c, xn->handle.d); diff --git a/sys/xfs/xfs_vnodeops.h b/sys/nnpfs/nnpfs_vnodeops.h index de344ad0758..552734db621 100644 --- a/sys/xfs/xfs_vnodeops.h +++ b/sys/nnpfs/nnpfs_vnodeops.h @@ -31,50 +31,50 @@ * SUCH DAMAGE. */ -/* $arla: xfs_vnodeops.h,v 1.25 2002/09/07 10:46:12 lha Exp $ */ +/* $arla: nnpfs_vnodeops.h,v 1.25 2002/09/07 10:46:12 lha Exp $ */ -#ifndef _xfs_vnodeops_h -#define _xfs_vnodeops_h +#ifndef _nnpfs_vnodeops_h +#define _nnpfs_vnodeops_h /* - * xfs_vfs_readlock - * xfs_vfs_writelock - * xfs_vfs_unlock + * nnpfs_vfs_readlock + * nnpfs_vfs_writelock + * nnpfs_vfs_unlock */ #ifdef __osf__ /* XXX - what about VN_LOCK? */ -#define xfs_vfs_readlock(vp, proc) VREF((vp)) -#define xfs_vfs_writelock(vp, proc) VREF((vp)) -#define xfs_vfs_unlock(vp, proc) vrele((vp)) +#define nnpfs_vfs_readlock(vp, proc) VREF((vp)) +#define nnpfs_vfs_writelock(vp, proc) VREF((vp)) +#define nnpfs_vfs_unlock(vp, proc) vrele((vp)) /* XXX - should this do anything? */ -#define xfs_vfs_vn_lock(vp, flags, proc) (0) +#define nnpfs_vfs_vn_lock(vp, flags, proc) (0) #elif defined(HAVE_TWO_ARGUMENT_VOP_LOCK) -#define xfs_vfs_readlock(vp, proc) vn_lock((vp), LK_SHARED | LK_RETRY) -#define xfs_vfs_writelock(vp, proc) vn_lock((vp), LK_EXCLUSIVE | LK_RETRY) -#define xfs_vfs_unlock(vp, proc) VOP_UNLOCK((vp), 0) -#define xfs_vfs_vn_lock(vp, flags, proc) vn_lock((vp), (flags)) +#define nnpfs_vfs_readlock(vp, proc) vn_lock((vp), LK_SHARED | LK_RETRY) +#define nnpfs_vfs_writelock(vp, proc) vn_lock((vp), LK_EXCLUSIVE | LK_RETRY) +#define nnpfs_vfs_unlock(vp, proc) VOP_UNLOCK((vp), 0) +#define nnpfs_vfs_vn_lock(vp, flags, proc) vn_lock((vp), (flags)) #elif defined(HAVE_THREE_ARGUMENT_VOP_LOCK) -#define xfs_vfs_readlock(vp, proc) vn_lock((vp), LK_SHARED | LK_RETRY, (proc)) -#define xfs_vfs_writelock(vp, proc) vn_lock((vp), LK_EXCLUSIVE | LK_RETRY, (proc)) -#define xfs_vfs_unlock(vp, proc) VOP_UNLOCK((vp), 0, (proc)) -#define xfs_vfs_vn_lock(vp, flags, proc) vn_lock((vp), (flags), (proc)) +#define nnpfs_vfs_readlock(vp, proc) vn_lock((vp), LK_SHARED | LK_RETRY, (proc)) +#define nnpfs_vfs_writelock(vp, proc) vn_lock((vp), LK_EXCLUSIVE | LK_RETRY, (proc)) +#define nnpfs_vfs_unlock(vp, proc) VOP_UNLOCK((vp), 0, (proc)) +#define nnpfs_vfs_vn_lock(vp, flags, proc) vn_lock((vp), (flags), (proc)) #elif defined(HAVE_ONE_ARGUMENT_VOP_LOCK) -#define xfs_vfs_readlock(vp, proc) VOP_LOCK((vp)) -#define xfs_vfs_writelock(vp, proc) VOP_LOCK((vp)) -#define xfs_vfs_unlock(vp, proc) VOP_UNLOCK((vp)) +#define nnpfs_vfs_readlock(vp, proc) VOP_LOCK((vp)) +#define nnpfs_vfs_writelock(vp, proc) VOP_LOCK((vp)) +#define nnpfs_vfs_unlock(vp, proc) VOP_UNLOCK((vp)) /* XXX - should this do anything? */ -#define xfs_vfs_vn_lock(vp, flags, proc) (0) +#define nnpfs_vfs_vn_lock(vp, flags, proc) (0) #else @@ -83,75 +83,75 @@ #endif int -xfs_open_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, +nnpfs_open_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, u_int tok); int -xfs_attr_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, +nnpfs_attr_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, u_int tok); int -xfs_fetch_rights(struct vnode *vp, struct ucred *cred, d_thread_t *p); +nnpfs_fetch_rights(struct vnode *vp, struct ucred *cred, d_thread_t *p); int -xfs_data_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, +nnpfs_data_valid(struct vnode *vp, struct ucred *cred, d_thread_t *p, u_int tok, uint32_t offset); int -xfs_open_common(struct vnode *vp, +nnpfs_open_common(struct vnode *vp, int mode, struct ucred *cred, d_thread_t *p); int -xfs_fsync_common(struct vnode *vp, struct ucred *cred, +nnpfs_fsync_common(struct vnode *vp, struct ucred *cred, int waitfor, d_thread_t *proc); int -xfs_close_common(struct vnode *vp, int fflag, +nnpfs_close_common(struct vnode *vp, int fflag, d_thread_t *proc, struct ucred *cred); int -xfs_read_common(struct vnode *vp, struct uio *uio, int ioflag, +nnpfs_read_common(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred); int -xfs_write_common(struct vnode *vp, struct uio *uiop, int ioflag, +nnpfs_write_common(struct vnode *vp, struct uio *uiop, int ioflag, struct ucred *cred); int -xfs_getattr_common(struct vnode *vp, struct vattr *vap, +nnpfs_getattr_common(struct vnode *vp, struct vattr *vap, struct ucred *cred, d_thread_t *p); int -xfs_setattr_common(struct vnode *vp, struct vattr *vap, +nnpfs_setattr_common(struct vnode *vp, struct vattr *vap, struct ucred *cred, d_thread_t *p); int -xfs_access_common(struct vnode *vp, int mode, +nnpfs_access_common(struct vnode *vp, int mode, struct ucred *cred, d_thread_t *p); int -xfs_lookup_common(struct vnode *dvp, - xfs_componentname *cnp, +nnpfs_lookup_common(struct vnode *dvp, + nnpfs_componentname *cnp, struct vnode **vpp); int -xfs_create_common(struct vnode *dvp, +nnpfs_create_common(struct vnode *dvp, const char *name, struct vattr *vap, struct ucred *cred, d_thread_t *p); int -xfs_remove_common(struct vnode *dvp, +nnpfs_remove_common(struct vnode *dvp, struct vnode *vp, const char *name, struct ucred *cred, d_thread_t *p); int -xfs_rename_common(struct vnode *fdvp, +nnpfs_rename_common(struct vnode *fdvp, struct vnode *fvp, const char *fname, struct vnode *tdvp, @@ -161,60 +161,60 @@ xfs_rename_common(struct vnode *fdvp, d_thread_t *p); int -xfs_mkdir_common(struct vnode *dvp, +nnpfs_mkdir_common(struct vnode *dvp, const char *name, struct vattr *vap, struct ucred *cred, d_thread_t *p); int -xfs_rmdir_common(struct vnode *dvp, +nnpfs_rmdir_common(struct vnode *dvp, struct vnode *vp, const char *name, struct ucred *cred, d_thread_t *p); int -xfs_readdir_common(struct vnode *vp, +nnpfs_readdir_common(struct vnode *vp, struct uio *uiop, struct ucred *cred, d_thread_t *p, int *eofflag); int -xfs_link_common(struct vnode *dvp, +nnpfs_link_common(struct vnode *dvp, struct vnode *vp, const char *name, struct ucred *cred, d_thread_t *p); int -xfs_symlink_common(struct vnode *dvp, +nnpfs_symlink_common(struct vnode *dvp, struct vnode **vpp, - xfs_componentname *cnp, + nnpfs_componentname *cnp, struct vattr *vap, char *target); int -xfs_readlink_common(struct vnode *vp, struct uio *uiop, struct ucred *cred); +nnpfs_readlink_common(struct vnode *vp, struct uio *uiop, struct ucred *cred); int -xfs_inactive_common(struct vnode *vp, d_thread_t *p); +nnpfs_inactive_common(struct vnode *vp, d_thread_t *p); int -xfs_reclaim_common(struct vnode *vp); +nnpfs_reclaim_common(struct vnode *vp); int -xfs_eopnotsupp (struct vop_generic_args *ap); +nnpfs_eopnotsupp (struct vop_generic_args *ap); int -xfs_returnzero (struct vop_generic_args *ap); +nnpfs_returnzero (struct vop_generic_args *ap); void -xfs_printnode_common (struct vnode *vp); +nnpfs_printnode_common (struct vnode *vp); size_t -xfs_uio_end_length (struct uio *uio); +nnpfs_uio_end_length (struct uio *uio); -#endif /* _xfs_vnodeops_h */ +#endif /* _nnpfs_vnodeops_h */ diff --git a/sys/xfs/xfs_vopdefs.h b/sys/nnpfs/nnpfs_vopdefs.h index 0082f332faf..0082f332faf 100644 --- a/sys/xfs/xfs_vopdefs.h +++ b/sys/nnpfs/nnpfs_vopdefs.h diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 2c282b0181b..c1f7337d75d 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.93 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: conf.h,v 1.94 2009/06/03 14:45:55 jj Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -369,7 +369,7 @@ extern struct cdevsw cdevsw[]; 0, (dev_type_poll((*))) enodev, (dev_type_mmap((*))) enodev } /* open, close, read, write, ioctl, poll, nokqfilter */ -#define cdev_xfs_init(c, n) { \ +#define cdev_nnpfs_init(c, n) { \ dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ dev_init(c,n,write), dev_init(c,n,ioctl), \ (dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \ diff --git a/sys/sys/mount.h b/sys/sys/mount.h index d15bb6c8063..0d515480cb6 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.h,v 1.91 2008/07/22 08:05:02 thib Exp $ */ +/* $OpenBSD: mount.h,v 1.92 2009/06/03 14:45:55 jj Exp $ */ /* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */ /* @@ -371,7 +371,8 @@ struct ostatfs { #define MOUNT_CD9660 "cd9660" /* ISO9660 (aka CDROM) Filesystem */ #define MOUNT_EXT2FS "ext2fs" /* Second Extended Filesystem */ #define MOUNT_NCPFS "ncpfs" /* NetWare Network File System */ -#define MOUNT_XFS "xfs" /* xfs */ +#define MOUNT_XFS "nnpfs" /* nnpfs (temp) */ +#define MOUNT_NNPFS "nnpfs" /* nnpfs */ #define MOUNT_NTFS "ntfs" /* NTFS */ #define MOUNT_UDF "udf" /* UDF */ diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 1e9c078a909..425bab6e3a0 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.102 2009/03/12 07:04:48 guenther Exp $ */ +/* $OpenBSD: syscall.h,v 1.103 2009/06/03 14:45:55 jj Exp $ */ /* * System call numbers. @@ -505,8 +505,8 @@ /* syscall: "getpgid" ret: "pid_t" args: "pid_t" */ #define SYS_getpgid 207 -/* syscall: "xfspioctl" ret: "int" args: "int" "char *" "int" "struct ViceIoctl *" "int" */ -#define SYS_xfspioctl 208 +/* syscall: "nnpfspioctl" ret: "int" args: "int" "char *" "int" "struct ViceIoctl *" "int" */ +#define SYS_nnpfspioctl 208 /* 220 is compat_23 semctl23 */ diff --git a/sys/sys/syscallargs.h b/sys/sys/syscallargs.h index cfa30a6c418..304c84b2bd2 100644 --- a/sys/sys/syscallargs.h +++ b/sys/sys/syscallargs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscallargs.h,v 1.104 2009/03/12 07:04:49 guenther Exp $ */ +/* $OpenBSD: syscallargs.h,v 1.105 2009/06/03 14:45:55 jj Exp $ */ /* * System call argument lists. @@ -899,7 +899,7 @@ struct sys_getpgid_args { syscallarg(pid_t) pid; }; -struct sys_xfspioctl_args { +struct sys_nnpfspioctl_args { syscallarg(int) operation; syscallarg(char *) a_pathP; syscallarg(int) a_opcode; @@ -1463,7 +1463,7 @@ int sys_mlock(struct proc *, void *, register_t *); int sys_munlock(struct proc *, void *, register_t *); int sys_futimes(struct proc *, void *, register_t *); int sys_getpgid(struct proc *, void *, register_t *); -int sys_xfspioctl(struct proc *, void *, register_t *); +int sys_nnpfspioctl(struct proc *, void *, register_t *); #ifdef LKM int sys_lkmnosys(struct proc *, void *, register_t *); int sys_lkmnosys(struct proc *, void *, register_t *); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 82c3312355f..76a5fe81c41 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.98 2009/06/03 04:30:57 beck Exp $ */ +/* $OpenBSD: vnode.h,v 1.99 2009/06/03 14:45:55 jj Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -67,13 +67,13 @@ enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD }; enum vtagtype { VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_MSDOSFS, VT_PORTAL, VT_PROCFS, VT_AFS, VT_ISOFS, VT_ADOSFS, - VT_EXT2FS, VT_VFS, VT_XFS, VT_NTFS, VT_UDF + VT_EXT2FS, VT_VFS, VT_NNPFS, VT_NTFS, VT_UDF, VT_XFS = VT_NNPFS }; #define VTAG_NAMES \ "NON", "UFS", "NFS", "MFS", "MSDOSFS", \ "PORTAL", "PROCFS", "AFS", "ISOFS", "ADOSFS", \ - "EXT2FS", "VFS", "XFS", "NTFS", "UDF" + "EXT2FS", "VFS", "NNPFS", "NTFS", "UDF" /* * Each underlying filesystem allocates its own private area and hangs diff --git a/sys/xfs/nxfs.h b/sys/xfs/nxfs.h deleted file mode 100644 index 6c1052b0926..00000000000 --- a/sys/xfs/nxfs.h +++ /dev/null @@ -1 +0,0 @@ -#define NXFS 2 /* maximum number of filesystems on a single device */ diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 74cc99aacca..0185d6c6913 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.63 2009/05/31 19:31:23 thib Exp $ */ +/* $OpenBSD: fstat.c,v 1.64 2009/06/03 14:45:55 jj Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: fstat.c,v 1.63 2009/05/31 19:31:23 thib Exp $"; +static char *rcsid = "$OpenBSD: fstat.c,v 1.64 2009/06/03 14:45:55 jj Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -68,8 +68,8 @@ static char *rcsid = "$OpenBSD: fstat.c,v 1.63 2009/05/31 19:31:23 thib Exp $"; #include <nfs/nfs.h> #include <nfs/nfsnode.h> -#include <xfs/xfs_config.h> -#include <xfs/xfs_node.h> +#include <nnpfs/nnpfs_config.h> +#include <nnpfs/nnpfs_node.h> #include <miscfs/specfs/specdev.h> @@ -151,7 +151,7 @@ int ext2fs_filestat(struct vnode *, struct filestat *); int isofs_filestat(struct vnode *, struct filestat *); int msdos_filestat(struct vnode *, struct filestat *); int nfs_filestat(struct vnode *, struct filestat *); -int xfs_filestat(struct vnode *, struct filestat *); +int nnpfs_filestat(struct vnode *, struct filestat *); int spec_filestat(struct vnode *, struct filestat *); void dofiles(struct kinfo_proc2 *); void getinetproto(int); @@ -453,8 +453,8 @@ vtrans(struct vnode *vp, int i, int flag, struct file *fp) if (!msdos_filestat(&vn, &fst)) badtype = "error"; break; - case VT_XFS: - if (!xfs_filestat(&vn, &fst)) + case VT_NNPFS: + if (!nnpfs_filestat(&vn, &fst)) badtype = "error"; break; case VT_NON: @@ -676,20 +676,20 @@ nfs_filestat(struct vnode *vp, struct filestat *fsp) } int -xfs_filestat(struct vnode *vp, struct filestat *fsp) +nnpfs_filestat(struct vnode *vp, struct filestat *fsp) { - struct xfs_node xfs_node; + struct nnpfs_node nnpfs_node; - if (!KVM_READ(VNODE_TO_XNODE(vp), &xfs_node, sizeof (xfs_node))) { - dprintf("can't read xfs_node at %p for pid %ld", + if (!KVM_READ(VNODE_TO_XNODE(vp), &nnpfs_node, sizeof (nnpfs_node))) { + dprintf("can't read nnpfs_node at %p for pid %ld", VTOI(vp), (long)Pid); return 0; } - fsp->fsid = xfs_node.attr.va_fsid; - fsp->fileid = (long)xfs_node.attr.va_fileid; - fsp->mode = xfs_node.attr.va_mode; - fsp->size = xfs_node.attr.va_size; - fsp->rdev = xfs_node.attr.va_rdev; + fsp->fsid = nnpfs_node.attr.va_fsid; + fsp->fileid = (long)nnpfs_node.attr.va_fileid; + fsp->mode = nnpfs_node.attr.va_mode; + fsp->size = nnpfs_node.attr.va_size; + fsp->rdev = nnpfs_node.attr.va_rdev; return 1; } diff --git a/usr.sbin/afs/src/arlad/arlad.8 b/usr.sbin/afs/src/arlad/arlad.8 index 5e6e72d737f..f80719d9125 100644 --- a/usr.sbin/afs/src/arlad/arlad.8 +++ b/usr.sbin/afs/src/arlad/arlad.8 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: arlad.8,v 1.9 2004/01/20 08:51:28 hin Exp $ +.\" $OpenBSD: arlad.8,v 1.10 2009/06/03 14:45:56 jj Exp $ .\" $arla: arlad.8,v 1.18 2003/06/06 12:53:56 hin Exp $ .\" .Dd September 5, 1998 @@ -102,7 +102,7 @@ What to write in the log (default: none). .Fl -device= Ns Ar string .Xc The XFS device to use -.Po default: Pa /dev/xfs0 +.Po default: Pa /dev/nnpfs0 .Pc . .It Xo .Fl -connected-mode= Ns Ar string diff --git a/usr.sbin/afs/src/arlad/arlad.c b/usr.sbin/afs/src/arlad/arlad.c index 45ff4ec9140..4c141297fc2 100644 --- a/usr.sbin/afs/src/arlad/arlad.c +++ b/usr.sbin/afs/src/arlad/arlad.c @@ -44,7 +44,7 @@ int client_port = 0; static char *pid_filename; #define _PATH_VAR_RUN "/var/run" -#define _PATH_DEV_NNPFS0 "/dev/xfs0" +#define _PATH_DEV_NNPFS0 "/dev/nnpfs0" #define _PATH_DEV_STDERR "/dev/stderr" /* diff --git a/usr.sbin/afs/src/arlad/xfs.h b/usr.sbin/afs/src/arlad/xfs.h index 0256931badc..1c21d2a0f38 100644 --- a/usr.sbin/afs/src/arlad/xfs.h +++ b/usr.sbin/afs/src/arlad/xfs.h @@ -32,38 +32,38 @@ */ /* - * $KTH: xfs.h,v 1.8 2000/10/02 22:33:30 lha Exp $ + * $KTH: nnpfs.h,v 1.8 2000/10/02 22:33:30 lha Exp $ */ -#ifndef __XFS_H_V -#define __XFS_H_V 1 +#ifndef __NNPFS_H_V +#define __NNPFS_H_V 1 -void xfs_probe_version (int fd, int version); +void nnpfs_probe_version (int fd, int version); -void xfs_message_init (void); -int xfs_message_receive (int fd, struct xfs_message_header *h, u_int size); -int xfs_message_receive (int fd, struct xfs_message_header *h, u_int size); -void xfs_send_message_gc_nodes (int fd, int num, VenusFid *fids); -int xfs_message_wakeup (int fd, struct xfs_message_wakeup *h, u_int size); -int xfs_message_sleep (u_int seqnum); -int xfs_send_message_wakeup (int fd, u_int seqnum, int error); -int xfs_send_message_wakeup_vmultiple (int fd, u_int seqnum, +void nnpfs_message_init (void); +int nnpfs_message_receive (int fd, struct nnpfs_message_header *h, u_int size); +int nnpfs_message_receive (int fd, struct nnpfs_message_header *h, u_int size); +void nnpfs_send_message_gc_nodes (int fd, int num, VenusFid *fids); +int nnpfs_message_wakeup (int fd, struct nnpfs_message_wakeup *h, u_int size); +int nnpfs_message_sleep (u_int seqnum); +int nnpfs_send_message_wakeup (int fd, u_int seqnum, int error); +int nnpfs_send_message_wakeup_vmultiple (int fd, u_int seqnum, int error, va_list args); -int xfs_send_message_wakeup_multiple (int fd, u_int seqnum, +int nnpfs_send_message_wakeup_multiple (int fd, u_int seqnum, int error, ...); -int xfs_send_message_wakeup_data (int fd, u_int seqnum, int error, +int nnpfs_send_message_wakeup_data (int fd, u_int seqnum, int error, void *data, int size); -int xfs_send_message_multiple_list (int fd, struct xfs_message_header *h, +int nnpfs_send_message_multiple_list (int fd, struct nnpfs_message_header *h, size_t size, u_int num); -int xfs_send_message_multiple (int fd, ...); -int xfs_send_message_vmultiple (int fd, va_list args); +int nnpfs_send_message_multiple (int fd, ...); +int nnpfs_send_message_vmultiple (int fd, va_list args); -int xfs_message_send (int fd, struct xfs_message_header *h, u_int size); -int xfs_message_rpc (int fd, struct xfs_message_header *h, u_int size); +int nnpfs_message_send (int fd, struct nnpfs_message_header *h, u_int size); +int nnpfs_message_rpc (int fd, struct nnpfs_message_header *h, u_int size); typedef int -(*xfs_message_function) (int, struct xfs_message_header*, u_int); +(*nnpfs_message_function) (int, struct nnpfs_message_header*, u_int); -extern xfs_message_function rcvfuncs[XFS_MSG_COUNT]; +extern nnpfs_message_function rcvfuncs[NNPFS_MSG_COUNT]; -#endif /* __XFS_H_V */ +#endif /* __NNPFS_H_V */ diff --git a/usr.sbin/afs/src/include/kafs.h b/usr.sbin/afs/src/include/kafs.h index fa858101203..aaf21a5b03c 100644 --- a/usr.sbin/afs/src/include/kafs.h +++ b/usr.sbin/afs/src/include/kafs.h @@ -92,7 +92,7 @@ #endif /* NEED_VICEIOCTL32 */ -#include <xfs/xfs_pioctl.h> +#include <nnpfs/nnpfs_pioctl.h> /* * ioctls |