svn commit: r221007 - head/etc/rc.d

2011-04-25 Thread Doug Barton
Author: dougb
Date: Mon Apr 25 06:03:22 2011
New Revision: 221007
URL: http://svn.freebsd.org/changeset/base/221007

Log:
  Create a function for the code from r192246 so that it can be used both
  times mount is called.
  
  Limit the automatic behavior to when AUTO is specified (as it is in
  etc/defaults/rc.conf) and for everything else take advantage of all
  of the goodness in checkyesno.

Modified:
  head/etc/rc.d/tmp

Modified: head/etc/rc.d/tmp
==
--- head/etc/rc.d/tmp   Mon Apr 25 05:57:01 2011(r221006)
+++ head/etc/rc.d/tmp   Mon Apr 25 06:03:22 2011(r221007)
@@ -37,20 +37,20 @@ stop_cmd=':'
 
 load_rc_config $name
 
+mount_tmpmfs ()
+{
+   if ! /bin/df /tmp | grep -q ^/dev/md[0-9]; then
+   mount_md ${tmpsize} /tmp ${tmpmfs_flags}
+   chmod 01777 /tmp
+   fi
+}
+
 # If we do not have a writable /tmp, create a memory
 # filesystem for /tmp.  If /tmp is a symlink (e.g. to /var/tmp,
 # then it should already be writable).
 #
 case ${tmpmfs} in
-[Yy][Ee][Ss])
-   if ! /bin/df /tmp | grep -q ^/dev/md[0-9]; then
-   mount_md ${tmpsize} /tmp ${tmpmfs_flags}
-   chmod 01777 /tmp
-   fi
-   ;;
-[Nn][Oo])
-   ;;
-*)
+[Aa][Uu][Tt][Oo])
if _tmpdir=$(mktemp -d -q /tmp/.diskless.XX); then
rmdir ${_tmpdir}
else
@@ -59,9 +59,13 @@ case ${tmpmfs} in
echo dropping into shell, ^D to continue anyway.
/bin/sh
else
-   mount_md ${tmpsize} /tmp ${tmpmfs_flags}
-   chmod 01777 /tmp
+   mount_tmpmfs
fi
fi
;;
+*)
+   if checkyesno tmpmfs; then
+   mount_tmpmfs
+   fi
+   ;;
 esac
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220983 - head

2011-04-25 Thread Daniel O'Connor

On 25/04/2011, at 6:55, Warner Losh wrote:
 The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are on a 
 GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't.
 
 I've been running with ufs labels for a couple of years now, since the first 
 rumblings of this hit the streets.  They work great no matter what the 
 underlying partitioning scheme.  The one drawback is that if you have 
 multiple disks with the same labels, then the first one wins.  Normally not a 
 problem, but when you have it, you need to ensure the right one is selected.  
 I avoid this problem by prefixing a hostname to the label...

This is why I prefer IDs since they are nominally unique (UFS ones, GPTs damn 
well better be :)

Although I concede it is rather annoying to work out which is which, or type 
them out manually..

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C






___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221009 - head/sys/netinet6

2011-04-25 Thread Bernd Walter
Author: ticso
Date: Mon Apr 25 09:00:52 2011
New Revision: 221009
URL: http://svn.freebsd.org/changeset/base/221009

Log:
  correct variable type name in comment

Modified:
  head/sys/netinet6/in6.h

