Do not talk about prelinking in ldconfig.8

2015-04-19 Thread Vadim Zhukov
This paragraph should talk about prebinding instead of prelinking,
shouldn't it?

Also, it seems prebind data sounds more correct than prebinding
data, but I could easily get wrong here.

--
WBR,
  Vadim Zhukov


Index: ldconfig.8
===
RCS file: /cvs/src/libexec/ld.so/ldconfig/ldconfig.8,v
retrieving revision 1.27
diff -u -p -r1.27 ldconfig.8
--- ldconfig.8  10 Jul 2013 06:43:38 -  1.27
+++ ldconfig.8  19 Apr 2015 12:35:58 -
@@ -113,11 +113,11 @@ List the current contents of
 on the standard output.
 The hints file will not be modified.
 .It Fl S
-Perform prelinking operations in a safe mode; always copies the binaries
-when prelinking data is added to a file.
+Perform prebinding operations in a safe mode; always copies the binaries
+when prebind data is added to a file.
 Use this to eliminate the possibility that
 .Dv ETXTBUSY
-will occur when attempting to run a binary while prelinking
+will occur when attempting to run a binary while prebinding
 is running.
 .It Fl s
 Do not scan the built-in system directory



[patch] rtl8188eu support for urtwn(4)

2015-04-19 Thread Mikhail
Hello, I inline the patch for rtl8188eu chip support in urtwn driver,
origins for this patch are in r264912[1] from FreeBSD. In order to work,
correct firmware must be presented in /etc/firmware - one can be found
in FreeBSD commit itself[2] - I'm not sure what is the correct procedure
of submitting it to firmware.openbsd.org.

I've tested it with TP-LINK TL-WN725N with usual network activity.

[1] - http://svnweb.freebsd.org/base?view=revisionrevision=264912
[2] - 
http://svnweb.freebsd.org/base/head/sys/contrib/dev/urtwn/urtwn-rtl8188eufw.fw.uu?view=markuppathrev=264912

Index: share/man/man4/urtwn.4
===
RCS file: /cvs/src/share/man/man4/urtwn.4,v
retrieving revision 1.31
diff -u -p -u -r1.31 urtwn.4
--- share/man/man4/urtwn.4  30 Mar 2015 12:35:15 -  1.31
+++ share/man/man4/urtwn.4  18 Apr 2015 19:44:00 -
@@ -14,22 +14,22 @@
 .\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\
-.Dd $Mdocdate: March 30 2015 $
+.Dd $Mdocdate: April 19 2015 $
 .Dt URTWN 4
 .Os
 .Sh NAME
 .Nm urtwn
-.Nd Realtek RTL8188CU/RTL8192CU USB IEEE 802.11b/g/n wireless network device
+.Nd Realtek RTL8188CU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless 
network device
 .Sh SYNOPSIS
 .Cd urtwn* at uhub? port ?
 .Sh DESCRIPTION
 The
 .Nm
 driver supports USB 2.0 wireless network devices based on Realtek
-RTL8188CUS, RTL8188CE-VAU, RTL8188RU and RTL8192CU chipsets.
+RTL8188CUS, RTL8188CE-VAU, RTL8188EUS, RTL8188RU and RTL8192CU chipsets.
 .Pp
-The RTL8188CUS is a highly integrated 802.11n adapter that combines
-a MAC, a 1T1R capable baseband and an RF in a single chip.
+The RTL8188CUS and RTL8188EUS is a highly integrated 802.11n adapter
+that combines a MAC, a 1T1R capable baseband and an RF in a single chip.
 It operates in the 2GHz spectrum only.
 The RTL8188RU is a high-power variant of the RTL8188CUS.
 The RTL8188CE-VAU is a PCI Express Mini Card adapter that attaches
@@ -83,6 +83,7 @@ which are loaded when an interface is at
 .It /etc/firmware/urtwn-rtl8192cfwT
 .It /etc/firmware/urtwn-rtl8192cfwU
 .It /etc/firmware/urtwn-rtl8723fw
+.It /etc/firmware/urtwn-rtl8188eufw
 .El
 .Pp
 A prepackaged version of the firmware can be installed using
@@ -119,6 +120,8 @@ The following adapters should work:
 .It Solwise NET-WL-UMD-606N
 .It TP-Link TL-WN821N v4
 .It TRENDnet TEW-648UBM
+.It TP-LINK TL-WN723N v3
+.It TP-LINK TL-WN725N v2
 .El
 .Sh EXAMPLES
 The following example scans for available networks:
