Index: bin/sh/parser.c =================================================================== --- bin/sh/parser.c +++ bin/sh/parser.c @@ -2014,8 +2014,9 @@ gethostname(&ps[i], PROMPTLEN - i); /* Skip to end of hostname. */ trim = (*fmt == 'h') ? '.' : '\0'; - while ((ps[i+1] != '\0') && (ps[i+1] != trim)) + while ((ps[i] != '\0') && (ps[i] != trim)) i++; + --i; break; /* @@ -2027,7 +2028,7 @@ case 'W': case 'w': pwd = lookupvar("PWD"); - if (pwd == NULL) + if (pwd == NULL || *pwd == '\0') pwd = "?"; if (*fmt == 'W' && *pwd == '/' && pwd[1] != '\0') Index: share/i18n/esdb/KOI/KOI7-switched.src =================================================================== --- share/i18n/esdb/KOI/KOI7-switched.src +++ share/i18n/esdb/KOI/KOI7-switched.src @@ -1,10 +1,7 @@ # $FreeBSD$ -# $NetBSD: KOI7-switched.src,v 1.3 2006/09/16 08:38:20 tnozaki Exp $ +# $NetBSD: KOI.src,v 1.2 2006/09/16 08:38:20 tnozaki Exp $ NAME "KOI7-switched" -ENCODING "ISO2022" -VARIABLE "INIT0=94@ 1=94N SO SI" -DEFCSID "ISO646-IRV:1983" 0x40000000 -DEFCSID "ISO-5427" 0x4E000000 -DEFCSID "ISO646-US" 0 -INVALID 0x4000003F +ENCODING "NONE" +DEFCSID "KOI7-switched" 0 +INVALID 0x3F # '?' Index: sys/dev/netmap/netmap_freebsd.c =================================================================== --- sys/dev/netmap/netmap_freebsd.c +++ sys/dev/netmap/netmap_freebsd.c @@ -792,7 +792,7 @@ kn->kn_fop = (ev == EVFILT_WRITE) ? &netmap_wfiltops : &netmap_rfiltops; kn->kn_hook = priv; - knlist_add(&si->si.si_note, kn, 1); + knlist_add(&si->si.si_note, kn, 0); // XXX unlock(priv) ND("register %p %s td %p priv %p kn %p np_nifp %p kn_fp/fpop %s", na, na->ifp->if_xname, curthread, priv, kn,