Modified: head/sys/netinet6/in6.h
==
--- head/sys/netinet6/in6.h Mon Apr 25 06:36:26 2011(r221008)
+++ head/sys/netinet6/in6.h Mon Apr 25 09:00:52 2011(r221009)
@@ -397,8 +397,8 @@ struct route_in6 {
 #define IPV6_MULTICAST_IF  9  /* u_int; set/get IP6 multicast i/f  */
 #define IPV6_MULTICAST_HOPS10 /* int; set/get IP6 multicast hops */
 #define IPV6_MULTICAST_LOOP11 /* u_int; set/get IP6 multicast loopback */
-#define IPV6_JOIN_GROUP12 /* ip6_mreq; join a group membership 
*/
-#define IPV6_LEAVE_GROUP   13 /* ip6_mreq; leave a group membership */
+#define IPV6_JOIN_GROUP12 /* ipv6_mreq; join a group 
membership */
+#define IPV6_LEAVE_GROUP   13 /* ipv6_mreq; leave a group membership */
 #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */
 #define ICMP6_FILTER   18 /* icmp6_filter; icmp6 filter */
 /* RFC2292 options */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221010 - head/sys/dev/ichwd

2011-04-25 Thread Dag-Erling Smorgrav
Author: des
Date: Mon Apr 25 09:18:05 2011
New Revision: 221010
URL: http://svn.freebsd.org/changeset/base/221010

Log:
  Whitespace nit

Modified:
  head/sys/dev/ichwd/ichwd.c

Modified: head/sys/dev/ichwd/ichwd.c
==
--- head/sys/dev/ichwd/ichwd.c  Mon Apr 25 09:00:52 2011(r221009)
+++ head/sys/dev/ichwd/ichwd.c  Mon Apr 25 09:18:05 2011(r221010)
@@ -228,8 +228,8 @@ ichwd_sts_reset(struct ichwd_softc *sc)
 * by writing a 1, not a 0.
 */
ichwd_write_tco_2(sc, TCO1_STS, TCO_TIMEOUT);
-   /* 
-* According to Intel's docs, clearing SECOND_TO_STS and BOOT_STS must 
+   /*
+* According to Intel's docs, clearing SECOND_TO_STS and BOOT_STS must
 * be done in two separate operations.
 */
ichwd_write_tco_2(sc, TCO2_STS, TCO_SECOND_TO_STS);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221011 - head/bin/sh

2011-04-25 Thread Jilles Tjoelker
Author: jilles
Date: Mon Apr 25 10:08:34 2011
New Revision: 221011
URL: http://svn.freebsd.org/changeset/base/221011

Log:
  sh: Remove duplicate code resetting uid/gid for set +p/+o privileged.
  
  MFC after:1 week

Modified:
  head/bin/sh/options.c

Modified: head/bin/sh/options.c
==
--- head/bin/sh/options.c   Mon Apr 25 09:18:05 2011(r221010)
+++ head/bin/sh/options.c   Mon Apr 25 10:08:34 2011(r221011)
@@ -198,13 +198,8 @@ options(int cmdline)
minus_o(*argptr, val);
if (*argptr)
argptr++;
-   } else {
-   if (c == 'p'  !val  privileged) {
-   (void) setuid(getuid());
-   (void) setgid(getgid());
-   }
+   } else
setoption(c, val);
-   }
}
}
return;
@@ -271,10 +266,6 @@ minus_o(char *name, int val)
} else {
for (i = 0; i  NOPTS; i++)
if (equal(name, optlist[i].name)) {
-   if (!val  privileged  equal(name, 
privileged)) {
-   (void) setuid(getuid());
-   (void) setgid(getgid());
-   }
setoption(optlist[i].letter, val);
return;
}
@@ -288,6 +279,10 @@ setoption(int flag, int val)
 {
int i;
 
+   if (flag == 'p'  !val  privileged) {
+   (void) setuid(getuid());
+   (void) setgid(getgid());
+   }
for (i = 0; i  NOPTS; i++)
if (optlist[i].letter == flag) {
optlist[i].val = val;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221012 - head/bin/sh

2011-04-25 Thread Jilles Tjoelker
Author: jilles
Date: Mon Apr 25 10:14:29 2011
New Revision: 221012
URL: http://svn.freebsd.org/changeset/base/221012

Log:
  sh: Check setuid()/setgid() return values.
  
  If the -p option is turned off, privileges from a setuid or setgid binary
  are dropped. Make sure to check if this succeeds. If it fails, this is an
  error which will cause the shell to abort except in interactive mode or if
  'command' was used to make 'set' or an outer 'eval' or '.' non-special.
  
  Note that taking advantage of this feature and writing setuid shell scripts
  seems unwise.
  
  MFC after:1 week

Modified:
  head/bin/sh/options.c

Modified: head/bin/sh/options.c
==
--- head/bin/sh/options.c   Mon Apr 25 10:08:34 2011(r221011)
+++ head/bin/sh/options.c   Mon Apr 25 10:14:29 2011(r221012)
@@ -280,8 +280,10 @@ setoption(int flag, int val)
int i;
 
if (flag == 'p'  !val  privileged) {
-   (void) setuid(getuid());
-   (void) setgid(getgid());
+   if (setgid(getgid()) == -1)
+   error(setgid);
+   if (setuid(getuid()) == -1)
+   error(setuid);
}
for (i = 0; i  NOPTS; i++)
if (optlist[i].letter == flag) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221013 - head/usr.bin/printf

2011-04-25 Thread Jilles Tjoelker
Author: jilles
Date: Mon Apr 25 12:36:29 2011
New Revision: 221013
URL: http://svn.freebsd.org/changeset/base/221013

Log:
  printf(1): Mention effect of '#' modifier on other conversions.

Modified:
  head/usr.bin/printf/printf.1

Modified: head/usr.bin/printf/printf.1
==
--- head/usr.bin/printf/printf.1Mon Apr 25 10:14:29 2011
(r221012)
+++ head/usr.bin/printf/printf.1Mon Apr 25 12:36:29 2011
(r221013)
@@ -31,7 +31,7 @@
 .\@(#)printf.18.1 (Berkeley) 6/6/93
 .\ $FreeBSD$
 .\
-.Dd November 19, 2010
+.Dd April 25, 2011
 .Dt PRINTF 1
 .Os
 .Sh NAME
@@ -125,9 +125,9 @@ in the following order:
 A `#' character
 specifying that the value should be printed in an ``alternate form''.
 For
-.Cm c , d ,
+.Cm b , c , d , s
 and
-.Cm s ,
+.Cm u
 formats, this option has no effect.
 For the
 .Cm o
@@ -141,9 +141,9 @@ format, a non-zero result has the string
 .Pq Li 0X
 prepended to it.
 For
-.Cm e , E , f , g ,
+.Cm a , A , e , E , f , F , g
 and
-.Cm G ,
+.Cm G
 formats, the result will always contain a decimal point, even if no
 digits follow the point (normally, a decimal point only appears in the
 results of those formats if a digit follows the decimal point).
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221014 - in head/sys: fs/nfs fs/nfsclient nfsclient

2011-04-25 Thread Rick Macklem
Author: rmacklem
Date: Mon Apr 25 13:09:32 2011
New Revision: 221014
URL: http://svn.freebsd.org/changeset/base/221014

Log:
  Modify the experimental NFS client so that it uses the same
  struct nfs_args as the regular NFS client. This is needed
  so that the old mount(2) syscall will work and it makes
  sharing of the diskless NFS root code easier. Eary in the
  porting exercise I introduced a new revision of nfs_args, but
  didn't actually need it, thanks to nmount(2). I re-introduced the
  NFSMNT_KERB flag, since it does essentially the same thing and
  the old one would not have been used because it never worked.
  I also added a few new NFSMNT_xxx flags to sys/nfsclient/nfs_args.h
  that are used by the experimental NFS client.
  
  MFC after:2 weeks

Deleted:
  head/sys/fs/nfsclient/nfsargs.h
Modified:
  head/sys/fs/nfs/nfsport.h
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/nfsclient/nfsargs.h

Modified: head/sys/fs/nfs/nfsport.h
==
--- head/sys/fs/nfs/nfsport.h   Mon Apr 25 12:36:29 2011(r221013)
+++ head/sys/fs/nfs/nfsport.h   Mon Apr 25 13:09:32 2011(r221014)
@@ -372,7 +372,7 @@ struct ext_nfsstats {
 #include fs/nfs/xdr_subs.h
 #include fs/nfs/nfscl.h
 #include fs/nfs/nfsclstate.h
-#include fs/nfsclient/nfsargs.h
+#include nfsclient/nfsargs.h
 #include fs/nfsclient/nfsmount.h
 
 /*

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==
--- head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 25 12:36:29 2011
(r221013)
+++ head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 25 13:09:32 2011
(r221014)
@@ -102,8 +102,9 @@ static void nfs_decode_args(struct mount
struct nfs_args *argp, const char *, struct ucred *,
struct thread *);
 static int mountnfs(struct nfs_args *, struct mount *,
-   struct sockaddr *, char *, u_char *, u_char *, u_char *,
-   struct vnode **, struct ucred *, struct thread *, int);
+   struct sockaddr *, char *, u_char *, int, u_char *, int,
+   u_char *, int, struct vnode **, struct ucred *,
+   struct thread *, int);
 static voidnfs_getnlminfo(struct vnode *, uint8_t *, size_t *,
struct sockaddr_storage *, int *, off_t *,
struct timeval *);
@@ -503,11 +504,21 @@ nfs_mountdiskless(char *path,
 struct vnode **vpp, struct mount *mp)
 {
struct sockaddr *nam;
-   int error;
+   int dirlen, error;
+   char *dirpath;
 
+   /*
+* Find the directory path in path, which also has the server's
+* name/ip address in it.
+*/
+   dirpath = strchr(path, ':');
+   if (dirpath != NULL)
+   dirlen = strlen(++dirpath);
+   else
+   dirlen = 0;
nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK);
-   if ((error = mountnfs(args, mp, nam, path, NULL, NULL, NULL, vpp,
-   td-td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) {
+   if ((error = mountnfs(args, mp, nam, path, NULL, 0, dirpath, dirlen,
+   NULL, 0, vpp, td-td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) {
printf(nfs_mountroot: mount %s on /: %d\n, path, error);
return (error);
}
@@ -735,14 +746,10 @@ nfs_mount(struct mount *mp)
.readahead = NFS_DEFRAHEAD,
.wcommitsize = 0,   /* was: NQ_DEFLEASE */
.hostname = NULL,
-   /* args version 4 */
.acregmin = NFS_MINATTRTIMO,
.acregmax = NFS_MAXATTRTIMO,
.acdirmin = NFS_MINDIRATTRTIMO,
.acdirmax = NFS_MAXDIRATTRTIMO,
-   .dirlen = 0,
-   .krbnamelen = 0,
-   .srvkrbnamelen = 0,
};
int error = 0, ret, len;
struct sockaddr *nam = NULL;
@@ -752,6 +759,7 @@ nfs_mount(struct mount *mp)
u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100];
char *opt, *name, *secname;
int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
+   int dirlen, krbnamelen, srvkrbnamelen;
 
if (vfs_filteropt(mp-mnt_optnew, nfs_opts)) {
error = EINVAL;
@@ -1008,19 +1016,19 @@ nfs_mount(struct mount *mp)
strlcpy(srvkrbname, name, sizeof (srvkrbname));
else
snprintf(srvkrbname, sizeof (srvkrbname), nfs@%s, hst);
-   args.srvkrbnamelen = strlen(srvkrbname);
+   srvkrbnamelen = strlen(srvkrbname);
 
if (vfs_getopt(mp-mnt_optnew, gssname, (void **)name, NULL) == 0)
strlcpy(krbname, name, sizeof (krbname));
else
krbname[0] = '\0';
-   args.krbnamelen = strlen(krbname);
+   krbnamelen = strlen(krbname);
 
if (vfs_getopt(mp-mnt_optnew, dirpath, (void **)name, NULL) == 0)
strlcpy(dirpath, name, 

Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread Pawel Jakub Dawidek
On Sun, Apr 24, 2011 at 06:59:40PM +, Bjoern A. Zeeb wrote:
 I had been pondering devfs links myself, the problem is that from the rc
 framework they come too late.  If you can add a simple .ko that does it
 programmatically on 9 that would be great.  The problem is that after booting
 the new kernel you don't know whether people had ATA_STATIC on or not, so
 we'd have to go with the defaults, that were in 8.x (and an extra tunable to
 flip the logic maybe)?

We do know that people have ATA_STATIC_ID, because if they don't, this
means they have their custom kernel config which doesn't contain ATA_CAM
and when they will use it next time they recompile their kernel they
will still have /dev/adX entries.

Also, as Alexander already noted, because of all the problems with ATA
naming over the years and for other reasons too, people often hardcode
provider name in various GEOM classes metadata, so symlink won't help.

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://yomoli.com


pgpBHCX35S5dU.pgp
Description: PGP signature


svn commit: r221015 - head/sys/dev/ichwd

2011-04-25 Thread Attilio Rao
Author: attilio
Date: Mon Apr 25 14:10:33 2011
New Revision: 221015
URL: http://svn.freebsd.org/changeset/base/221015

Log:
  Don't assume that SMI are enabled when attaching ichwd and then do
  correct unwind based on former state.
  
  Sponsored by: Sandvine Incorporated
  Reviewed by:  des
  MFC after:1 week

Modified:
  head/sys/dev/ichwd/ichwd.h

Modified: head/sys/dev/ichwd/ichwd.h
==
--- head/sys/dev/ichwd/ichwd.h  Mon Apr 25 13:09:32 2011(r221014)
+++ head/sys/dev/ichwd/ichwd.h  Mon Apr 25 14:10:33 2011(r221015)
@@ -45,6 +45,7 @@ struct ichwd_softc {
int  active;
unsigned int timeout;
 
+   int  smi_enabled;
int  smi_rid;
struct resource *smi_res;
bus_space_tag_t  smi_bst;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221016 - head/sys/dev/ichwd

2011-04-25 Thread Attilio Rao
Author: attilio
Date: Mon Apr 25 14:12:58 2011
New Revision: 221016
URL: http://svn.freebsd.org/changeset/base/221016

Log:
  Add missing bit in r221015.
  
  Sponsored by: Sandvine Incorporated
  Reviewed by:  des
  MFC after:1 week
  X-MFC:r221015

Modified:
  head/sys/dev/ichwd/ichwd.c

Modified: head/sys/dev/ichwd/ichwd.c
==
--- head/sys/dev/ichwd/ichwd.c  Mon Apr 25 14:10:33 2011(r221015)
+++ head/sys/dev/ichwd/ichwd.c  Mon Apr 25 14:12:58 2011(r221016)
@@ -217,6 +217,15 @@ ichwd_smi_enable(struct ichwd_softc *sc)
 }
 
 /*
+ * Check if the watchdog SMI triggering is enabled.
+ */
+static __inline int
+ichwd_smi_is_enabled(struct ichwd_softc *sc)
+{
+   return ((ichwd_read_smi_4(sc, SMI_EN)  SMI_TCO_EN) != 0);
+}
+
+/*
  * Reset the watchdog status bits.
  */
 static __inline void
@@ -534,6 +543,7 @@ ichwd_attach(device_t dev)
sc-ev_tag = EVENTHANDLER_REGISTER(watchdog_list, ichwd_event, sc, 0);
 
/* disable the SMI handler */
+   sc-smi_enabled = ichwd_smi_is_enabled(sc);
ichwd_smi_disable(sc);
 
return (0);
@@ -565,7 +575,8 @@ ichwd_detach(device_t dev)
ichwd_tmr_disable(sc);
 
/* enable the SMI handler */
-   ichwd_smi_enable(sc);
+   if (sc-smi_enabled != 0)
+   ichwd_smi_enable(sc);
 
/* deregister event handler */
if (sc-ev_tag != NULL)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221018 - head/sys/fs/nfsclient

2011-04-25 Thread Rick Macklem
Author: rmacklem
Date: Mon Apr 25 14:51:08 2011
New Revision: 221018
URL: http://svn.freebsd.org/changeset/base/221018

Log:
  Fix the experimental NFS client so that it does not bogusly
  set the f_flags field of struct statfs. This had the interesting
  effect of making the NFSv4 mounts disappear after r221014,
  since NFSMNT_NFSV4 and MNT_IGNORE became the same bit.
  
  MFC after:2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==
--- head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 25 14:36:38 2011
(r221017)
+++ head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 25 14:51:08 2011
(r221018)
@@ -318,7 +318,6 @@ nfs_statfs(struct mount *mp, struct stat
if (gotfsinfo || (nmp-nm_flag  NFSMNT_NFSV4))
nfscl_loadfsinfo(nmp, fs);
nfscl_loadsbinfo(nmp, sb, sbp);
-   sbp-f_flags = nmp-nm_flag;
sbp-f_iosize = newnfs_iosize(nmp);
mtx_unlock(nmp-nm_mtx);
if (sbp != mp-mnt_stat) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220983 - head

2011-04-25 Thread Warner Losh

On Apr 25, 2011, at 12:52 AM, Daniel O'Connor wrote:

 
 On 25/04/2011, at 6:55, Warner Losh wrote:
 The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are on a 
 GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't.
 
 I've been running with ufs labels for a couple of years now, since the first 
 rumblings of this hit the streets.  They work great no matter what the 
 underlying partitioning scheme.  The one drawback is that if you have 
 multiple disks with the same labels, then the first one wins.  Normally not 
 a problem, but when you have it, you need to ensure the right one is 
 selected.  I avoid this problem by prefixing a hostname to the label...
 
 This is why I prefer IDs since they are nominally unique (UFS ones, GPTs damn 
 well better be :)
 
 Although I concede it is rather annoying to work out which is which, or type 
 them out manually..

For things like ZFS, UUIDs aren't so bad because it hides them.

For things like /etc/fstab, I prefer the named approach.  This allows me to 
survive a newfs on a partition if I have to without having to hack my 
/etc/fstab.  I have a large /tmp partition at times, and it gets newfs'd if 
there's a bad problem...

Warner

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread Alexander Motin
Warner Losh wrote:
 On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote:
 On Sun, Apr 24, 2011 at 06:59:40PM +, Bjoern A. Zeeb wrote:
 I had been pondering devfs links myself, the problem is that from the rc
 framework they come too late.  If you can add a simple .ko that does it
 programmatically on 9 that would be great.  The problem is that after 
 booting
 the new kernel you don't know whether people had ATA_STATIC on or not, so
 we'd have to go with the defaults, that were in 8.x (and an extra tunable to
 flip the logic maybe)?
 We do know that people have ATA_STATIC_ID, because if they don't, this
 means they have their custom kernel config which doesn't contain ATA_CAM
 and when they will use it next time they recompile their kernel they
 will still have /dev/adX entries.

 Also, as Alexander already noted, because of all the problems with ATA
 naming over the years and for other reasons too, people often hardcode
 provider name in various GEOM classes metadata, so symlink won't help.
 
 Do we have a short list of the places to look? 

Quick man pages grepping shows that at least gmirror, gstripe, graid3,
gjournal, gvirstor, gconcat, gshsec support provider names hardcoding.
For gmirror and graid3 present status can be obtained by: `gXXX list |
egrep Flags: .*HARDCODED`. For gvirstor, gshsec, gstripe and gconcat:
`gXXX dump adX | egrep Hardcoded provider: ad`. For gjournal:
`gjournal dump adX | egrep hcprovider: ad`.

 A lot of this could be done with a script that gets run at installworld and 
 boot time to hunt down the old cases and report them to the user before they 
 upgrade their kernel (but this would mean backing out the GENERIC change for 
 a while to give people a chance to upgrade to label-based provisioning...

If I understand idea right, independently of how much we delay it, there
will be some people who not updated during that window to get in code
detecting it during boot. Hardly many people of target auditory updating
their systems each month. Same time some checks indeed could be done in
installkernel.

-- 
Alexander Motin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221020 - head/sys/conf

2011-04-25 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Apr 25 16:33:42 2011
New Revision: 221020
URL: http://svn.freebsd.org/changeset/base/221020

Log:
  After r220885 compile the various NIC drivers depending on INET
  unconditionally backing out r193997, so that they are available for
  IPv6-only setups as well.
  
  Reviewed by:  gnn
  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems
  MFC after:5 days

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Apr 25 15:51:49 2011(r221019)
+++ head/sys/conf/files Mon Apr 25 16:33:42 2011(r221020)
@@ -493,7 +493,7 @@ dev/advansys/adwcam.c   optional adw
 dev/advansys/adwlib.c  optional adw
 dev/advansys/adwmcode.coptional adw
 dev/ae/if_ae.c optional ae pci
-dev/age/if_age.c   optional age pci inet
+dev/age/if_age.c   optional age pci
 dev/agp/agp.c  optional agp pci
 dev/agp/agp_if.m   optional agp pci
 dev/aha/aha.c  optional aha
@@ -515,8 +515,8 @@ dev/aic7xxx/aic7xxx.c   optional ahc
 dev/aic7xxx/aic7xxx_93cx6.coptional ahc
 dev/aic7xxx/aic7xxx_osm.c  optional ahc
 dev/aic7xxx/aic7xxx_pci.c  optional ahc pci
-dev/alc/if_alc.c   optional alc pci inet
-dev/ale/if_ale.c   optional ale pci inet
+dev/alc/if_alc.c   optional alc pci
+dev/ale/if_ale.c   optional ale pci
 dev/amd/amd.c  optional amd
 dev/amr/amr.c  optional amr
 dev/amr/amr_cam.c  optional amrp amr
@@ -973,11 +973,11 @@ dev/ed/if_ed_pccard.c optional ed pccar
 dev/ed/if_ed_pci.c optional ed pci
 dev/eisa/eisa_if.m standard
 dev/eisa/eisaconf.coptional eisa
-dev/e1000/if_em.c  optional em inet \
+dev/e1000/if_em.c  optional em \
compile-with ${NORMAL_C} -I$S/dev/e1000
-dev/e1000/if_lem.c optional em inet \
+dev/e1000/if_lem.c optional em \
compile-with ${NORMAL_C} -I$S/dev/e1000
-dev/e1000/if_igb.c optional igb inet \
+dev/e1000/if_igb.c optional igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
 dev/e1000/e1000_80003es2lan.c  optional em | igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
@@ -1046,7 +1046,7 @@ dev/firewire/sbp.coptional sbp
 dev/firewire/sbp_targ.coptional sbp_targ
 dev/flash/at45d.c  optional at45d
 dev/flash/mx25l.c  optional mx25l
-dev/fxp/if_fxp.c   optional fxp inet
+dev/fxp/if_fxp.c   optional fxp
 dev/gem/if_gem.c   optional gem
 dev/gem/if_gem_pci.c   optional gem pci
 dev/gem/if_gem_sbus.c  optional gem sbus
@@ -1336,7 +1336,7 @@ dev/ixgbe/ixgbe_82598.c   optional ixgbe 
compile-with ${NORMAL_C} -I$S/dev/ixgbe
 dev/ixgbe/ixgbe_82599.coptional ixgbe inet \
compile-with ${NORMAL_C} -I$S/dev/ixgbe
-dev/jme/if_jme.c   optional jme pci inet
+dev/jme/if_jme.c   optional jme pci
 dev/joy/joy.c  optional joy
 dev/joy/joy_isa.c  optional joy isa
 dev/joy/joy_pccard.c   optional joy pccard
@@ -1425,7 +1425,7 @@ dev/mpt/mpt_debug.c   optional mpt
 dev/mpt/mpt_pci.c  optional mpt pci
 dev/mpt/mpt_raid.c optional mpt
 dev/mpt/mpt_user.c optional mpt
-dev/msk/if_msk.c   optional msk inet
+dev/msk/if_msk.c   optional msk
 dev/mvs/mvs.c  optional mvs
 dev/mvs/mvs_if.m   optional mvs
 dev/mvs/mvs_pci.c  optional mvs pci
@@ -1639,7 +1639,7 @@ dev/siba/siba_bwn.c   optional siba_bwn p
 dev/siba/siba_core.c   optional siba_bwn pci
 dev/siis/siis.coptional siis pci
 dev/sis/if_sis.c   optional sis pci
-dev/sk/if_sk.c optional sk pci inet
+dev/sk/if_sk.c optional sk pci
 dev/smbus/smb.coptional smb
 dev/smbus/smbconf.coptional smbus
 dev/smbus/smbus.c  optional smbus
@@ -1788,7 +1788,7 @@ dev/twa/tw_osl_freebsd.c  optional twa \
 dev/twe/twe.c  optional twe
 dev/twe/twe_freebsd.c  optional twe
 dev/tx/if_tx.c optional tx
-dev/txp/if_txp.c   optional txp inet
+dev/txp/if_txp.c   optional txp
 dev/uart/uart_bus_acpi.c   optional uart acpi
 #dev/uart/uart_bus_cbus.c  optional uart cbus
 dev/uart/uart_bus_ebus.c   optional uart ebus
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221021 - head/sys/netinet

2011-04-25 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Apr 25 16:36:16 2011
New Revision: 221021
URL: http://svn.freebsd.org/changeset/base/221021

Log:
  Be less strict on includes than in r220746. We need in.h for both
  INET or INET6 as it holds all the IPPROTO_* definitions needed
  for the SYSCTL_NODE definitions.
  
  Reviewed by:  gnn
  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems
  MFC after:5 days

Modified:
  head/sys/netinet/in_proto.c

Modified: head/sys/netinet/in_proto.c
==
--- head/sys/netinet/in_proto.c Mon Apr 25 16:33:42 2011(r221020)
+++ head/sys/netinet/in_proto.c Mon Apr 25 16:36:16 2011(r221021)
@@ -64,8 +64,13 @@ __FBSDID($FreeBSD$);
 #include net/radix_mpath.h
 #endif
 #include net/vnet.h
+#endif /* INET */
 
+#if defined(INET) || defined(INET6)
 #include netinet/in.h
+#endif
+
+#ifdef INET
 #include netinet/in_systm.h
 #include netinet/in_var.h
 #include netinet/ip.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221022 - head/sys/net80211

2011-04-25 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Apr 25 16:37:47 2011
New Revision: 221022
URL: http://svn.freebsd.org/changeset/base/221022

Log:
  We need in.h for both INET and INET6, as according to RFC 3493 it
  defines struct in6_addr, which is needed by ip6_hdr used in here.
  
  Reviewed by:  gnn
  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems
  MFC after:5 days

Modified:
  head/sys/net80211/ieee80211_output.c

Modified: head/sys/net80211/ieee80211_output.c
==
--- head/sys/net80211/ieee80211_output.cMon Apr 25 16:36:16 2011
(r221021)
+++ head/sys/net80211/ieee80211_output.cMon Apr 25 16:37:47 2011
(r221022)
@@ -57,8 +57,11 @@ __FBSDID($FreeBSD$);
 #include net80211/ieee80211_wds.h
 #include net80211/ieee80211_mesh.h
 
-#ifdef INET
+#if defined(INET) || defined(INET6)
 #include netinet/in.h 
+#endif
+
+#ifdef INET
 #include netinet/if_ether.h
 #include netinet/in_systm.h
 #include netinet/ip.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread Warner Losh

On Apr 25, 2011, at 10:29 AM, Alexander Motin wrote:

 Warner Losh wrote:
 On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote:
 On Sun, Apr 24, 2011 at 06:59:40PM +, Bjoern A. Zeeb wrote:
 I had been pondering devfs links myself, the problem is that from the rc
 framework they come too late.  If you can add a simple .ko that does it
 programmatically on 9 that would be great.  The problem is that after 
 booting
 the new kernel you don't know whether people had ATA_STATIC on or not, so
 we'd have to go with the defaults, that were in 8.x (and an extra tunable 
 to
 flip the logic maybe)?
 We do know that people have ATA_STATIC_ID, because if they don't, this
 means they have their custom kernel config which doesn't contain ATA_CAM
 and when they will use it next time they recompile their kernel they
 will still have /dev/adX entries.
 
 Also, as Alexander already noted, because of all the problems with ATA
 naming over the years and for other reasons too, people often hardcode
 provider name in various GEOM classes metadata, so symlink won't help.
 
 Do we have a short list of the places to look? 
 
 Quick man pages grepping shows that at least gmirror, gstripe, graid3,
 gjournal, gvirstor, gconcat, gshsec support provider names hardcoding.
 For gmirror and graid3 present status can be obtained by: `gXXX list |
 egrep Flags: .*HARDCODED`. For gvirstor, gshsec, gstripe and gconcat:
 `gXXX dump adX | egrep Hardcoded provider: ad`. For gjournal:
 `gjournal dump adX | egrep hcprovider: ad`.

That wouldn't be too horrible...

 A lot of this could be done with a script that gets run at installworld and 
 boot time to hunt down the old cases and report them to the user before they 
 upgrade their kernel (but this would mean backing out the GENERIC change for 
 a while to give people a chance to upgrade to label-based provisioning...
 
 If I understand idea right, independently of how much we delay it, there
 will be some people who not updated during that window to get in code
 detecting it during boot. Hardly many people of target auditory updating
 their systems each month. Same time some checks indeed could be done in
 installkernel.

We'd have to delay it at least a month, if not more.  However, the time to have 
done these checks were 8.1ish rather than 9.0 nearing code-freezeish.  I'd 
thought there was going to be better compatibility last year at this time, or 
I'd have pushed this idea harder in the community...

And yes, I'd envisioned installkernel also doing these checks, just to be 
complete and prevent foot-shooting.  At this point, it's all we have.  For the 
9.0 install, we'll likely need to do a subset of this as people import their 
gmirrors created with 8.x...

Warner


 
 -- 
 Alexander Motin
 
 

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221023 - head/sys/netinet

2011-04-25 Thread Attilio Rao
Author: attilio
Date: Mon Apr 25 17:13:40 2011
New Revision: 221023
URL: http://svn.freebsd.org/changeset/base/221023

Log:
  Add the possibility to verify MD5 hash of incoming TCP packets.
  As long as this is a costy function, even when compiled in (along with
  the option TCP_SIGNATURE), it can be disabled via the
  net.inet.tcp.signature_verify_input sysctl.
  
  Sponsored by: Sandvine Incorporated
  Reviewed by:  emaste, bz
  MFC after:2 weeks

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_syncache.c
  head/sys/netinet/tcp_var.h

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cMon Apr 25 16:37:47 2011
(r221022)
+++ head/sys/netinet/tcp_input.cMon Apr 25 17:13:40 2011
(r221023)
@@ -215,6 +215,12 @@ static void tcp_pulloutofband(struct so
 struct tcphdr *, struct mbuf *, int);
 static void tcp_xmit_timer(struct tcpcb *, int);
 static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *);
+static void inline tcp_fields_to_host(struct tcphdr *);
+#ifdef TCP_SIGNATURE
+static void inline tcp_fields_to_net(struct tcphdr *);
+static int inline  tcp_signature_verify_input(struct mbuf *, int, int,
+   int, struct tcpopt *, struct tcphdr *, u_int);
+#endif
 static void inline cc_ack_received(struct tcpcb *tp, struct tcphdr *th,
uint16_t type);
 static void inline cc_conn_init(struct tcpcb *tp);
@@ -440,6 +446,40 @@ cc_post_recovery(struct tcpcb *tp, struc
tp-t_bytes_acked = 0;
 }
 
+static inline void
+tcp_fields_to_host(struct tcphdr *th)
+{
+
+   th-th_seq = ntohl(th-th_seq);
+   th-th_ack = ntohl(th-th_ack);
+   th-th_win = ntohs(th-th_win);
+   th-th_urp = ntohs(th-th_urp);
+}
+
+#ifdef TCP_SIGNATURE
+static inline void
+tcp_fields_to_net(struct tcphdr *th)
+{
+
+   th-th_seq = htonl(th-th_seq);
+   th-th_ack = htonl(th-th_ack);
+   th-th_win = htons(th-th_win);
+   th-th_urp = htons(th-th_urp);
+}
+
+static inline int
+tcp_signature_verify_input(struct mbuf *m, int off0, int tlen, int optlen,
+struct tcpopt *to, struct tcphdr *th, u_int tcpbflag)
+{
+   int ret;
+
+   tcp_fields_to_net(th);
+   ret = tcp_signature_verify(m, off0, tlen, optlen, to, th, tcpbflag);
+   tcp_fields_to_host(th);
+   return (ret);
+}
+#endif
+
 /* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */
 #ifdef INET6
 #define ND6_HINT(tp) \
@@ -519,6 +559,9 @@ tcp_input(struct mbuf *m, int off0)
int thflags;
int rstreason = 0;  /* For badport_bandlim accounting purposes */
uint8_t iptos;
+#ifdef TCP_SIGNATURE
+   uint8_t sig_checked = 0;
+#endif
 #ifdef IPFIREWALL_FORWARD
struct m_tag *fwd_tag;
 #endif
@@ -676,10 +719,7 @@ tcp_input(struct mbuf *m, int off0)
/*
 * Convert TCP protocol specific fields to host format.
 */
-   th-th_seq = ntohl(th-th_seq);
-   th-th_ack = ntohl(th-th_ack);
-   th-th_win = ntohs(th-th_win);
-   th-th_urp = ntohs(th-th_urp);
+   tcp_fields_to_host(th);
 
/*
 * Delay dropping TCP, IP headers, IPv6 ext headers, and TCP options.
@@ -861,8 +901,24 @@ relocked:
}
INP_INFO_WLOCK_ASSERT(V_tcbinfo);
 
+#ifdef TCP_SIGNATURE
+   tcp_dooptions(to, optp, optlen,
+   (thflags  TH_SYN) ? TO_SYN : 0);
+   if (sig_checked == 0) {
+   tp = intotcpcb(inp);
+   if (tp == NULL || tp-t_state == TCPS_CLOSED) {
+   rstreason = BANDLIM_RST_CLOSEDPORT;
+   goto dropwithreset;
+   }
+   if (!tcp_signature_verify_input(m, off0, tlen, optlen,
+   to, th, tp-t_flags))
+   goto dropunlock;
+   sig_checked = 1;
+   }
+#else
if (thflags  TH_SYN)
tcp_dooptions(to, optp, optlen, TO_SYN);
+#endif
/*
 * NB: tcp_twcheck unlocks the INP and frees the mbuf.
 */
@@ -1021,6 +1077,26 @@ relocked:
tp = intotcpcb(inp);
KASSERT(tp-t_state == TCPS_SYN_RECEIVED,
(%s: , __func__));
+#ifdef TCP_SIGNATURE
+   if (sig_checked == 0)  {
+   tcp_dooptions(to, optp, optlen,
+   (thflags  TH_SYN) ? TO_SYN : 0);
+   if (!tcp_signature_verify_input(m, off0, tlen,
+   optlen, to, th, tp-t_flags)) {
+
+   /*
+* In SYN_SENT 

Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread John Baldwin
On Sunday, April 24, 2011 3:41:08 pm Alexander Motin wrote:
 On 24.04.2011 21:59, Bjoern A. Zeeb wrote:
  What's about creating some kind of symlinks, it could be nice if it
  worked, but I don't see the way to do it on disk(9) or GEOM layers
  without breaking device's access counters and as result further random
  problems.
 
  I had been pondering devfs links myself, the problem is that from the rc
  framework they come too late.  If you can add a simple .ko that does it
  programmatically on 9 that would be great.  The problem is that after 
  booting
  the new kernel you don't know whether people had ATA_STATIC on or not, so
  we'd have to go with the defaults, that were in 8.x (and an extra tunable to
  flip the logic maybe)?
 
 Devfs links won't help users with hardcoded provider names in gmirror, 
 etc -- from GEOM PoV there will be no such providers. Also to create 
 proper mapping that module should have real-time information from CAM 
 about ATA controller details. And looking that it will have to link in 
 real time any derivative providers also (ad4s1a - ada0s1a) I worry if 
 it is possible at all. Some devfs expert needed here.

I think the biggest goal is to make /etc/fstab migration easiest.  I wonder if
you could leverage the device cloning callback in devfs to create symlinks
on the fly as name lookups were done (so if mount tries to use /dev/ad4blah
from /etc/fstab the symlink would be created on the fly).  This would allow
you to handle arbitrary suffixes (i.e. just make sure it matches 'adX(.*)'
and generate 'adaY\1' as the link target) without having to modify any of
gpart, etc. to create a forest of symlinks.

The only possible issue with this is that the devfs cloning eventhandler wants
you to return a dev_t, not a symlink.  That might still work fine (you might
have to do a namei() lookup to find the adaX.* devfs entry), but then you
would not get /dev/adX.* entries listed in /dev when you did an ls.  Instead,
trying to open those old names would just transparently work.  You could maybe
print a message on the console warning that you were remapping an old name to a
new one.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221025 - head/sys/arm/at91

2011-04-25 Thread Olivier Houchard
Author: cognet
Date: Mon Apr 25 18:15:45 2011
New Revision: 221025
URL: http://svn.freebsd.org/changeset/base/221025

Log:
  Typo fix

Modified:
  head/sys/arm/at91/at91_wdt.c

Modified: head/sys/arm/at91/at91_wdt.c
==
--- head/sys/arm/at91/at91_wdt.cMon Apr 25 17:34:10 2011
(r221024)
+++ head/sys/arm/at91/at91_wdt.cMon Apr 25 18:15:45 2011
(r221025)
@@ -102,7 +102,7 @@ wdt_watchdog(void *argp, u_int cmd, int 
else if (interval  0)
sc-cmd = interval | WD_ACTIVE;
 
-   /* We cannot turn of our watchdog so if user
+   /* We cannot turn off our watchdog so if user
 * fails to turn us on go to passive mode. */
if ((sc-cmd  WD_ACTIVE) == 0)
sc-cmd = WD_PASSIVE;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread David O'Brien
On Sun, Apr 24, 2011 at 08:58:58AM +, Alexander Motin wrote:
 Log:
   Switch the GENERIC kernels for all architectures to the new CAM-based ATA
   stack. It means that all legacy ATA drivers are disabled and replaced by
   respective CAM drivers. If you are using ATA device names in /etc/fstab or
   other places, make sure to update them respectively (adX - adaY,
   acdX - cdY, afdX - daY, astX - saY, where 'Y's are the sequential
   numbers for each type in order of detection, unless configured otherwise
   with tunables, see cam(4)).

I apologize if I missed a past discussion... but wasn't CAM designed
so that all disk-like things would be 'da' (direct access) irregardless
of underling protocol (SCSI/SAS/PATA/SATA)?  afdX - daY above helps
suggest this.  Wasn't that the reason we moved from 'sd' to 'da'?
At least this was the impression on freebsd-current@ back when we when
thru this in 1999 (e.g., 36eff7c2.41c67...@whistle.com,
4714.920569...@verdi.nethelp.no, 29382.921672...@verdi.nethelp.no,
199903172035.paa07...@khavrinen.lcs.mit.edu).


Now ATA-CAM is the default, why aren't disks devices named by the
established CAM names?

If we're not going to call CAM controlled ATA disks da, then why not
keep the existing ad and ar given ad stood for ATA-Disk and
ATA-RAID -- you're still calling the subsystem ata.

Otherwise, we can just recycle email from 1999 where folks didn't
see much value in the sd-da change.

-- 
-- David  (obr...@freebsd.org)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221026 - head/usr.bin/printf

2011-04-25 Thread Jilles Tjoelker
Author: jilles
Date: Mon Apr 25 19:15:58 2011
New Revision: 221026
URL: http://svn.freebsd.org/changeset/base/221026

Log:
  printf(1): Move non-bugs from the BUGS section to a new section CAVEATS.

Modified:
  head/usr.bin/printf/printf.1

Modified: head/usr.bin/printf/printf.1
==
--- head/usr.bin/printf/printf.1Mon Apr 25 18:15:45 2011
(r221025)
+++ head/usr.bin/printf/printf.1Mon Apr 25 19:15:58 2011
(r221026)
@@ -337,6 +337,16 @@ command appeared in
 It is modeled
 after the standard library function,
 .Xr printf 3 .
+.Sh CAVEATS
+.Tn ANSI
+hexadecimal character constants were deliberately not provided.
+.Pp
+Trying to print a dash (-) as the first character causes
+.Nm
+to interpret the dash as a program argument.
+.Nm --
+must be used before 
+.Ar format .
 .Sh BUGS
 Since the floating point numbers are translated from
 .Tn ASCII
@@ -348,9 +358,6 @@ The
 .Cm L
 modifier may produce additional precision, depending on the hardware platform.)
 .Pp
-.Tn ANSI
-hexadecimal character constants were deliberately not provided.
-.Pp
 The escape sequence \e000 is the string terminator.
 When present in the argument for the
 .Cm b
@@ -360,10 +367,3 @@ Multibyte characters are not recognized 
 a problem if
 .Ql %
 can appear inside a multibyte character).
-.Pp
-Trying to print a dash (-) as the first character causes
-.Nm
-to interpet the dash as a program argument.
-.Nm --
-must be used before 
-.Ar format .
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread Garrett Cooper
On Apr 25, 2011, at 9:29 AM, Alexander Motin m...@freebsd.org wrote:

 Warner Losh wrote:
 On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote:
 On Sun, Apr 24, 2011 at 06:59:40PM +, Bjoern A. Zeeb wrote:
 I had been pondering devfs links myself, the problem is that from the rc
 framework they come too late.  If you can add a simple .ko that does it
 programmatically on 9 that would be great.  The problem is that after 
 booting
 the new kernel you don't know whether people had ATA_STATIC on or not, so
 we'd have to go with the defaults, that were in 8.x (and an extra tunable 
 to
 flip the logic maybe)?
 We do know that people have ATA_STATIC_ID, because if they don't, this
 means they have their custom kernel config which doesn't contain ATA_CAM
 and when they will use it next time they recompile their kernel they
 will still have /dev/adX entries.
 
 Also, as Alexander already noted, because of all the problems with ATA
 naming over the years and for other reasons too, people often hardcode
 provider name in various GEOM classes metadata, so symlink won't help.
 
 Do we have a short list of the places to look? 
 
 Quick man pages grepping shows that at least gmirror, gstripe, graid3,
 gjournal, gvirstor, gconcat, gshsec support provider names hardcoding.
 For gmirror and graid3 present status can be obtained by: `gXXX list |
 egrep Flags: .*HARDCODED`. For gvirstor, gshsec, gstripe and gconcat:
 `gXXX dump adX | egrep Hardcoded provider: ad`. For gjournal:
 `gjournal dump adX | egrep hcprovider: ad`.
 
 A lot of this could be done with a script that gets run at installworld and 
 boot time to hunt down the old cases and report them to the user before they 
 upgrade their kernel (but this would mean backing out the GENERIC change for 
 a while to give people a chance to upgrade to label-based provisioning...
 
 If I understand idea right, independently of how much we delay it, there
 will be some people who not updated during that window to get in code
 detecting it during boot. Hardly many people of target auditory updating
 their systems each month. Same time some checks indeed could be done in
 installkernel.

For people like me who install multiple kernels and boot them at will, 
especially when there are other features under a large degree of development, 
this kind of action isn't acceptable because it shoots you in the foot when 
moving between the different kernels.

I'd prefer having an UPDATING note with all of the affected areas so that 
people can understand what needs to change and adjust their systems 
accordingly. As far as geom based hardcoding is concerned: maybe this can serve 
as a good lesson of what shouldn't be done and what should be fixed/have a 
translation layer added for this item?

Thanks,
-Garrett___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread Alexander Motin
David O'Brien wrote:
 On Sun, Apr 24, 2011 at 08:58:58AM +, Alexander Motin wrote:
 Log:
   Switch the GENERIC kernels for all architectures to the new CAM-based ATA
   stack. It means that all legacy ATA drivers are disabled and replaced by
   respective CAM drivers. If you are using ATA device names in /etc/fstab or
   other places, make sure to update them respectively (adX - adaY,
   acdX - cdY, afdX - daY, astX - saY, where 'Y's are the sequential
   numbers for each type in order of detection, unless configured otherwise
   with tunables, see cam(4)).
 
 I apologize if I missed a past discussion... but wasn't CAM designed
 so that all disk-like things would be 'da' (direct access) irregardless
 of underling protocol (SCSI/SAS/PATA/SATA)?  afdX - daY above helps
 suggest this.  Wasn't that the reason we moved from 'sd' to 'da'?
 At least this was the impression on freebsd-current@ back when we when
 thru this in 1999 (e.g., 36eff7c2.41c67...@whistle.com,
 4714.920569...@verdi.nethelp.no, 29382.921672...@verdi.nethelp.no,
 199903172035.paa07...@khavrinen.lcs.mit.edu).

CAM unifies the way to execute commands on devices with different
transports. That is why after this change afdX become daY and acdX
become cdY -- they all use SCSI command set. adaX same time stays on
it's own because it is ATA and uses different peripheral driver. It was
one of options to go by emulation way, translating SCSI commands into
ATA. That would turned all direct access devices into SCSI and daX, but
we went other way to not implement additional state machines for this
translation, since existing ata(4) state machine was horrible and we
prefer to drop it completely.

 Now ATA-CAM is the default, why aren't disks devices named by the
 established CAM names?
 
 If we're not going to call CAM controlled ATA disks da, then why not
 keep the existing ad and ar given ad stood for ATA-Disk and
 ATA-RAID -- you're still calling the subsystem ata.

What's about ad and ada, there is about 18 month history of early
adopting this new ATA stack. Using same name initially wasn't possible
due to collisions old stack, change now -- due to many adopted systems.

What's about ar, it is not so principal to me. With new names I was
trying to mimic other GEOMs behavior. But if people decide otherwise, I
see no problem to change it now.

 Otherwise, we can just recycle email from 1999 where folks didn't
 see much value in the sd-da change.

Sorry, I wasn't there in 1990s to speak about that change.

-- 
Alexander Motin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf

2011-04-25 Thread Warner Losh

On Apr 25, 2011, at 1:16 PM, Garrett Cooper wrote:

 On Apr 25, 2011, at 9:29 AM, Alexander Motin m...@freebsd.org wrote:
 
 Warner Losh wrote:
 On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote:
 On Sun, Apr 24, 2011 at 06:59:40PM +, Bjoern A. Zeeb wrote:
 I had been pondering devfs links myself, the problem is that from the rc
 framework they come too late.  If you can add a simple .ko that does it
 programmatically on 9 that would be great.  The problem is that after 
 booting
 the new kernel you don't know whether people had ATA_STATIC on or not, so
 we'd have to go with the defaults, that were in 8.x (and an extra tunable 
 to
 flip the logic maybe)?
 We do know that people have ATA_STATIC_ID, because if they don't, this
 means they have their custom kernel config which doesn't contain ATA_CAM
 and when they will use it next time they recompile their kernel they
 will still have /dev/adX entries.
 
 Also, as Alexander already noted, because of all the problems with ATA
 naming over the years and for other reasons too, people often hardcode
 provider name in various GEOM classes metadata, so symlink won't help.
 
 Do we have a short list of the places to look? 
 
 Quick man pages grepping shows that at least gmirror, gstripe, graid3,
 gjournal, gvirstor, gconcat, gshsec support provider names hardcoding.
 For gmirror and graid3 present status can be obtained by: `gXXX list |
 egrep Flags: .*HARDCODED`. For gvirstor, gshsec, gstripe and gconcat:
 `gXXX dump adX | egrep Hardcoded provider: ad`. For gjournal:
 `gjournal dump adX | egrep hcprovider: ad`.
 
 A lot of this could be done with a script that gets run at installworld and 
 boot time to hunt down the old cases and report them to the user before 
 they upgrade their kernel (but this would mean backing out the GENERIC 
 change for a while to give people a chance to upgrade to label-based 
 provisioning...
 
 If I understand idea right, independently of how much we delay it, there
 will be some people who not updated during that window to get in code
 detecting it during boot. Hardly many people of target auditory updating
 their systems each month. Same time some checks indeed could be done in
 installkernel.
 
 For people like me who install multiple kernels and boot them at will, 
 especially when there are other features under a large degree of development, 
 this kind of action isn't acceptable because it shoots you in the foot when 
 moving between the different kernels.

No it doesn't.
(a) There will be an override flag, if you really don't want to.  
WITHOUT_FSCK_SANITY_CHECK=t and we're done.
(b) The /dev/ufsid/*,/dev/gpt/*, /dev/ufs/* naming works on both flavors of 
kernel.

 I'd prefer having an UPDATING note with all of the affected areas so that 
 people can understand what needs to change and adjust their systems 
 accordingly. As far as geom based hardcoding is concerned: maybe this can 
 serve as a good lesson of what shouldn't be done and what should be 
 fixed/have a translation layer added for this item?

I'd prefer having it be there also.

Warner

 Thanks,
 -Garrett
 
 

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221027 - in head: bin/sh tools/regression/bin/sh/execution

2011-04-25 Thread Jilles Tjoelker
Author: jilles
Date: Mon Apr 25 20:54:12 2011
New Revision: 221027
URL: http://svn.freebsd.org/changeset/base/221027

Log:
  sh: Set $? to 0 for background commands.
  
  For backgrounded pipelines and subshells, the previous value of $? was being
  preserved, which is incorrect.
  
  For backgrounded simple commands containing a command substitution, the
  status of the last command substitution was returned instead of 0.
  
  If fork() fails, this is an error.

Added:
  head/tools/regression/bin/sh/execution/bg1.0   (contents, props changed)
  head/tools/regression/bin/sh/execution/bg2.0   (contents, props changed)
  head/tools/regression/bin/sh/execution/bg3.0   (contents, props changed)
Modified:
  head/bin/sh/eval.c

Modified: head/bin/sh/eval.c
==
--- head/bin/sh/eval.c  Mon Apr 25 19:15:58 2011(r221026)
+++ head/bin/sh/eval.c  Mon Apr 25 20:54:12 2011(r221027)
@@ -420,7 +420,8 @@ evalsubshell(union node *n, int flags)
INTOFF;
exitstatus = waitforjob(jp, (int *)NULL);
INTON;
-   }
+   } else
+   exitstatus = 0;
 }
 
 
@@ -559,7 +560,8 @@ evalpipe(union node *n)
exitstatus = waitforjob(jp, (int *)NULL);
TRACE((evalpipe:  job done exit status %d\n, exitstatus));
INTON;
-   }
+   } else
+   exitstatus = 0;
 }
 
 
@@ -1056,7 +1058,8 @@ parent:   /* parent process gets here (if 
backcmd-fd = pip[0];
close(pip[1]);
backcmd-jp = jp;
-   }
+   } else
+   exitstatus = 0;
 
 out:
if (lastarg)

Added: head/tools/regression/bin/sh/execution/bg1.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/bg1.0Mon Apr 25 20:54:12 
2011(r221027)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+: `false` 

Added: head/tools/regression/bin/sh/execution/bg2.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/bg2.0Mon Apr 25 20:54:12 
2011(r221027)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+f() { return 42; }
+f
+: | : 

Added: head/tools/regression/bin/sh/execution/bg3.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/bg3.0Mon Apr 25 20:54:12 
2011(r221027)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+f() { return 42; }
+f
+(:) 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221030 - head/sys/modules

2011-04-25 Thread David Christensen
Author: davidch
Date: Mon Apr 25 21:53:41 2011
New Revision: 221030
URL: http://svn.freebsd.org/changeset/base/221030

Log:
  - Added bxe(4) driver for i386 and amd64. Currently untested on other
CPU architectures.
  
  MFC after:One week

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Mon Apr 25 21:27:38 2011(r221029)
+++ head/sys/modules/Makefile   Mon Apr 25 21:53:41 2011(r221030)
@@ -40,6 +40,8 @@ SUBDIR=   ${_3dfx} \
bce \
bfe \
bge \
+   ${_bxe} \
+   ${_bxe} \
${_bios} \
${_bktr} \
${_bm} \
@@ -383,6 +385,7 @@ _aout=  aout
 _apm=  apm
 _arcnet=   arcnet
 _bktr= bktr
+_bxe=  bxe
 _cardbus=  cardbus
 _cbb=  cbb
 _ce=   ce
@@ -529,6 +532,7 @@ _amdsbwd=   amdsbwd
 _amdtemp=  amdtemp
 _arcmsr=   arcmsr
 _asmc= asmc
+_bxe=  bxe
 _cardbus=  cardbus
 _cbb=  cbb
 _cmx=  cmx
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221031 - head/sys/modules

2011-04-25 Thread David Christensen
Author: davidch
Date: Mon Apr 25 22:00:23 2011
New Revision: 221031
URL: http://svn.freebsd.org/changeset/base/221031

Log:
  - Removed duplicate {_bxe} definition.
  
  MFC after:One week

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Mon Apr 25 21:53:41 2011(r221030)
+++ head/sys/modules/Makefile   Mon Apr 25 22:00:23 2011(r221031)
@@ -41,7 +41,6 @@ SUBDIR=   ${_3dfx} \
bfe \
bge \
${_bxe} \
-   ${_bxe} \
${_bios} \
${_bktr} \
${_bm} \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221032 - in head/sys: amd64/amd64 conf i386/i386 modules/nfscl modules/nfsclient nfs nfsclient

2011-04-25 Thread Rick Macklem
Author: rmacklem
Date: Mon Apr 25 22:22:51 2011
New Revision: 221032
URL: http://svn.freebsd.org/changeset/base/221032

Log:
  Fix the experimental NFS client so that it does not bogusly
  set the f_flags field of struct statfs. This had the interesting
  effect of making the NFSv4 mounts disappear after r221014,
  since NFSMNT_NFSV4 and MNT_IGNORE became the same bit.
  Move the files used for a diskless NFS root from sys/nfsclient
  to sys/nfs in preparation for them to be used by both NFS
  clients. Also, move the declaration of the three global data
  structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c
  so that they are defined when either client uses them.
  
  Reviewed by:  jhb
  MFC after:2 weeks

Added:
  head/sys/nfs/bootp_subr.c
 - copied, changed from r221031, head/sys/nfsclient/bootp_subr.c
  head/sys/nfs/krpc.h
 - copied unchanged from r221031, head/sys/nfsclient/krpc.h
  head/sys/nfs/krpc_subr.c
 - copied, changed from r221031, head/sys/nfsclient/krpc_subr.c
  head/sys/nfs/nfs_diskless.c
 - copied, changed from r221031, head/sys/nfsclient/nfs_diskless.c
  head/sys/nfs/nfsdiskless.h
 - copied unchanged from r221031, head/sys/nfsclient/nfsdiskless.h
Deleted:
  head/sys/nfsclient/bootp_subr.c
  head/sys/nfsclient/krpc.h
  head/sys/nfsclient/krpc_subr.c
  head/sys/nfsclient/nfs_diskless.c
  head/sys/nfsclient/nfsdiskless.h
Modified:
  head/sys/amd64/amd64/genassym.c
  head/sys/conf/files
  head/sys/i386/i386/genassym.c
  head/sys/modules/nfscl/Makefile
  head/sys/modules/nfsclient/Makefile
  head/sys/nfsclient/nfs_vfsops.c

Modified: head/sys/amd64/amd64/genassym.c
==
--- head/sys/amd64/amd64/genassym.c Mon Apr 25 22:00:23 2011
(r221031)
+++ head/sys/amd64/amd64/genassym.c Mon Apr 25 22:22:51 2011
(r221032)
@@ -65,7 +65,7 @@ __FBSDID($FreeBSD$);
 #include netinet/in.h
 #include nfs/nfsproto.h
 #include nfsclient/nfs.h
-#include nfsclient/nfsdiskless.h
+#include nfs/nfsdiskless.h
 #include x86/apicreg.h
 #include machine/cpu.h
 #include machine/pcb.h

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Apr 25 22:00:23 2011(r221031)
+++ head/sys/conf/files Mon Apr 25 22:22:51 2011(r221032)
@@ -2822,12 +2822,12 @@ netsmb/smb_smb.coptional netsmb
 netsmb/smb_subr.c  optional netsmb
 netsmb/smb_trantcp.c   optional netsmb
 netsmb/smb_usr.c   optional netsmb
+nfs/bootp_subr.c   optional bootp nfsclient | bootp nfscl
+nfs/krpc_subr.coptional bootp nfsclient | bootp nfscl
 nfs/nfs_common.c   optional nfsclient | nfsserver
+nfs/nfs_diskless.c optional nfsclient nfs_root | nfscl nfs_root
 nfs/nfs_lock.c optional nfsclient | nfscl | nfslockd | nfsd
-nfsclient/bootp_subr.c optional bootp nfsclient
-nfsclient/krpc_subr.c  optional bootp nfsclient
 nfsclient/nfs_bio.coptional nfsclient
-nfsclient/nfs_diskless.c   optional nfsclient nfs_root
 nfsclient/nfs_node.c   optional nfsclient
 nfsclient/nfs_krpc.c   optional nfsclient
 nfsclient/nfs_subs.c   optional nfsclient

Modified: head/sys/i386/i386/genassym.c
==
--- head/sys/i386/i386/genassym.c   Mon Apr 25 22:00:23 2011
(r221031)
+++ head/sys/i386/i386/genassym.c   Mon Apr 25 22:22:51 2011
(r221032)
@@ -68,7 +68,7 @@ __FBSDID($FreeBSD$);
 #include netinet/in.h
 #include nfs/nfsproto.h
 #include nfsclient/nfs.h
-#include nfsclient/nfsdiskless.h
+#include nfs/nfsdiskless.h
 #ifdef DEV_APIC
 #include x86/apicreg.h
 #endif

Modified: head/sys/modules/nfscl/Makefile
==
--- head/sys/modules/nfscl/Makefile Mon Apr 25 22:00:23 2011
(r221031)
+++ head/sys/modules/nfscl/Makefile Mon Apr 25 22:22:51 2011
(r221032)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../fs/nfsclient
+.PATH: ${.CURDIR}/../../fs/nfsclient ${.CURDIR}/../../nfs
 KMOD=  nfscl
 SRCS=  vnode_if.h \
nfs_clrpcops.c \
@@ -22,4 +22,36 @@ SRCS=vnode_if.h \
opt_ufs.h \
opt_kgssapi.h
 
+.if !defined(KERNBUILDDIR)
+NFS_INET?= 1   # 0/1 - requires INET to be configured in kernel
+NFS_INET6?=1   # 0/1 - requires INET6 to be configured in kernel
+NFS_ROOT?= 1   # 0/1 - requires NFS_ROOT to be configured in kernel
+
+.if ${NFS_INET}  0
+opt_inet.h:
+   echo #define INET 1  ${.TARGET}
+.endif
+
+.if ${NFS_INET6}  0
+opt_inet6.h:
+   echo #define INET6 1  ${.TARGET}
+.endif
+
+.if ${NFS_ROOT}  0
+opt_nfsroot.h:
+   echo #define NFS_ROOT 1  ${.TARGET}
+.endif
+.else
+OPT_NFS_ROOT!= cat ${KERNBUILDDIR}/opt_nfsroot.h
+.if 

svn commit: r221035 - head/sys/ia64/include

2011-04-25 Thread Marcel Moolenaar
Author: marcel
Date: Mon Apr 25 22:38:09 2011
New Revision: 221035
URL: http://svn.freebsd.org/changeset/base/221035

Log:
  Remove prototypes of non-existent functions.

Modified:
  head/sys/ia64/include/pmap.h

Modified: head/sys/ia64/include/pmap.h
==
--- head/sys/ia64/include/pmap.hMon Apr 25 22:36:43 2011
(r221034)
+++ head/sys/ia64/include/pmap.hMon Apr 25 22:38:09 2011
(r221035)
@@ -127,13 +127,8 @@ void   pmap_bootstrap(void);
 void   pmap_kenter(vm_offset_t va, vm_offset_t pa);
 vm_paddr_t pmap_kextract(vm_offset_t va);
 void   pmap_kremove(vm_offset_t);
-void   pmap_setdevram(unsigned long long basea, vm_offset_t sizea);
-intpmap_uses_prom_console(void);
 void   *pmap_mapdev(vm_paddr_t, vm_size_t);
 void   pmap_unmapdev(vm_offset_t, vm_size_t);
-unsigned *pmap_pte(pmap_t, vm_offset_t) __pure2;
-void   pmap_set_opt(unsigned *);
-void   pmap_set_opt_bsp(void);
 struct pmap *pmap_switch(struct pmap *pmap);
 
 #endif /* _KERNEL */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221040 - in head/sys/fs: nfs nfsclient

2011-04-25 Thread Rick Macklem
Author: rmacklem
Date: Mon Apr 25 23:12:18 2011
New Revision: 221040
URL: http://svn.freebsd.org/changeset/base/221040

Log:
  Modify the experimental (newnfs) NFS client so that it uses the
  same diskless NFS root code as the regular client, which
  was moved to sys/nfs by r221032. This fixes the newnfs
  client so that it can do an NFSv3 diskless root file system.
  
  MFC after:2 weeks

Deleted:
  head/sys/fs/nfsclient/nfsdiskless.h
Modified:
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfsclient/nfs.h
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfs/nfs_var.h
==
--- head/sys/fs/nfs/nfs_var.h   Mon Apr 25 22:56:53 2011(r221039)
+++ head/sys/fs/nfs/nfs_var.h   Mon Apr 25 23:12:18 2011(r221040)
@@ -41,7 +41,6 @@ struct ucred;
 struct nfscred;
 NFSPROC_T;
 struct buf;
-struct nfs_diskless;
 struct sockaddr_in;
 struct nfs_dlmount;
 struct file;

Modified: head/sys/fs/nfsclient/nfs.h
==
--- head/sys/fs/nfsclient/nfs.h Mon Apr 25 22:56:53 2011(r221039)
+++ head/sys/fs/nfsclient/nfs.h Mon Apr 25 23:12:18 2011(r221040)
@@ -101,7 +101,6 @@ int ncl_fsinfo(struct nfsmount *, struct
 struct thread *);
 int ncl_init(struct vfsconf *);
 int ncl_uninit(struct vfsconf *);
-int ncl_mountroot(struct mount *);
 void   ncl_nfsiodnew(void);
 void   ncl_nfsiodnew_tq(__unused void *, int);
 

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==
--- head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 25 22:56:53 2011
(r221039)
+++ head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 25 23:12:18 2011
(r221040)
@@ -72,7 +72,7 @@ __FBSDID($FreeBSD$);
 #include fs/nfsclient/nfsnode.h
 #include fs/nfsclient/nfsmount.h
 #include fs/nfsclient/nfs.h
-#include fs/nfsclient/nfsdiskless.h
+#include nfs/nfsdiskless.h
 
 FEATURE(nfscl, NFSv4 client);
 
@@ -97,6 +97,7 @@ static int nfs_tprintf_delay = NFS_TPRIN
 SYSCTL_INT(_vfs_newnfs, NFS_TPRINTF_DELAY,
 downdelayinterval, CTLFLAG_RW, nfs_tprintf_delay, 0, );
 
+static int nfs_mountroot(struct mount *);
 static voidnfs_sec_name(char *, int *);
 static voidnfs_decode_args(struct mount *mp, struct nfsmount *nmp,
struct nfs_args *argp, const char *, struct ucred *,
@@ -140,19 +141,15 @@ MODULE_VERSION(newnfs, 1);
  * server for a diskless/dataless machine. It is initialized below just
  * to ensure that it is allocated to initialized data (.data not .bss).
  */
-struct nfs_diskless newnfs_diskless = { { { 0 } } };
-struct nfsv3_diskless newnfsv3_diskless = { { { 0 } } };
-int newnfs_diskless_valid = 0;
-
 SYSCTL_INT(_vfs_newnfs, OID_AUTO, diskless_valid, CTLFLAG_RD,
-newnfs_diskless_valid, 0,
+nfs_diskless_valid, 0,
 Has the diskless struct been filled correctly);
 
 SYSCTL_STRING(_vfs_newnfs, OID_AUTO, diskless_rootpath, CTLFLAG_RD,
-newnfsv3_diskless.root_hostnam, 0, Path to nfs root);
+nfsv3_diskless.root_hostnam, 0, Path to nfs root);
 
 SYSCTL_OPAQUE(_vfs_newnfs, OID_AUTO, diskless_rootaddr, CTLFLAG_RD,
-newnfsv3_diskless.root_saddr, sizeof newnfsv3_diskless.root_saddr,
+nfsv3_diskless.root_saddr, sizeof(nfsv3_diskless.root_saddr),
 %Ssockaddr_in, Diskless root nfs address);
 
 
@@ -230,29 +227,25 @@ static void
 nfs_convert_diskless(void)
 {
 
-   bcopy(newnfs_diskless.myif, newnfsv3_diskless.myif,
-   sizeof (struct ifaliasreq));
-   bcopy(newnfs_diskless.mygateway, newnfsv3_diskless.mygateway,
-   sizeof (struct sockaddr_in));
-   nfs_convert_oargs(newnfsv3_diskless.root_args,
-   newnfs_diskless.root_args);
-   if (newnfsv3_diskless.root_args.flags  NFSMNT_NFSV3) {
-   newnfsv3_diskless.root_fhsize = NFSX_MYFH;
-   bcopy(newnfs_diskless.root_fh, newnfsv3_diskless.root_fh,
-   NFSX_MYFH);
+   bcopy(nfs_diskless.myif, nfsv3_diskless.myif,
+   sizeof(struct ifaliasreq));
+   bcopy(nfs_diskless.mygateway, nfsv3_diskless.mygateway,
+   sizeof(struct sockaddr_in));
+   nfs_convert_oargs(nfsv3_diskless.root_args,nfs_diskless.root_args);
+   if (nfsv3_diskless.root_args.flags  NFSMNT_NFSV3) {
+   nfsv3_diskless.root_fhsize = NFSX_MYFH;
+   bcopy(nfs_diskless.root_fh, nfsv3_diskless.root_fh, NFSX_MYFH);
} else {
-   newnfsv3_diskless.root_fhsize = NFSX_V2FH;
-   bcopy(newnfs_diskless.root_fh, newnfsv3_diskless.root_fh,
-   NFSX_V2FH);
-   }
-   bcopy(newnfs_diskless.root_saddr,newnfsv3_diskless.root_saddr,
-   sizeof(struct sockaddr_in));
-   bcopy(newnfs_diskless.root_hostnam, newnfsv3_diskless.root_hostnam,
-   MNAMELEN);
-   newnfsv3_diskless.root_time = newnfs_diskless.root_time;
-   

Re: svn commit: r221032 - in head/sys: amd64/amd64 conf i386/i386 modules/nfscl modules/nfsclient nfs nfsclient

2011-04-25 Thread Rick Macklem
 Author: rmacklem
 Date: Mon Apr 25 22:22:51 2011
 New Revision: 221032
 URL: http://svn.freebsd.org/changeset/base/221032
 
 Log:
 Fix the experimental NFS client so that it does not bogusly
 set the f_flags field of struct statfs. This had the interesting
 effect of making the NFSv4 mounts disappear after r221014,
 since NFSMNT_NFSV4 and MNT_IGNORE became the same bit.
 Move the files used for a diskless NFS root from sys/nfsclient
 to sys/nfs in preparation for them to be used by both NFS
 clients. Also, move the declaration of the three global data
 structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c
 so that they are defined when either client uses them.
 
Oops. The first four lines of this Log message were sitting in
the editor from a provious commit and I didn't delete them.
I don't think there's an easy way to fix that now?

rick
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221041 - head/sys/dev/ixgbe

2011-04-25 Thread Jack F Vogel
Author: jfv
Date: Mon Apr 25 23:34:21 2011
New Revision: 221041
URL: http://svn.freebsd.org/changeset/base/221041

Log:
  - Add the RX refresh changes from igb to ixgbe
  - Also a couple minor tweaks to the TX code from the same source.
  - Add the INET ioctl code which has been missing from this driver,
and which caused IP aliases to reset the interface.
  - Last, some minor logic changes that just reflect upcoming
hardware support, but have no other functional effect now.
  
  MFC after a week

Modified:
  head/sys/dev/ixgbe/ixgbe.c
  head/sys/dev/ixgbe/ixgbe.h

Modified: head/sys/dev/ixgbe/ixgbe.c
==
--- head/sys/dev/ixgbe/ixgbe.c  Mon Apr 25 23:12:18 2011(r221040)
+++ head/sys/dev/ixgbe/ixgbe.c  Mon Apr 25 23:34:21 2011(r221041)
@@ -1,6 +1,6 @@
 /**
 
-  Copyright (c) 2001-2010, Intel Corporation 
+  Copyright (c) 2001-2011, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -33,7 +33,7 @@
 /*$FreeBSD$*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
-#include opt_device_polling.h
+#include opt_inet.h
 #endif
 
 #include ixgbe.h
@@ -46,7 +46,7 @@ int ixgbe_display_debug_stat
 /*
  *  Driver version
  */
-char ixgbe_driver_version[] = 2.3.8;
+char ixgbe_driver_version[] = 2.3.10;
 
 /*
  *  PCI Device ID Table
@@ -270,8 +270,8 @@ TUNABLE_INT(hw.ixgbe.hdr_split, ixgbe
 /*
  * Number of Queues, can be set to 0,
  * it then autoconfigures based on the
- * number of cpus. Each queue is a pair
- * of RX and TX rings with a msix vector
+ * number of cpus with a max of 8. This
+ * can be overriden manually here.
  */
 static int ixgbe_num_queues = 0;
 TUNABLE_INT(hw.ixgbe.num_queues, ixgbe_num_queues);
@@ -787,10 +787,6 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
return (err);
}
 
-   /* Call cleanup if number of TX descriptors low */
-   if (txr-tx_avail = IXGBE_TX_CLEANUP_THRESHOLD)
-   ixgbe_txeof(txr);
-
enqueued = 0;
if (m == NULL) {
next = drbr_dequeue(ifp, txr-br);
@@ -814,7 +810,9 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
ETHER_BPF_MTAP(ifp, next);
if ((ifp-if_drv_flags  IFF_DRV_RUNNING) == 0)
break;
-   if (txr-tx_avail = IXGBE_TX_OP_THRESHOLD) {
+   if (txr-tx_avail  IXGBE_TX_OP_THRESHOLD)
+   ixgbe_txeof(txr);
+   if (txr-tx_avail  IXGBE_TX_OP_THRESHOLD) {
ifp-if_drv_flags |= IFF_DRV_OACTIVE;
break;
}
@@ -864,10 +862,35 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
 {
struct adapter  *adapter = ifp-if_softc;
struct ifreq*ifr = (struct ifreq *) data;
+#ifdef INET
+   struct ifaddr *ifa = (struct ifaddr *)data;
+#endif
int error = 0;
 
switch (command) {
 
+case SIOCSIFADDR:
+#ifdef INET
+   if (ifa-ifa_addr-sa_family == AF_INET) {
+   /*
+* Since resetting hardware takes a very long time
+* and results in link renegotiation we only
+* initialize the hardware only when it is absolutely
+* required.
+*/
+   ifp-if_flags |= IFF_UP;
+   if (!(ifp-if_drv_flags  IFF_DRV_RUNNING)) {
+   IXGBE_CORE_LOCK(adapter);
+   ixgbe_init_locked(adapter);
+   IXGBE_CORE_UNLOCK(adapter);
+   }
+   if (!(ifp-if_flags  IFF_NOARP))
+   arp_ifinit(ifp, ifa);
+   } else
+#endif
+   error = ether_ioctl(ifp, command, data);
+   break;
+
case SIOCSIFMTU:
IOCTL_DEBUGOUT(ioctl: SIOCSIFMTU (Set Interface MTU));
if (ifr-ifr_mtu  IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) {
@@ -989,7 +1012,7 @@ ixgbe_init_locked(struct adapter *adapte
if (ifp-if_capenable  IFCAP_TXCSUM) {
ifp-if_hwassist |= (CSUM_TCP | CSUM_UDP);
 #if __FreeBSD_version = 80
-   if (hw-mac.type == ixgbe_mac_82599EB)
+   if (hw-mac.type != ixgbe_mac_82598EB)
ifp-if_hwassist |= CSUM_SCTP;
 #endif
}
@@ -1032,14 +1055,12 @@ ixgbe_init_locked(struct adapter *adapte
 
gpie = IXGBE_READ_REG(adapter-hw, IXGBE_GPIE);
 
-   if (hw-mac.type == ixgbe_mac_82599EB) {
-   gpie |= IXGBE_SDP1_GPIEN;
- 

svn commit: r221046 - in head/etc: defaults rc.d

2011-04-25 Thread Rick Macklem
Author: rmacklem
Date: Tue Apr 26 00:22:17 2011
New Revision: 221046
URL: http://svn.freebsd.org/changeset/base/221046

Log:
  Update the /etc/rc.d scripts for mountd and nfsd so they
  can use the -o option to force the old NFS server to run.
  Running the old NFS server is enabled by setting
  oldnfs_server_enable=YES. The scripts will only enable
  providing service for NFSv4 if nfsv4_server_enable=YES
  is set.
  
  Reviewed by:  dougb (rc)

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/mountd
  head/etc/rc.d/nfsd

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Tue Apr 26 00:20:04 2011(r221045)
+++ head/etc/defaults/rc.conf   Tue Apr 26 00:22:17 2011(r221046)
@@ -323,6 +323,7 @@ amd_map_program=NO# Can be set to y
 nfs_client_enable=NO # This host is an NFS client (or NO).
 nfs_access_cache=60  # Client cache timeout in seconds
 nfs_server_enable=NO # This host is an NFS server (or NO).
+oldnfs_server_enable=NO  # Run the old NFS server (YES/NO).
 nfs_server_flags=-u -t -n 4  # Flags to nfsd (if enabled).
 mountd_enable=NO # Run mountd (or NO).
 mountd_flags=-r  # Flags to mountd (if NFS server enabled).

Modified: head/etc/rc.d/mountd
==
--- head/etc/rc.d/mountdTue Apr 26 00:20:04 2011(r221045)
+++ head/etc/rc.d/mountdTue Apr 26 00:22:17 2011(r221046)
@@ -37,11 +37,10 @@ mountd_precmd()
fi
fi
 
-   # If nfsv4_server_enable is yes, force use of the experimental
-   # server
+   # If oldnfs_server_enable is yes, force use of the old NFS server
#
-   if checkyesno nfsv4_server_enable; then
-   rc_flags=-e ${rc_flags}
+   if checkyesno oldnfs_server_enable; then
+   rc_flags=-o ${rc_flags}
fi
 
if checkyesno zfs_enable; then

Modified: head/etc/rc.d/nfsd
==
--- head/etc/rc.d/nfsd  Tue Apr 26 00:20:04 2011(r221045)
+++ head/etc/rc.d/nfsd  Tue Apr 26 00:22:17 2011(r221046)
@@ -19,19 +19,8 @@ sig_stop=USR1
 
 nfsd_precmd()
 {
-   if checkyesno nfsv4_server_enable; then
-   # If nfsv4_server_enable is yes, force use
-   # of the experimental server
-   #
-   rc_flags=-e ${nfs_server_flags}
-
-   if ! checkyesno nfsuserd_enable   \
-   ! /etc/rc.d/nfsuserd forcestatus 1/dev/null 21
-   then
-   force_depend nfsuserd || return 1
-   fi
-   else
-   rc_flags=${nfs_server_flags}
+   if checkyesno oldnfs_server_enable; then
+   rc_flags=-o ${nfs_server_flags}
 
if ! sysctl vfs.nfsrv /dev/null 21; then
force_depend nfsserver || return 1
@@ -41,6 +30,30 @@ nfsd_precmd()
echo 'NFS on reserved port only=YES'
sysctl vfs.nfsrv.nfs_privport=1  /dev/null
fi
+   else
+   rc_flags=${nfs_server_flags}
+
+   # Load the modules now, so that the vfs.newnfs sysctl
+   # oids are available.
+   load_kld nfsd
+
+   if checkyesno nfs_reserved_port_only; then
+   echo 'NFS on reserved port only=YES'
+   sysctl vfs.newnfs.nfs_privport=1  /dev/null
+   fi
+
+   if checkyesno nfsv4_server_enable; then
+   if ! checkyesno nfsuserd_enable   \
+   ! /etc/rc.d/nfsuserd forcestatus 1/dev/null 21
+   then
+   if ! force_depend nfsuserd; then
+   err 1 Cannot run nfsuserd
+   fi
+   fi
+   else
+   echo 'NFSv4 is disabled'
+   sysctl vfs.newnfs.server_max_nfsvers=3  /dev/null
+   fi
fi
 
if ! checkyesno rpcbind_enable   \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221052 - head/usr.bin/rlogin

2011-04-25 Thread David E. O'Brien
Author: obrien
Date: Tue Apr 26 04:01:08 2011
New Revision: 221052
URL: http://svn.freebsd.org/changeset/base/221052

Log:
  Catch up with r57841 which removed the possible linking against libutil
  by not bothering to include its API.

Modified:
  head/usr.bin/rlogin/rlogin.c

Modified: head/usr.bin/rlogin/rlogin.c
==
--- head/usr.bin/rlogin/rlogin.cTue Apr 26 03:27:21 2011
(r221051)
+++ head/usr.bin/rlogin/rlogin.cTue Apr 26 04:01:08 2011
(r221052)
@@ -72,7 +72,6 @@ __FBSDID($FreeBSD$);
 #include err.h
 #include errno.h
 #include fcntl.h
-#include libutil.h
 #include netdb.h
 #include paths.h
 #include pwd.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r221053 - head/usr.bin/rlogin

2011-04-25 Thread David E. O'Brien
Author: obrien
Date: Tue Apr 26 04:09:20 2011
New Revision: 221053
URL: http://svn.freebsd.org/changeset/base/221053

Log:
  This builds OK using the parent dir's WARNS=6.
  [built on both AMD64 and i386]

Modified:
  head/usr.bin/rlogin/Makefile

Modified: head/usr.bin/rlogin/Makefile
==
--- head/usr.bin/rlogin/MakefileTue Apr 26 04:01:08 2011
(r221052)
+++ head/usr.bin/rlogin/MakefileTue Apr 26 04:09:20 2011
(r221053)
@@ -7,6 +7,4 @@ BINOWN= root
 BINMODE=4555
 PRECIOUSPROG=
 
-WARNS?=3
-
 .include bsd.prog.mk
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220497 - head/lib/libcrypt

2011-04-25 Thread David O'Brien
On Sat, Apr 09, 2011 at 02:02:04PM +, Mark Murray wrote:
 Log:
   Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't
   hurt us.

Would you mind if I committed this to be a more consistent with the
existing naming?

Index: crypt.c
===
--- crypt.c (revision 221053)
+++ crypt.c (working copy)
@@ -64,12 +64,12 @@ static const struct {
},
{
sha256,
-   sha256_crypt,
+   crypt_sha256,
$5$
},
{
sha512,
-   sha512_crypt,
+   crypt_sha512,
$6$
},
{
Index: crypt-sha512.c
===
--- crypt-sha512.c  (revision 221053)
+++ crypt-sha512.c  (working copy)
@@ -60,7 +60,7 @@ static const char sha512_rounds_prefix[]
 #define ROUNDS_MAX 9
 
 static char *
-sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
+crypt_sha512_r(const char *key, const char *salt, char *buffer, int buflen)
 {
u_long srounds;
int n;
@@ -280,12 +280,12 @@ sha512_crypt_r(const char *key, const ch
 
 /* This entry point is equivalent to crypt(3). */
 char *
-sha512_crypt(const char *key, const char *salt)
+crypt_sha512(const char *key, const char *salt)
 {
/* We don't want to have an arbitrary limit in the size of the
 * password. We can compute an upper bound for the size of the
 * result in advance and so we can prepare the buffer we pass to
-* `sha512_crypt_r'. */
+* `crypt_sha512_r'. */
static char *buffer;
static int buflen;
int needed;
@@ -305,7 +305,7 @@ sha512_crypt(const char *key, const char
buflen = needed;
}
 
-   return sha512_crypt_r(key, salt, buffer, buflen);
+   return crypt_sha512_r(key, salt, buffer, buflen);
 }
 
 #ifdef TEST
@@ -482,7 +482,7 @@ main(void)
}
 
for (cnt = 0; cnt  ntests2; ++cnt) {
-   char *cp = sha512_crypt(tests2[cnt].input, tests2[cnt].salt);
+   char *cp = crypt_sha512(tests2[cnt].input, tests2[cnt].salt);
 
if (strcmp(cp, tests2[cnt].expected) != 0) {
printf(test %d: expected \%s\, got \%s\\n,
Index: crypt.h
===
--- crypt.h (revision 221053)
+++ crypt.h (working copy)
@@ -36,8 +36,8 @@ char *crypt_des(const char *pw, const ch
 char *crypt_md5(const char *pw, const char *salt);
 char *crypt_nthash(const char *pw, const char *salt);
 char *crypt_blowfish(const char *pw, const char *salt);
-char *sha256_crypt (const char *pw, const char *salt);
-char *sha512_crypt (const char *pw, const char *salt);
+char *crypt_sha256 (const char *pw, const char *salt);
+char *crypt_sha512 (const char *pw, const char *salt);
 
 extern void _crypt_to64(char *s, u_long v, int n);
 extern void b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, int 
*buflen, char **cp);
Index: crypt-sha256.c
===
--- crypt-sha256.c  (revision 221053)
+++ crypt-sha256.c  (working copy)
@@ -60,7 +60,7 @@ static const char sha256_rounds_prefix[]
 #define ROUNDS_MAX 9
 
 static char *
-sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
+crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen)
 {
u_long srounds;
int n;
@@ -268,12 +268,12 @@ sha256_crypt_r(const char *key, const ch
 
 /* This entry point is equivalent to crypt(3). */
 char *
-sha256_crypt(const char *key, const char *salt)
+crypt_sha256(const char *key, const char *salt)
 {
/* We don't want to have an arbitrary limit in the size of the
 * password. We can compute an upper bound for the size of the
 * result in advance and so we can prepare the buffer we pass to
-* `sha256_crypt_r'. */
+* `crypt_sha256_r'. */
static char *buffer;
static int buflen;
int needed;
@@ -293,7 +293,7 @@ sha256_crypt(const char *key, const char
buflen = needed;
}
 
-   return sha256_crypt_r(key, salt, buffer, buflen);
+   return crypt_sha256_r(key, salt, buffer, buflen);
 }
 
 #ifdef TEST
@@ -459,7 +459,7 @@ main(void)
}
 
for (cnt = 0; cnt  ntests2; ++cnt) {
-   char *cp = sha256_crypt(tests2[cnt].input, tests2[cnt].salt);
+   char *cp = crypt_sha256(tests2[cnt].input, tests2[cnt].salt);
 
if (strcmp(cp, tests2[cnt].expected) != 0) {
printf(test %d: expected \%s\, got \%s\\n,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org