Index: sys/dev/usb/if_urtwn.c
===
RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.43
diff -u -p -u -r1.43 if_urtwn.c
--- sys/dev/usb/if_urtwn.c  14 Mar 2015 03:38:49 -  1.43
+++ sys/dev/usb/if_urtwn.c  18 Apr 2015 19:44:00 -
@@ -2,6 +2,7 @@
 
 /*-
  * Copyright (c) 2010 Damien Bergamini damien.bergam...@free.fr
+ * Copyright (c) 2014 Kevin Lo ke...@freebsd.org
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +18,7 @@
  */
 
 /*
- * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188RU/RTL8192CU.
+ * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188EU/RTL8188RU/RTL8192CU.
  */
 
 #include bpfilter.h
@@ -140,7 +141,10 @@ static const struct usb_devno urtwn_devs
{ USB_VENDOR_TPLINK,USB_PRODUCT_TPLINK_RTL8192CU },
{ USB_VENDOR_TRENDNET,  USB_PRODUCT_TRENDNET_RTL8188CU },
{ USB_VENDOR_TRENDNET,  USB_PRODUCT_TRENDNET_RTL8192CU },
-   { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RTL8192CU }
+   { USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RTL8192CU },
+   /* URTWN_RTL8188E */
+   { USB_VENDOR_REALTEK,   USB_PRODUCT_REALTEK_RTL8188ETV },
+   { USB_VENDOR_REALTEK,   USB_PRODUCT_REALTEK_RTL8188EU }
 };
 
 inturtwn_match(struct device *, void *, void *);
@@ -167,14 +171,17 @@ uint8_t   urtwn_read_1(struct urtwn_softc
 uint16_t   urtwn_read_2(struct urtwn_softc *, uint16_t);
 uint32_t   urtwn_read_4(struct urtwn_softc *, uint16_t);
 inturtwn_fw_cmd(struct urtwn_softc *, uint8_t, const void *, int);
-void   urtwn_rf_write(struct urtwn_softc *, int, uint8_t, uint32_t);
+void   urtwn_r92c_rf_write(struct urtwn_softc *, int, uint8_t, 
uint32_t);
+void   urtwn_r88e_rf_write(struct urtwn_softc *, int, uint8_t, 
uint32_t);
 uint32_t   urtwn_rf_read(struct urtwn_softc *, int, uint8_t);
 void   urtwn_cam_write(struct urtwn_softc *, uint32_t, uint32_t);
 inturtwn_llt_write(struct urtwn_softc *, uint32_t, uint32_t);
 uint8_turtwn_efuse_read_1(struct urtwn_softc *, uint16_t);
 void   urtwn_efuse_read(struct urtwn_softc *);
+void   urtwn_efuse_switch_power(struct urtwn_softc *);
 int

Re: [patch] rtl8188eu support for urtwn(4)

2015-04-19 Thread Stefan Sperling
On Sun, Apr 19, 2015 at 11:27:52AM +0300, Mikhail wrote:
 I'm not sure what is the correct procedure
 of submitting it to firmware.openbsd.org.

Please prepare a patch for /usr/ports/sysutils/firmware/urtwn.

 I've tested it with TP-LINK TL-WN725N with usual network activity.

Thanks! I will take a detailed look at your patch ASAP.



security(8): For diff(1), 0 and 1 mean success

2015-04-19 Thread Ingo Schwarze
Hi,

when security(8) uses open(..., '-|', ...) to fork a command
and capture the output, and that command fails, it reports
the exit status in the daily security mail.  One of the
commands forked that way is diff(1), which is documented
as follows:

  EXIT STATUS
 The diff utility exits with one of the following values:

   0   No differences were found.
   1   Differences were found.
   1  An error occurred.

So arguably, for diff(1), exit status 1 means success,
and Antoine has a point in arguing that the following output
is both ugly and useless:

  ==
  /etc/man.conf diffs (-OLD  +NEW)
  ==
  diff: exit code 1
  ...

The following diff gets rid of the line diff: exit code 1
just in this particular case (exit code 1 from diff) without
changing anything for other commands or for other exit codes.

OK?
  Ingo


Index: security
===
RCS file: /cvs/src/libexec/security/security,v
retrieving revision 1.34
diff -u -p -r1.34 security
--- security27 Mar 2015 13:26:19 -  1.34
+++ security19 Apr 2015 12:15:45 -
@@ -738,7 +738,11 @@ sub diff {
and return;
local $/;
my $diff = $fh;
-   close_or_nag $fh, diff;
+   {
+   close $fh and last;
+   nag $!, diff: error closing pipe: $! and last;
+   nag $?  8  1, diff: exit code  . ($?  8);
+   }
return nag !!$diff, $diff;
 }