CTM_BEGIN 2.0 src-cur 12078 20150807030849Z . CTMFS .ctm_status 1004 1004 644 fe63ade2a303d85981035ad4f23abde8 1e8befd1a4c9fe7d0b8c709758baee4f 14 src-cur 12078 CTMFS .svn_revision 1004 1004 644 164e3215d9534525bf1cc29d92278b4b 5c3a64e6f8ce5db031e7c442d513d03c 7 286394 CTMFN UPDATING 1004 1004 644 98d9c521f6ca1d686d578e4b43016270 9c991179e4a31ea7dd76a8c88b90389a 246 a33 5 20150806: The menu.rc and loader.rc files will now be replaced during upgrades. Please migrate local changes to menu.rc.local and loader.rc.local instead. d1336 1 a1336 1 $FreeBSD: head/UPDATING 286368 2015-08-06 16:07:27Z allanjude $ CTMFN etc/portsnap.conf 1004 1004 644 446e9142214613d5d166929f642fb623 b68fc420518f2218587fb6cb44d7fb6f 122 d1 1 a1 1 # $FreeBSD: head/etc/portsnap.conf 286392 2015-08-06 23:44:46Z delphij $ d33 1 a35 1 INDEX INDEX-11 DESCRIBE.11 CTMFN release/doc/en_US.ISO8859-1/relnotes/article.xml 1004 1004 644 b6a27cef81e9f926d4f925a441fcb8f5 ab856cb7694913bd2854d90fc491949f 188 d23 1 a23 1 $FreeBSD: head/release/doc/en_US.ISO8859-1/relnotes/article.xml 286364 2015-08-06 14:13:01Z gjb $ d1408 1 a1408 1 Network Protocols CTMFN share/man/man4/bwi.4 1004 1004 644 8bd1f32a4a8b5399dc2f8e95a810e070 d41de4a39a8159dbf5e2d078a1837c2b 164 d25 1 a25 1 .\" $FreeBSD: head/share/man/man4/bwi.4 286393 2015-08-07 02:05:16Z kevlo $ d27 1 a27 1 .Dd August 7, 2015 a78 1 .It "ASUS WL-100g BCM4306 CardBus b/g" CTMFN share/man/man4/uftdi.4 1004 1004 644 7a86e8bbd5e7dd5af16074f643a1cb75 8867a797222b284ce4514f7289b2fe39 2039 d30 1 a30 1 .\" $FreeBSD: head/share/man/man4/uftdi.4 286389 2015-08-06 20:59:03Z ian $ d32 1 a32 1 .Dd August 6, 2015 a112 5 Setting .Va mode to .Dv UFTDI_BITMODE_NONE returns the channel to standard UART mode. d142 1 a142 4 Return the current bitbang mode in the .Va mode member, and the state of the DBUS0..DBUS7 pins at the time of the call in the d145 3 a147 3 The pin state can be read while the chip is in any mode, including .Dv UFTDI_BITMODE_NONE (UART) mode. a166 48 .It Dv UFTDIIOC_READ_EEPROM Pq Vt "struct uftdi_eeio" Read one or more words from the configuration eeprom. The FTDI chip performs eeprom I/O in 16-bit words. Set .Va offset and .Va length to values evenly divisible by two before the call, and the .Va data array will contain the requested values from eeprom after the call. .Bd -literal struct uftdi_eeio { uint16_t offset; uint16_t length; uint16_t data[64]; }; .Ed .Pp The FT232R chip has an internal eeprom. An external serial eeprom is optional on other FTDI chips. The eeprom may contain 64, 128, or 256 words, depending on the part used. Multiple calls may be needed to read or write the larger parts. When no eeprom is present, all words in the returned data are 0xffff. An erased eeprom also reads as all 0xffff. .It Dv UFTDIIOC_WRITE_EEPROM Pq Vt "struct uftdi_eeio" Write one or more words to the configuration eeprom. The .Va uftdi_eeio values are as described for .Dv UFTDIIOC_READ_EEPROM . .Pp The FTDI chip does a blind write to the eeprom, and it will appear to succeed even when no eeprom is present. To ensure a good write you must read back and verify the data. It is .Em not necessary to erase before writing. Any position within the eeprom can be overwritten at any time. .It Dv UFTDIIOC_ERASE_EEPROM Pq Vt int Erase the entire eeprom. This is useful primarily for test and debugging, as there is no need to erase before writing. To help prevent accidental erasure caused by calling the wrong ioctl, you must pass the special value .Dv UFTDI_CONFIRM_ERASE as the argument to this ioctl. CTMFR sys/amd64/include/xen/xenfunc.h ceeca9f66675ac2739e6820a1c712e5a CTMFR sys/amd64/include/xen/xenvar.h 7dd52f63e1a8cd77e505956bd65a8e81 CTMFN sys/arm64/arm64/machdep.c 1004 1004 644 46f697689f47efd1eca6b350bc08f2be 7b9b6fcca6d6f87692e2cc95af77bb50 279 d31 1 a31 1 __FBSDID("$FreeBSD: head/sys/arm64/arm64/machdep.c 286366 2015-08-06 14:49:23Z andrew $"); d825 1 a825 3 for (i = 0; i < physmap_idx; i += 2) { dump_avail[i] = physmap[i]; dump_avail[i + 1] = physmap[i + 1]; a826 3 } dump_avail[i] = 0; dump_avail[i + 1] = 0; CTMFN sys/boot/forth/loader.rc 1004 1004 644 bdd113b0f44ffba8ba9947b67860979b bd2e8bec602df02947b363d3284b6123 226 d2 1 a2 4 \ $FreeBSD: head/sys/boot/forth/loader.rc 286368 2015-08-06 16:07:27Z allanjude $ \ \ You should not edit this file! Put any overrides in loader.rc.local \ instead as this file can be replaced during system updates. CTMFN sys/boot/forth/menu.rc 1004 1004 644 cb1025e594ec4fb0681742192a494048 9fbecf11617b5db564002f6a77cbeb85 222 d2 1 a2 4 \ $FreeBSD: head/sys/boot/forth/menu.rc 286368 2015-08-06 16:07:27Z allanjude $ \ \ You should not edit this file! Put any overrides in menu.rc.local \ instead as this file can be replaced during system updates. CTMFN sys/boot/i386/loader/Makefile 1004 1004 644 a318746665b299c48edd90ae69a14c79 9557d6aac2c8cc10532dd9546196f5c1 137 d1 1 a1 1 # $FreeBSD: head/sys/boot/i386/loader/Makefile 286368 2015-08-06 16:07:27Z allanjude $ d113 6 a118 1 FILES+= loader.rc menu.rc CTMFN sys/boot/mips/beri/loader/Makefile 1004 1004 644 53a4aafd1c55092e96ecbc45551af5ed d9695f0b9e22c5e578f9663f88825390 144 d30 1 a30 1 # $FreeBSD: head/sys/boot/mips/beri/loader/Makefile 286368 2015-08-06 16:07:27Z allanjude $ d128 7 a134 1 FILES+= loader.rc menu.rc CTMFN sys/boot/pc98/loader/Makefile 1004 1004 644 f4d13beb60470834ad425ee9aeb04c9f 56690c5d34706c679ed8e89f66d3ea80 164 d1 1 a1 1 # $FreeBSD: head/sys/boot/pc98/loader/Makefile 286368 2015-08-06 16:07:27Z allanjude $ d93 6 a98 1 FILES+= ${.CURDIR}/../../i386/loader/loader.rc menu.rc CTMFN sys/boot/powerpc/kboot/Makefile 1004 1004 644 d784651e7990463a4c1f2f537428523b dadc6b5a025c6248dd0b009b62de1cbb 139 d1 1 a1 1 # $FreeBSD: head/sys/boot/powerpc/kboot/Makefile 286368 2015-08-06 16:07:27Z allanjude $ d120 7 a126 1 FILES+= loader.rc menu.rc CTMFN sys/boot/powerpc/ofw/Makefile 1004 1004 644 187e927d5bad3cee5139eef0f98ad85f b120dc7a23d136de2792584bf1a064e2 137 d1 1 a1 1 # $FreeBSD: head/sys/boot/powerpc/ofw/Makefile 286368 2015-08-06 16:07:27Z allanjude $ d115 7 a121 1 FILES+= loader.rc menu.rc CTMFN sys/boot/powerpc/ps3/Makefile 1004 1004 644 806da91b63fc354b7c0b0c4d3d73b6bf 32cfa61c7a38dcf4e2ebde53f73eb20e 137 d1 1 a1 1 # $FreeBSD: head/sys/boot/powerpc/ps3/Makefile 286368 2015-08-06 16:07:27Z allanjude $ d117 7 a123 1 FILES+= loader.rc menu.rc CTMFN sys/boot/sparc64/loader/Makefile 1004 1004 644 52e0559cd7db4f95761b1ba0fc46f553 0b50a5ca5bb506ce26d8b69f9b9bb46c 140 d1 1 a1 1 # $FreeBSD: head/sys/boot/sparc64/loader/Makefile 286368 2015-08-06 16:07:27Z allanjude $ d102 7 a108 1 FILES+= loader.rc menu.rc CTMFN sys/dev/usb/serial/uftdi.c 1004 1004 644 08c1e1af947dacdbc074fb34aec4393d b38b6e92af2fc9e5c1cc6713fa0841b2 3022 d33 1 a33 1 __FBSDID("$FreeBSD: head/sys/dev/usb/serial/uftdi.c 286385 2015-08-06 19:47:04Z ian $"); a163 1 uint8_t sc_bitmode; d199 1 a199 1 static int uftdi_get_bitmode(struct ucom_softc *, uint8_t *, uint8_t *); a1092 1 sc->sc_bitmode = UFTDI_BITMODE_NONE; a1683 1 int rv; d1696 1 a1696 5 rv = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL); if (rv == USB_ERR_NORMAL_COMPLETION) sc->sc_bitmode = bitmode; return (rv); d1700 1 a1700 1 uftdi_get_bitmode(struct ucom_softc *ucom, uint8_t *bitmode, uint8_t *iomask) a1711 1 *bitmode = sc->sc_bitmode; a1793 76 uftdi_read_eeprom(struct ucom_softc *ucom, struct uftdi_eeio *eeio) { struct uftdi_softc *sc = ucom->sc_parent; usb_device_request_t req; usb_error_t err; uint16_t widx, wlength, woffset; /* Offset and length must both be evenly divisible by two. */ if ((eeio->offset | eeio->length) & 0x01) return (EINVAL); woffset = eeio->offset / 2U; wlength = eeio->length / 2U; for (widx = 0; widx < wlength; widx++) { req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = FTDI_SIO_READ_EEPROM; USETW(req.wIndex, widx + woffset); USETW(req.wLength, 2); USETW(req.wValue, 0); err = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, &eeio->data[widx]); if (err != USB_ERR_NORMAL_COMPLETION) return (err); } return (USB_ERR_NORMAL_COMPLETION); } static int uftdi_write_eeprom(struct ucom_softc *ucom, struct uftdi_eeio *eeio) { struct uftdi_softc *sc = ucom->sc_parent; usb_device_request_t req; usb_error_t err; uint16_t widx, wlength, woffset; /* Offset and length must both be evenly divisible by two. */ if ((eeio->offset | eeio->length) & 0x01) return (EINVAL); woffset = eeio->offset / 2U; wlength = eeio->length / 2U; for (widx = 0; widx < wlength; widx++) { req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = FTDI_SIO_WRITE_EEPROM; USETW(req.wIndex, widx + woffset); USETW(req.wLength, 0); USETW(req.wValue, eeio->data[widx]); err = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL); if (err != USB_ERR_NORMAL_COMPLETION) return (err); } return (USB_ERR_NORMAL_COMPLETION); } static int uftdi_erase_eeprom(struct ucom_softc *ucom, int confirmation) { struct uftdi_softc *sc = ucom->sc_parent; usb_device_request_t req; usb_error_t err; /* Small effort to prevent accidental erasure. */ if (confirmation != UFTDI_CONFIRM_ERASE) return (EINVAL); req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = FTDI_SIO_ERASE_EEPROM; USETW(req.wIndex, 0); USETW(req.wLength, 0); USETW(req.wValue, 0); err = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL); return (err); } static int d1818 1 a1818 1 err = uftdi_get_bitmode(ucom, &mode->mode, &mode->iomask); a1835 9 case UFTDIIOC_READ_EEPROM: err = uftdi_read_eeprom(ucom, (struct uftdi_eeio *)data); break; case UFTDIIOC_WRITE_EEPROM: err = uftdi_write_eeprom(ucom, (struct uftdi_eeio *)data); break; case UFTDIIOC_ERASE_EEPROM: err = uftdi_erase_eeprom(ucom, *(int *)data); break; CTMFN sys/dev/usb/serial/uftdi_reg.h 1004 1004 644 6221086f3fe82b49e993287d4d9b63b0 4a11da9766de79c9c56e0bcd53ce8675 350 d2 1 a2 1 /* $FreeBSD: head/sys/dev/usb/serial/uftdi_reg.h 286382 2015-08-06 19:29:26Z ian $ */ d34 1 a34 4 #define FTDI_SIO_GET_BITMODE 12 /* Read pin states from any mode */ #define FTDI_SIO_READ_EEPROM 144 /* Read eeprom word */ #define FTDI_SIO_WRITE_EEPROM 145 /* Write eeprom word */ #define FTDI_SIO_ERASE_EEPROM 146 /* Erase entire eeprom */ CTMFN sys/dev/usb/uftdiio.h 1004 1004 644 20380337368662643bd58b37d954dac4 96ac99a8fcc01f39a2c3561e61c1d69c 1162 d26 1 a26 1 * $FreeBSD: head/sys/dev/usb/uftdiio.h 286385 2015-08-06 19:47:04Z ian $ d46 1 a46 1 UFTDI_BITMODE_NONE = 0xff, /* aka UART mode. */ d55 2 a56 3 * mode = Mode most recently set using UFTDIIOC_SET_BITMODE. * iomask = Returned snapshot of DBUS0..DBUS7 pin states at time of call. * Pin states can be read in any mode, not just bitbang modes. a63 20 /* * For UFTDIIOC_READ_EEPROM, UFTDIIOC_WRITE_EEPROM: * * IO is done in 16-bit words at the chip level; offset and length are in bytes, * but must each be evenly divisible by two. * * It is not necessary to erase before writing. For the FT232R device (only) * you must set the latency timer to 0x77 before doing a series of eeprom writes * (and restore it to the prior value when done). */ struct uftdi_eeio { uint16_t offset; uint16_t length; uint16_t data[64]; }; /* Pass this value to confirm that eeprom erase request is not accidental. */ #define UFTDI_CONFIRM_ERASE 0x26139108 a73 3 #define UFTDIIOC_READ_EEPROM _IOWR('c', 10, struct uftdi_eeio) #define UFTDIIOC_WRITE_EEPROM _IOW('c', 11, struct uftdi_eeio) #define UFTDIIOC_ERASE_EEPROM _IOW('c', 12, int) CTMFN sys/dev/wtap/if_wtap.c 1004 1004 644 45301052c1a1ae40a2b7593caa722b2b 7b18d4f4945974bfe357f1cc2bacb834 257 d32 1 a32 1 * $FreeBSD: head/sys/dev/wtap/if_wtap.c 286363 2015-08-06 14:05:17Z glebius $ d166 1 a166 1 int subtype, const struct ieee80211_rx_stats *stats, int rssi, int nf) d172 1 a172 1 WTAP_VAP(vap)->av_recv_mgmt(ni, m, subtype, stats, rssi, nf); CTMFN sys/dev/wtap/if_wtapvar.h 1004 1004 644 99c843885f5ef32e2f5ff7f27efd9290 70770c723d646693c8ce7ada64f422da 179 d29 1 a29 1 * $FreeBSD: head/sys/dev/wtap/if_wtapvar.h 286363 2015-08-06 14:05:17Z glebius $ d123 1 a123 1 struct mbuf *, int, const struct ieee80211_rx_stats *, int, int); CTMFN sys/dev/xen/balloon/balloon.c 1004 1004 644 1f1509f5c1f330d663a637cee3c2ae60 75c0024eb7cc0abd63d88b1727c181c2 110 d33 1 a33 1 __FBSDID("$FreeBSD: head/sys/dev/xen/balloon/balloon.c 286372 2015-08-06 17:07:21Z jhb $"); d52 2 CTMFN sys/dev/xen/blkfront/blkfront.c 1004 1004 644 27ab1611cd1328fdf5c42b3a38e27731 c4a2611183f033ce27bec16930c189de 241 d32 1 a32 1 __FBSDID("$FreeBSD: head/sys/dev/xen/blkfront/blkfront.c 286372 2015-08-06 17:07:21Z jhb $"); d63 1 d765 1 a765 1 (vtophys(sring_page_addr) >> PAGE_SHIFT), d1308 1 a1308 1 (vtophys(indirectpages) >> PAGE_SHIFT) + j, CTMFN sys/dev/xen/control/control.c 1004 1004 644 0df4327b5d6ce565ad2371a861105ef9 f0686775312fea56b68df342bd52d4e5 111 d92 1 a92 1 __FBSDID("$FreeBSD: head/sys/dev/xen/control/control.c 286372 2015-08-06 17:07:21Z jhb $"); d148 3 CTMFN sys/dev/xen/netback/netback.c 1004 1004 644 d695919c6f70c3e552d82dd93633f248 6a1b0e9943710bfaf7d336275a580fe5 174 d36 1 a36 1 __FBSDID("$FreeBSD: head/sys/dev/xen/netback/netback.c 286372 2015-08-06 17:07:21Z jhb $"); d90 2 d135 1 a135 1 #define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT) CTMFN sys/dev/xen/netfront/netfront.c 1004 1004 644 a5e240834f433585a1cf6746a316c92d 5b93711559219b8c3324d941b8a022ad 244 d28 1 a28 1 __FBSDID("$FreeBSD: head/sys/dev/xen/netfront/netfront.c 286372 2015-08-06 17:07:21Z jhb $"); d89 2 d193 1 a193 1 #define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT) d904 1 a904 1 vtophys(mtod(m_new,vm_offset_t)) >> PAGE_SHIFT; CTMFN sys/dev/xen/pcifront/pcifront.c 1004 1004 644 99cff36d8d33a73daed13fe303eb9c79 16c48725f3c1ca569eaab524b727e61f 168 d32 1 a32 1 __FBSDID("$FreeBSD: head/sys/dev/xen/pcifront/pcifront.c 286372 2015-08-06 17:07:21Z jhb $"); d81 1 a81 1 #define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT) CTMFN sys/fs/devfs/devfs_vnops.c 1004 1004 644 8d67f240c58e54a6a1d5fa9f8fb6bf49 6ca04a2e5758cebaa09ff16c781b377e 788 d34 1 a34 1 * $FreeBSD: head/sys/fs/devfs/devfs_vnops.c 286371 2015-08-06 16:50:37Z jhb $ d1777 2 a1778 11 * If we are sharing potential changes via MAP_SHARED and we * are trying to get write permission although we opened it * without asking for it, bail out. * * Note that most character devices always share mappings. * The one exception is that D_MMAP_ANON devices * (i.e. /dev/zero) permit private writable mappings. * * Rely on vm_mmap_cdev() to fail invalid MAP_PRIVATE requests * as well as updating maxprot to permit writing for * D_MMAP_ANON devices rather than doing that here. d1780 4 a1783 6 if ((flags & MAP_SHARED) != 0) { if ((fp->f_flag & FWRITE) != 0) maxprot |= VM_PROT_WRITE; else if ((prot & VM_PROT_WRITE) != 0) return (EACCES); } CTMFN sys/geom/eli/g_eli_integrity.c 1004 1004 644 915ab1eac0f4b4adb80464402c219b11 195fcc0a0a5228829fff51cd1e1f6dc7 268 d28 1 a28 1 __FBSDID("$FreeBSD: head/sys/geom/eli/g_eli_integrity.c 286373 2015-08-06 17:13:34Z pjd $"); d411 1 a412 1 int error; d454 1 d522 3 a524 3 error = crypto_dispatch(crp); KASSERT(error == 0, ("crypto_dispatch() failed (error=%d)", error)); d526 2 CTMFN sys/geom/eli/g_eli_privacy.c 1004 1004 644 2b18909734c6f34a225266779148ef0a 26a2a3df243c04888073036029422b3c 266 d28 1 a28 1 __FBSDID("$FreeBSD: head/sys/geom/eli/g_eli_privacy.c 286373 2015-08-06 17:13:34Z pjd $"); d233 1 a236 1 int error; d274 1 d311 3 a313 3 error = crypto_dispatch(crp); KASSERT(error == 0, ("crypto_dispatch() failed (error=%d)", error)); d315 2 CTMFN sys/geom/uzip/g_uzip.c 1004 1004 644 10c57ee1590b5debff81006712e45bbc bef83aebdf8578717075f5cef2087613 364 d29 1 a29 1 __FBSDID("$FreeBSD: head/sys/geom/uzip/g_uzip.c 286367 2015-08-06 15:30:14Z ngie $"); d97 2 a98 2 DPRINTF(("%s: %d requests, %d cached\n", gp->name, sc->req_total, sc->req_cached)); d522 1 a522 1 DPRINTF(("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz)); d550 1 a550 1 DPRINTF(("%s(%s): gp->softc == NULL\n", __func__, gp->name)); CTMFR sys/i386/include/xen/xenfunc.h 4ab73b72f37d4d6bdaed8fc121404762 CTMFR sys/i386/include/xen/xenvar.h b76bb3394bc2f4f23721996ea106fa55 CTMFN sys/vm/vm_reserv.c 1004 1004 644 98e42e8bd72a4aed201b0f0f6fe80d19 bae1bd27a966bc215b68e99aad61fd83 1050 d40 1 a40 1 __FBSDID("$FreeBSD: head/sys/vm/vm_reserv.c 286390 2015-08-06 21:27:50Z alc $"); a219 5 static int sysctl_vm_reserv_fullpop(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_vm_reserv, OID_AUTO, fullpop, CTLTYPE_INT | CTLFLAG_RD, NULL, 0, sysctl_vm_reserv_fullpop, "I", "Current number of full reservations"); a237 27 * Returns the current number of full reservations. * * Since the number of full reservations is computed without acquiring the * free page queue lock, the returned value may be inexact. */ static int sysctl_vm_reserv_fullpop(SYSCTL_HANDLER_ARGS) { vm_paddr_t paddr; struct vm_phys_seg *seg; vm_reserv_t rv; int fullpop, segind; fullpop = 0; for (segind = 0; segind < vm_phys_nsegs; segind++) { seg = &vm_phys_segs[segind]; paddr = roundup2(seg->start, VM_LEVEL_0_SIZE); while (paddr + VM_LEVEL_0_SIZE <= seg->end) { rv = &vm_reserv_array[paddr >> VM_LEVEL_0_SHIFT]; fullpop += rv->popcnt == VM_LEVEL_0_NPAGES; paddr += VM_LEVEL_0_SIZE; } } return (sysctl_handle_int(oidp, &fullpop, 0, req)); } /* CTMFN sys/x86/x86/mp_x86.c 1004 1004 644 bbd75ba9a460c8cd2d5f61cc8be95af0 25bd51fa5b10e62e5564902ec027dbcf 157 d28 1 a28 1 __FBSDID("$FreeBSD: head/sys/x86/x86/mp_x86.c 286374 2015-08-06 18:02:54Z kib $"); d605 1 a605 1 while (atomic_load_acq_int(&smp_started) == 0) CTMFN sys/x86/xen/xen_intr.c 1004 1004 644 b599f19076816a8c21fbb46ac809bebc cf8f89ff1f275c5b87d2f6a7c01b5c82 103 d33 1 a33 1 __FBSDID("$FreeBSD: head/sys/x86/xen/xen_intr.c 286372 2015-08-06 17:07:21Z jhb $"); d60 1 CTMFN tests/sys/vm/Makefile 1004 1004 644 d35c38e4c01e371a0b28ba579468c151 73d2c00492d362b4632cd96ab30fa091 117 d1 1 a1 1 # $FreeBSD: head/tests/sys/vm/Makefile 286369 2015-08-06 16:12:12Z jhb $ d5 1 a5 1 ATF_TESTS_C+= mmap_test CTMFN tests/sys/vm/mmap_test.c 1004 1004 644 f85b386688280671ea6076933f2350f8 6ad6cd88c0cc70da37222b06cf800ff8 3233 d26 1 a26 1 * $FreeBSD: head/tests/sys/vm/mmap_test.c 286370 2015-08-06 16:14:29Z jhb $ d32 1 a33 1 #include a34 2 #include #include d36 1 a36 1 #include d41 1 a41 1 } map_at_zero_tests[] = { d55 2 a56 2 ATF_TC_WITHOUT_HEAD(mmap__map_at_zero); ATF_TC_BODY(mmap__map_at_zero, tc) d60 11 a70 2 unsigned int i; int map_at_zero; d73 2 a74 2 if (sysctlbyname(MAP_AT_ZERO, &map_at_zero, &len, NULL, 0) == -1) { atf_tc_skip("sysctl for %s failed: %s\n", MAP_AT_ZERO, d76 1 a76 1 return; d82 3 a84 2 for (i = 0; i < nitems(map_at_zero_tests); i++) { p = mmap((void *)map_at_zero_tests[i].addr, PAGE_SIZE, d88 6 a93 2 ATF_CHECK_MSG(map_at_zero_tests[i].ok[map_at_zero] == 0, "mmap(%p, ...) failed", map_at_zero_tests[i].addr); d95 6 a100 3 ATF_CHECK_MSG(map_at_zero_tests[i].ok[map_at_zero] == 1, "mmap(%p, ...) succeeded: p=%p\n", map_at_zero_tests[i].addr, p); a102 74 } static void checked_mmap(int prot, int flags, int fd, int error, const char *msg) { void *p; p = mmap(NULL, getpagesize(), prot, flags, fd, 0); if (p == MAP_FAILED) { if (error == 0) ATF_CHECK_MSG(0, "%s failed with errno %d", msg, errno); else ATF_CHECK_EQ_MSG(error, errno, "%s failed with wrong errno %d (expected %d)", msg, errno, error); } else { ATF_CHECK_MSG(error == 0, "%s succeeded", msg); munmap(p, getpagesize()); } } ATF_TC_WITHOUT_HEAD(mmap__bad_arguments); ATF_TC_BODY(mmap__bad_arguments, tc) { int fd; ATF_REQUIRE((fd = shm_open(SHM_ANON, O_RDWR, 0644)) >= 0); ATF_REQUIRE(ftruncate(fd, getpagesize()) == 0); /* These should work. */ checked_mmap(PROT_READ | PROT_WRITE, MAP_ANON, -1, 0, "simple MAP_ANON"); checked_mmap(PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0, "simple shm fd shared"); checked_mmap(PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0, "simple shm fd private"); /* Extra PROT flags. */ checked_mmap(PROT_READ | PROT_WRITE | 0x100000, MAP_ANON, -1, EINVAL, "MAP_ANON with extra PROT flags"); checked_mmap(0xffff, MAP_SHARED, fd, EINVAL, "shm fd with garbage PROT"); /* Undefined flag. */ checked_mmap(PROT_READ | PROT_WRITE, MAP_ANON | MAP_RESERVED0080, -1, EINVAL, "Undefined flag"); /* Both MAP_SHARED and MAP_PRIVATE */ checked_mmap(PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE | MAP_SHARED, -1, EINVAL, "MAP_ANON with both SHARED and PRIVATE"); checked_mmap(PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_SHARED, fd, EINVAL, "shm fd with both SHARED and PRIVATE"); /* At least one of MAP_SHARED or MAP_PRIVATE without ANON */ checked_mmap(PROT_READ | PROT_WRITE, 0, fd, EINVAL, "shm fd without sharing flag"); /* MAP_ANON with either sharing flag (impacts fork). */ checked_mmap(PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0, "shared MAP_ANON"); checked_mmap(PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0, "private MAP_ANON"); /* MAP_ANON should require an fd of -1. */ checked_mmap(PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, 0, EINVAL, "MAP_ANON with fd != -1"); } ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, mmap__map_at_zero); ATF_TP_ADD_TC(tp, mmap__bad_arguments); d104 1 a104 1 return (atf_no_error()); CTMFN usr.bin/truss/syscall.h 1004 1004 644 51eefc0245de88bf74d4e4c311ae186f 73d3baf7ba2321613b90586e9c6ff292 164 d35 1 a35 1 * $FreeBSD: head/usr.bin/truss/syscall.h 286381 2015-08-06 19:08:33Z jhb $ d44 1 a44 1 LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode }; CTMFN usr.bin/truss/syscalls.c 1004 1004 644 0693f2cc34e49bbb52839500271cb034 15acfdcb67ff3329fefa350513075356 6658 d34 1 a34 1 "$FreeBSD: head/usr.bin/truss/syscalls.c 286388 2015-08-06 20:05:40Z jhb $"; d96 1 a96 1 .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, d104 1 a104 1 .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } }, d106 1 a106 1 .args = { { Int, 0 }, { LinuxSockArgs, 1 } } }, a117 3 { .name = "readlinkat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 }, { Int, 3 } } }, d119 1 a119 2 .args = { { Int, 0 }, { Quad, 1 + QUAD_ALIGN }, { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } }, d123 1 a123 2 .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, { Int, 4 }, { Quad, 5 + QUAD_ALIGN } } }, d125 1 a125 1 .args = { { Name | IN, 0 }, { Int, 1 } } }, a129 3 { .name = "openat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Open, 2 }, { Octal, 3 } } }, a131 2 { .name = "mkdirat", .ret_type = 1, .nargs = 3, .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } }, a137 3 { .name = "linkat", .ret_type = 0, .nargs = 5, .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, { Atflags, 4 } } }, a139 2 { .name = "unlinkat", .ret_type = 0, .nargs = 3, .args = { { Atfd, 0 }, { Name, 1 }, { Atflags, 2 } } }, a143 4 { .name = "mkfifo", .ret_type = 0, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "mkfifoat", .ret_type = 0, .nargs = 3, .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } }, d145 1 a145 3 .args = { { Name, 0 }, { Octal, 1 }, { Int, 2 } } }, { .name = "mknodat", .ret_type = 0, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Int, 3 } } }, a147 6 { .name = "fchmod", .ret_type = 0, .nargs = 2, .args = { { Int, 0 }, { Octal, 1 } } }, { .name = "lchmod", .ret_type = 0, .nargs = 2, .args = { { Name, 0 }, { Octal, 1 } } }, { .name = "fchmodat", .ret_type = 0, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Atflags, 3 } } }, a149 7 { .name = "fchown", .ret_type = 0, .nargs = 3, .args = { { Int, 0 }, { Int, 1 }, { Int, 2 } } }, { .name = "lchown", .ret_type = 0, .nargs = 3, .args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } }, { .name = "fchownat", .ret_type = 0, .nargs = 5, .args = { { Atfd, 0 }, { Name, 1 }, { Int, 2 }, { Int, 3 }, { Atflags, 4 } } }, d151 1 a151 1 .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } }, a157 3 { .name = "fstatat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Stat | OUT, 2 }, { Atflags, 3 } } }, d165 1 a165 1 .args = { { Name, 0 }, { Accessmode, 1 } } }, d177 1 a177 6 .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, { .name = "eaccess", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, { .name = "faccessat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Accessmode, 2 }, { Atflags, 3 } } }, d179 1 a179 2 .args = { { Signal, 0 }, { Sigaction | IN, 1 }, { Sigaction | OUT, 2 } } }, a183 3 { .name = "bindat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, { Int, 3 } } }, a185 3 { .name = "connectat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, { Int, 3 } } }, d191 1 a191 2 .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, { Hex, 3 }, { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } }, d193 1 a193 2 .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, { Hex, 3 }, { Sockaddr | IN, 4 }, { Ptr | IN, 5 } } }, d195 1 a195 2 .args = { { Name | IN, 0 }, { StringArray | IN, 1 }, { StringArray | IN, 2 } } }, d197 1 a197 2 .args = { { Name | IN, 0 }, { StringArray | IN, 1 }, { StringArray | IN, 2 } } }, d213 1 a213 2 .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 }, { Timeval, 4 } } }, d227 1 a227 2 .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 }, { Int, 4 }, { Timespec, 5 } } }, d249 1 a249 8 .args = { { Int, 0 }, { Timeval2 | IN, 1 } } }, { .name = "futimesat", .ret_type = 1, .nargs = 3, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } }, { .name = "futimens", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Timespec2 | IN, 1 } } }, { .name = "utimensat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timespec2 | IN, 2 }, { Atflags, 3 } } }, a269 2 { .name = "renameat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 } } }, a271 2 { .name = "symlinkat", .ret_type = 1, .nargs = 3, .args = { { Name, 0 }, { Atfd, 1 }, { Name, 2 } } }, a438 9 static struct xlat at_flags[] = { X(AT_EACCESS) X(AT_SYMLINK_NOFOLLOW) X(AT_SYMLINK_FOLLOW) X(AT_REMOVEDIR) XEND }; static struct xlat access_modes[] = { X(R_OK) X(W_OK) X(X_OK) XEND }; d775 1 a775 1 asprintf(&tmp, "{ %ld.%09ld }", (long)ts.tv_sec, a780 34 case Timespec2: { struct timespec ts[2]; FILE *fp; size_t len; const char *sep; unsigned int i; if (get_struct(pid, (void *)args[sc->offset], &ts, sizeof(ts)) != -1) { fp = open_memstream(&tmp, &len); fputs("{ ", fp); sep = ""; for (i = 0; i < nitems(ts); i++) { fputs(sep, fp); sep = ", "; switch (ts[i].tv_nsec) { case UTIME_NOW: fprintf(fp, "UTIME_NOW"); break; case UTIME_OMIT: fprintf(fp, "UTIME_OMIT"); break; default: fprintf(fp, "%ld.%09ld", (long)ts[i].tv_sec, ts[i].tv_nsec); break; } } fputs(" }", fp); fclose(fp); } else asprintf(&tmp, "0x%lx", args[sc->offset]); break; } d785 1 a785 1 asprintf(&tmp, "{ %ld.%06ld }", (long)tv.tv_sec, d795 1 a795 1 asprintf(&tmp, "{ %ld.%06ld, %ld.%06ld }", d806 1 a806 1 asprintf(&tmp, "{ %ld.%06ld, %ld.%06ld }", d882 1 a882 2 asprintf(&tmp, "(0x%lx)%s, 0x%lx", args[sc->offset], what, (long unsigned int)largs.args); a908 1 tmp[used++] = ' '; a916 1 tmp[used++] = ' '; a948 1 tmp[used++] = ' '; d957 2 d1159 2 a1160 3 "= { %n%*s } }", (int)sa->sa_len, (int)sa->sa_family, &i, 6 * (int)(sa->sa_len - ((char *)&sa->sa_data - a1225 1 tmp[used++] = ' '; a1238 1 tmp[used++] = ' '; a1319 16 case Atfd: if ((int)args[sc->offset] == AT_FDCWD) tmp = strdup("AT_FDCWD"); else asprintf(&tmp, "%d", (int)args[sc->offset]); break; case Atflags: tmp = strdup(xlookup_bits(at_flags, args[sc->offset])); break; case Accessmode: if (args[sc->offset] == F_OK) tmp = strdup("F_OK"); else tmp = strdup(xlookup_bits(access_modes, args[sc->offset])); break; CTMFN usr.bin/ypmatch/ypmatch.c 1004 1004 644 6d96a76e0ab4ff6e855bca866bd3fcfd 265e1e935224f1f00a06de063a6462bf 479 d32 1 a32 1 __FBSDID("$FreeBSD: head/usr.bin/ypmatch/ypmatch.c 286394 2015-08-07 02:37:47Z araujo $"); a36 3 #include #include d41 2 d49 2 d66 1 a66 1 static void d69 2 a70 2 fprintf(stderr, "%s\n%s\n", "usage: ypmatch [-kt] [-d domain] key ... mapname", d85 2 d117 1 a117 1 if (domainname == NULL) { d122 1 a122 1 if (notrans == 0) { d141 2 a142 1 errx(1, "not running ypbind"); d144 1 a144 1 errx(1, "can't match key %s in map %s. Reason: %s", CTM_END b85388357527b04d6e86b66f90fff904