Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Rodney W. Grimes

> > > I don't see a problem with adding an option to cp to treat the first
> > > argument as the target instead of the last argument.  It's a simple
> > > solution, the code change is simple, and it produces the exact desired
> > > result.  What's the problem?
> > 
> > It's yet another non-portable option.
> 
> I hate to appear rude, but has anybody in this discussion actually used 
> xargs for what it's meant to be used ?
> 
> How do you do this in a script:
> 
>   cd /topdir; find . -type f | xargs -i {} cp {} /otherdir/.
> 

My example should work for that, just replace the initial echo
with ``cd /topdir; find . -type f'', and replace your xargs
with my script, using -n 100 or -s of some sane value.

> Before anyone starts writing scripts, consider that {} will be 
> replaced by xargs with (roughly) ARG_MAX - 10 characters worth of the 
> stuff coming off the pipe.  If your combined arguments plus 
> environment exceeds ARG_MAX execve(2) will give you E2BIG.

No rain here, it is ARG_MAX - 2048:
 -s size
 Set the maximum number of bytes for the command line length pro-
 vided to utility. The sum of the length of the utility name and
 the arguments passed to utility (including NULL terminators) will
 be less than or equal to this number.  The current default value
 for size is ARG_MAX - 2048.

2K would be a pretty big env, root default std is about 367 bytes.

Yes, that is probably not a portable assumption to make, but it is
far better than using non-standard options to xargs.

-- 
Rod Grimes - KD7CAX @ CN85sl - (RWG25)   [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Syscons mouse char range redefine proposal

2001-04-22 Thread Justin T. Gibbs

>Currently SC_MOUSE_CHAR occupes 0xd0-0xd4 range which produce conflict
>with several languages code tables. I plan to redefine it by default to
>0x03-0x07 leaving possibility to redefine it to any range as currently
>present. This way minimizes arcane information needed for user to setup
>its language correctly.

Perhaps this could be configured directly via the language table or
keymap?  Whatever the solution, it should be automatic with the
configuration of a locale change.

--
Justin

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: kernel core

2001-04-22 Thread Warner Losh

In message <[EMAIL PROTECTED]> "Daniel C. Sobral" writes:
: Chris Knight wrote:
: > 
: > I've found the following sequence to be optimal from going from
: > pre-dirpref -current to post-dirpref -current and 4-stable to -current:
: > 
: > make buildworld
: > make buildkernel KERNCONF=YOUR_KERNEL_HERE
: > make installkernel KERNCONF=YOUR_KERNEL_HERE
: > make installworld
: > mergemaster
: > 
: > fsck all partitions, answering yes to all prompts
: > tunefs -A -s  all partitions, where N > 0
: 
: This is not optimal because userland may depend on a new kernel, so
: things may go awry during that installworld step.

Agreed.  There must be a solution that doesn't require such hoop
jumping.  I haven't been following this too closely.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: got 5 stray irq 7's: not logging anymore?

2001-04-22 Thread Bruce Evans

On Mon, 23 Apr 2001, J Wunsch wrote:

> As J Wunsch wrote:
> 
> > Apr 22 23:39:08 uriah /boot/kernel/kernel: stray irq 7

The printer driver bogusly sets up its interrupt for every write(2).
Apparently there are some races in this.

> Even stranger, here's part of "systat -vm":
> 
>  Interrupts
>   418 total
>   stray irq0
>   stray irq6
>   stray irq7
>   vx0 irq9
>   117 sym0 irq12
>   sym1 irq10
>   atkbd0 irq
> 1 fdc0 irq6
>72 isic0 irq1
>   sio0 irq4
>   sio1 irq3
>   100 clk irq0
>   128 rtc irq8
>  elpt0 irq7
> 
> Note that IRQs 0, 6, and 7 are listed twice, once as `stray', and once
> belonging to their actual devices.
> 
> This is -current as of approximately April 1.

I get strays for 0, 6 and 7 consistently on 2 machines here.  I also get
a stray irq15 on a machine that actually uses irq15 (for ata1).

I think these are caused by the same races at boot time.  They mess up the
systat display.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: One more typo in src/release/Makefile, rev 1.612? (w/patch)

2001-04-22 Thread David O'Brien

On Mon, Apr 16, 2001 at 08:10:39PM -0700, John Baldwin wrote:
> Also, Bruce's fix is not entirely correct as it breaks for the
> non-debug kernel case, but I've already sent you a mail about that,
> just to let everyone know that it should be fixed shortly. :)

I commited your "fix" for it.  IMHO, it is cleaner before my commit and
thus what it should be -- the release system should match what is known
about the world.  If someone has the need to disable debug kernels, they
have the knowledge to edit src/release/Makefile... never the less, I
committed what you desired.

-- 
-- David  ([EMAIL PROTECTED])

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Brian Somers

> On Sun, 22 Apr 2001 13:16:31 +0100, Brian Somers wrote:
> > > On Sat, 21 Apr 2001 20:04:31 +0100, Brian Somers wrote:
> > > > > Sorry for butting in. Adding new non-portable functionality to solve the 
>problem
> > > > > which could be adequitely taken care of using existing and well known
> > > > > techniquies is not appropriate, I completely agree with you on that.
> > > > 
> > > > And I'm still waiting to see those well known techniques.
> > > 
> > > Attached small script should solve this problem and doesn't require
> > > introducing incompatible option in the standard tool.
> > > 
> > > For example:
> > > 
> > > find /usr/src -type f | xargs larg cp targetdir
> > > 
> > > For speed purposes it could be implemented in raw C.
> > > 
> > > -Maxim
> > > 
> > > #!/bin/sh
> > > 
> > > if [ ${#} -le 2 ]; then
> > >   echo "Usage: larg command lastarg arg1 [arg2 ...]"
> > >   exit 0
> >  ^
> >  oops :-)
> > > fi
> > > 
> > > COMMAND=${1}
> > > LASTARG=${2}
> > > shift 2
> > > exec ${COMMAND} "${@}" "${LASTARG}"
> > 
> > Yes, I think this will work as long as your environment isn't 
> > polluted by something like $ENV (any increase in the environment size 
> > will effect xargs's calculation of how many arguments will fit on the 
> > command line).
> 
> I don't see why it matters. The only thing that matters here is number of
> args accepted by the shell. Anyway this is a 2-minute prototype... ;)
> As you can see, the problem in fact could be easily solved using "well
> known techniques".
> 
> > Of course I still prefer the xargs fix - as you said above, it'd be 
> > nicer in C :-)
> 
> I still don't see why it couldn't be an separate tool (perhaps more
> general that my prototype).

I don't see that such a tool would be used without xargs, whereas 
users of xargs often want/expect this sort of facility - or so I 
believe.

> -Maxim

-- 
Brian <[EMAIL PROTECTED]>
     
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Garance A Drosihn

At 1:19 PM -0700 4/21/01, Dima Dorfman wrote:
>Does that mean everyone is blind and missed my arrogant
>cross-post of the amazingly short patch to do this, or
>are we just interested in discussing it and not testing
>the implementation? ;-)

Well, I'm in the middle of a massive reorganization of
all my machines at home (to fit in a new G4 Cube!), so
I'm not paying as much attention to this as I would like.
I think it's really great that Dima has volunteered to do
the work...:-)

 From what I have been following, you had one patch to add
the '-I' and '-i' options, and a different patch to add
the newly proposed '-Y' option.  Right?

The '-I' option is of interest because it is used in some
other OS's, and is even defined in some standards, such as
the SingleUnixSpec.  From that:

-I replstr
Insert mode: utility will be executed for each line from
standard input, taking the entire line as a single argument,
inserting it in arguments for each occurrence of replstr.
A maximum of five arguments in arguments can each contain
one or more instances of replstr. Any blank characters at
the beginning of each line are ignored. Constructed arguments
cannot grow larger than 255 bytes. Option -x is forced on.

I think that if we're going to add a '-I', then we should
follow that description.  Note that '-I', by definition,
forces '-n 1'.  It will always pick up only one file from
the input to xargs per command that xarg will generate.
It allows things like:

1.  The following will move all files from directory
$1 to directory $2:
ls $1 | xargs -I {} mv $1/{} $2/{}

[that example is a subset of an example from the standard]
One might argue whether there are alternate ways to get the
same effect.  However, in this case we're just trying to add
an option which is ALREADY described as a standard option to
this command.  I would think the only debate is whether Dima's
patch results in behavior which does indeed conform to the
written standard(s).

The newly proposed '-Y' option is similar, except that it
does NOT force '-n 1', and it should replace only ONE
occurrence of the replstr.  I'd be happy with any other
letter instead of '-Y'.  I only picked that letter because
it didn't seem to be used by any version of 'xargs' that I
personally work with.  We have a lot more room for debate
on this one, because we're making it up.

My thoughts on '-Y' are something like:

-Y replstr
Alternate insert mode: The number of arguments included
on the 'utility' is exactly the same as if -Y was not
specified.  The only difference is that those arguments
will replace  in the command(s) generated by
xargs, instead of appending the arguments at the end
of those commands.
In the string to execute, there can be only one copy
of the .  It is an error if there is more
than one copy of the  in the command to
execute.

Examples:
   ls -1 *2000* | xargs -Y [] cp -p [] /year/y2k

 will take all files which have '2000' in their
 name, and copy them to the directory /year/y2k

   ls $1 | xargs -Y [] mv $1/[] $2/[]

 will generate an error message, because the
  can only be replaced once, and we
 don't want to guess which copy of [] should
 be replaced.

I also like the idea of allowing:
'-i' means exactly the same as '-I {}'
and'-y' means exactly the same as '-Y []'
Note that I would not allow an optional argument to be included
on '-i', even though some standards do allow that for backward
compatibility.  Since I would rather not allow that, perhaps it
would be better to not even bother with '-i' and '-y'.

The -I, -i, -Y, and -y options are mutually exclusive.  If more
than one is specified, then the last one specified will take
effect.  Any attempt to do this "right" should probably be
careful that '-I' only forces '-n 1' if it is not overridden
by a later '-Y'.

I must admit I haven't really looked thru Dima's patch to see
if it meets all these criteria.  I did look at OpenBSD's and
NetBSD's xargs, to see if they had any other options that we
might want to add (they didn't seem to), or if they would have
any trouble adding the same option(s).  My intent here is to
at least describe what I was thinking of in precise-enough
terms that people can decide if the implementation is right.

And in case it isn't obvious, I'll say once again that I wouldn't
complain if someone comes up with a better letter than '-Y' to
use for this new option...  :-)  If '-I' stands for "insert mode",
then what should this mode be called, and what letter would be a
good match to it?  Maybe '-J', for "Just-insert-once mode"?   :-)
That would also get it listed right next to -I...

-- 
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
wit

Re: world is broken?

2001-04-22 Thread Kris Kennaway

On Sun, Apr 22, 2001 at 06:11:25PM +0400, Ilya Naumov wrote:
> Hello,
> 
> 'make buildworld' fails with the following symptoms:
> 
> ===> usr.sbin/rpc.lockd
> cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
>-I/usr/obj/garbage/src/i386/usr/include -c /garbage/src/usr.sbin/rpc.lockd/kern.c
> cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
>-I/usr/obj/garbage/src/i386/usr/include -c nlm_prot_svc.c
> cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
>-I/usr/obj/garbage/src/i386/usr/include -c /garbage/src/usr.sbin/rpc.lockd/lockd.c
> cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
>-I/usr/obj/garbage/src/i386/usr/include -c /garbage/src/usr.sbin/rpc.lockd/lock_proc.c
> cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
>-I/usr/obj/garbage/src/i386/usr/include -c 
>/garbage/src/usr.sbin/rpc.lockd/lockd_lock.c
> cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
>-I/usr/obj/garbage/src/i386/usr/include  -o rpc.lockd kern.o nlm_prot_svc.o lockd.o 
>lock_proc.o lockd_lock.o  -lrpcsvc -lutil
> *** Error code 1
> 
> Stop in /garbage/src/usr.sbin/rpc.lockd.
> *** Error code 1

Looks like you're building with -j, and haven't actually included the
command which gave the error (which may be some way back in the
make(1) output).  Rebuild without -j and post the real error :-)

Kris

 PGP signature


Re: got 5 stray irq 7's: not logging anymore?

2001-04-22 Thread J Wunsch

As J Wunsch wrote:

> Apr 22 23:39:08 uriah /boot/kernel/kernel: stray irq 7

Even stranger, here's part of "systat -vm":

 Interrupts
  418 total
  stray irq0
  stray irq6
  stray irq7
  vx0 irq9
  117 sym0 irq12
  sym1 irq10
  atkbd0 irq
1 fdc0 irq6
   72 isic0 irq1
  sio0 irq4
  sio1 irq3
  100 clk irq0
  128 rtc irq8
 elpt0 irq7

Note that IRQs 0, 6, and 7 are listed twice, once as `stray', and once
belonging to their actual devices.

This is -current as of approximately April 1.

-- 
cheers, J"org   .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



got 5 stray irq 7's: not logging anymore?

2001-04-22 Thread J Wunsch

Apr 22 23:39:08 uriah /boot/kernel/kernel: stray irq 7
Apr 22 23:39:08 uriah /boot/kernel/kernel: stray irq 7
Apr 22 23:41:00 uriah last message repeated 3 times
Apr 22 23:41:00 uriah /boot/kernel/kernel: got 5 stray irq 7's: not logging anymore

I get this while printing.  Strange, because:

% /sbin/dmesg | grep 'ppc0'
ppc0:  at port 0x378-0x37f irq 7 on isa0
  ^
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/9 bytes threshold

How's that?

-- 
cheers, J"org   .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Fix for union mount problem

2001-04-22 Thread Oliver Fromme

Hi,

Would someone please have a quick look at "bin/26498"?

It's a trivial one-line patch for the libc that fixes
an annoying bug that occurs when using union mounts
(i.e. mount -o union, _not_ unionfs).  More details
are in the PR.

It applies to both -current and -stable.

Thanks!

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: --whole-archive ld(1) option doesn't work

2001-04-22 Thread Maxim Sobolev

On Sun, 22 Apr 2001 15:19:10 +0300 (EEST), Maxim Sobolev wrote:
> I've noticed that the --whole-archive option doesn't work in -CURRENT and
> 4-STABLE. Among other things it makes impossible to build openssl from ports
> (yeah, I know that one should use ssl from /usr/src, but that's not a point).
> 
> Attached testcase and log exose the problem in question.

It seems that the problem is not in ld(1), but in gcc(1) front-end. On
a link stage it passes two -lgcc directives, that confuses the linker:

$ cc -v -shared -o /tmp/libfoo.so.1 -Wl,--whole-archive /usr/lib/libz.a
Using builtin specs. gcc version 2.95.3 20010315 (release)
/usr/libexec/elf/ld -m elf_i386 -Bshareable -o /tmp/libfoo.so.1
/usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/libexec/elf -L/usr/libexec
-L/usr/lib --whole-archive /usr/lib/libz.a -lgcc -lgcc /usr/lib/crtendS.o
/usr/lib/crtn.o /usr/lib/libgcc.a(_pure.o): In funcc -v -shared -o
/tmp/libfoo.so.1 -Wl,--whole-archive /usr/lib/libz.action
`__pure_virtual': _pure.o(.text+0x0): multiple definition of `__pure_virtual'
/usr/lib/libgcc.a(_pure.o)(.text+0x0): first defined here
/usr/lib/libgcc.a(_exit.o)(.data+0x0): multiple definition of `_exit_dummy_decl'
/usr/lib/libgcc.a(_exit.o)(.data+0x0): first defined here

I found the the workaround for this problem is to add -nodefaultlibs
and -lgcc, i.e. the following works:

$ cc -v -nodefaultlibs -shared -o /tmp/libfoo.so.1 -Wl,--whole-archive
/usr/lib/libz.a -lgcc
Using builtin specs.
gcc version 2.95.3 20010315 (release)
 /usr/libexec/elf/ld -m elf_i386 -Bshareable -o /tmp/libfoo.so.1
/usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/libexec/elf -L/usr/libexec
-L/usr/lib --whole-archive /usr/lib/libz.a -lgcc /usr/lib/crtendS.o
/usr/lib/crtn.o
$ 

Looks like a gcc(1) bug to me.

-Maxim

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



IPSEC & checkinterface

2001-04-22 Thread Kent Hauser

Hi,

I just rebuilt my several month old -current system &
found that IPSEC processing appears broken. 

I restored my IPSEC functionality by setting `ip_checkinterface = 0'
in "netinet/ip_input.c".

However, something tells me that this is not the long-term fix.

Thanks.
Kent


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Karsten W. Rohrbach

rohrbach@WM:datasink[~]68% tar cf /dev/null src/
rohrbach@WM:datasink[~]69% find src|wc -l
2552
rohrbach@WM:datasink[~]70% du -sk src
32258   src
rohrbach@WM:datasink[~]71% mkdir src2
rohrbach@WM:datasink[~]72% time find src -exec cp {} src2 \; 
find src -exec cp {} src2 ;  0.31s user 7.55s system 39% cpu 19.858 total).
rohrbach@WM:datasink[~]73% rm -rf src2
rohrbach@WM:datasink[~]74% mkdir src2
rohrbach@WM:datasink[~]75% time find src | cpio -dup src2
61025 blocks
find src  0.02s user 0.03s system 0% cpu 21.739 total
cpio -dup src2  0.26s user 4.84s system 20% cpu 24.862 total

68: warm up the filecache
69: there are 2552 files
70: they are 32.2MB total
71: ready the target dir
72: find -exec approach, all files to one dir
73: clear target area
74: ready it again
75: let find traverse the dir, cpio transfer the files

the cpio approach keeps the hierarchy which might not be what you want
but it looks more efficient, becouse it does not fork off cp for ecery
file.

/k

Brian Dean([EMAIL PROTECTED])@2001.04.21 16:24:36 +:
> On Sat, Apr 21, 2001 at 05:34:31PM +0200, Sheldon Hearn wrote:
> 
> > So we have two problems:
> > 
> > 1) Calling cp(1) repetitively is inefficient.
> > 
> > 2) The argument list is too big for cp(1).
> > 
> > Extending cp(1) will not solve (2).  Extending xargs(1) will solve both.
> > So why is an extension to cp(1) being proposed?
> 
> But extending cp does solve the problem.  The proposal was to make
> 
>   % cp -d target src1 src2 ... srcN
> 
> Be equivalent to;
> 
>   % cp src1 src2 ... srcN target
> 
> This makes cp work with xargs;
> 
>   % cat ReallyBigListOfFiles | xargs cp -d target
> 
> -Brian
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

-- 
> Captain Hook died of jock itch.
KR433/KR11-RIPE -- http://www.webmonster.de -- ftp://ftp.webmonster.de
[Key] [KeyID---] [Created-] [Fingerprint-]
GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE  DF22 3340 4F4E 2964 BF46

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Click on to meet someone you Click with

2001-04-22 Thread Introsearch.Com
Title: Click on to meet someone you Click with








Click on to meet someone you Click with 
Introsearch does
not condone unsolicited Bulk Emailing - Our source email lists comprise only of
email addresses which have been obtained through correct legal channels from
users who have at some stage authorised third party organisations to contact
them via email regarding products or services which the customer may find
interesting.  To be removed from our mailing list, please send an email to [EMAIL PROTECTED]
with the word 'remove' in the subject line
Introsearch.com is one of the fastest growing introduction systems on the
Internet and you can join online now at a fraction of the cost. Are you looking
for a change in your life, or just to busy to find the right person,
Introsearch.com has all the answers. Take a look at some of the benefits below
that are on offer to all our members.

  
  

  

  Twelve months membership
   Powerful matching system
   For all age groups
   Picture upload facility
   Voice upload facility
   Video upload facility

  
  

   
Members chat rooms
   Members forums
   Private emailing system
   Local party
nights
   Members have complete control
   Confidentiality assured

  

  
  

Join today for an annual membership of only £14:50 (21:00 us dollars) and
receive all the benefits above and much much more with introsearch.com.  Yes
that's an amazing 28p per week.
This is a special promotional offer and valid from
2nd April 2001
to finish on or before the last day of June 2001. 
Click on the link below and
start meeting new friends today.
http://www.introsearch.com
Click on to meet someone you
Click with

Introsearch.com is a member of the Data Protection Act 1974
License Number
Z4788975 (c) 2001 Introsearch. All Rights
Reserved
If you have any further issues with our advertising policy, contact Introsearch
at Tel: +44 (0)1772 798071 or by Post to: 
INTROSEARCH, ENGLAND  (Use Correct Postage - No letters or correspondence
without postage affixed will be opened)
PLEASE NOTE: This address is a licensed Royal Mail Postage Address and WILL be
received.





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Karsten W. Rohrbach

Brian Somers([EMAIL PROTECTED])@2001.04.20 11:29:15 +:
>   find something | xargs cp {} target_directory
> 
> or
> 
>   find something | xargs -i '[]' cp '[]' target_directory
> 
or
find something -exec cp {} target_directory \;

from find(1):
-exec utility [argument ...];
True if the program named utility returns a zero value as its ex-
it status.  Optional arguments may be passed to the utility.  The
expression must be terminated by a semicolon (``;'').  If the
string ``{}'' appears anywhere in the utility name or the argu-
ments it is replaced by the pathname of the current file.
Utility will be executed from the directory from which find was
executed.

/k

-- 
> who | grep -i blonde | date; cd ~; unzip; touch; finger; mount;\
> gasp; yes; uptime; umount; sleep
KR433/KR11-RIPE -- http://www.webmonster.de -- ftp://ftp.webmonster.de
[Key] [KeyID---] [Created-] [Fingerprint-]
GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE  DF22 3340 4F4E 2964 BF46

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: kernel core

2001-04-22 Thread Daniel C. Sobral

Chris Knight wrote:
> 
> I've found the following sequence to be optimal from going from
> pre-dirpref -current to post-dirpref -current and 4-stable to -current:
> 
> make buildworld
> make buildkernel KERNCONF=YOUR_KERNEL_HERE
> make installkernel KERNCONF=YOUR_KERNEL_HERE
> make installworld
> mergemaster
> 
> fsck all partitions, answering yes to all prompts
> tunefs -A -s  all partitions, where N > 0

This is not optimal because userland may depend on a new kernel, so
things may go awry during that installworld step.

-- 
Daniel C. Sobral(8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

all your kernels arpanic: blockable sleep lock (sleep mutex) Giant @
../../kern/kern_sig.c:153

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



leftover pseudo-devices

2001-04-22 Thread Jens Schweikhardt


hello, world\n

as -current's NOTES seems to no longer support pseudo-devices, we should
get the docs up to snuff. Grepping /usr/src for pseudo-device turns up
the following. I hesitate to simply s/pseudo-device/device/g and commit
the changes. Could the maintainers of these files please have a look at
what needs to be done. Thanks!


Regards,

Jens
-- 
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)

./contrib/ipfilter/ip_fil.c: * Try to detect the case when compiling for NetBSD with 
pseudo-device
./contrib/libpcap/inet.c:* The pseudo-device "any" listens on all interfaces 
and therefore
./contrib/ntp/kernel/README: pseudo-device  tty 4  # TTY clock support
./contrib/ntp/kernel/README: pseudo-device  tty 4  # TTY clock support
./release/picobsd/doc/src/how2build.html:   line in your kernel config file 
stating 'pseudo-device vn xxx').
./sbin/mknod/mknod.8:for pseudo-devices.
./share/doc/smm/01.setup/5.t:In either case, include the pseudo-devices
./share/doc/smm/01.setup/5.t:The ``pty'' pseudo-device forces the pseudo terminal 
device driver
./share/doc/smm/01.setup/5.t:while the ``loop'' pseudo-device forces inclusion of the 
software loopback
./share/doc/smm/01.setup/5.t:Ethernet, the pseudo-device ``ether'' should also be 
included
./share/examples/drivers/make_pseudo_driver.sh:pseudo-device${1}4   # 
might as well allow 4 of them 
./share/examples/isdn/FAQ:  pseudo-device   "i4bisppp"  4
./share/man/man4/bpf.4:.Cd pseudo-device bpf
./share/man/man4/ccd.4:.Cd "pseudo-device ccd 4"
./share/man/man4/ccd.4:how to properly configure disks and pseudo-devices in a kernel
./share/man/man4/ccd.4:pseudo-deviceccd 4   # concatenated disk devices
./share/man/man4/ef.4:pseudo-device driver provides support for multiple ethernet 
frame types.
./share/man/man4/ef.4:pseudo-device driver clones each ethernet type device with four
./share/man/man4/faith.4:.Cd "pseudo-device faith 1"
./share/man/man4/fpa.4:.Cd "pseudo-device fddi"
./share/man/man4/gif.4:.Cd "pseudo-device gif" Op Ar count
./share/man/man4/ifmib.4:hardware device or a software pseudo-device like
./share/man/man4/intro.4:.Em pseudo-devices
./share/man/man4/lo.4:.Cd "pseudo-device loop"
./share/man/man4/ppp.4:.Cd "pseudo-device ppp" Op Ar count
./share/man/man4/pty.4:.Cd "pseudo-device pty"
./share/man/man4/sl.4:.Cd "pseudo-device sl" Op Ar count
./share/man/man4/splash.4:.Cd "pseudo-device splash"
./share/man/man4/splash.4:.Dl pseudo-device splash
./share/man/man4/sppp.4:.Cd "pseudo-device sppp"
./share/man/man4/stf.4:.Cd "pseudo-device stf"
./share/man/man4/syscons.4:pseudo-device splash
./share/man/man4/tap.4:.Cd pseudo-device tap
./share/man/man4/tun.4:.Cd pseudo-device tun
./share/man/man4/vinum.4:pseudo-device  vinum
./share/man/man4/vinum.4:pseudo-device appear to work, but are not supported.  If you 
have trouble with
./share/man/man4/man4.i386/ar.4:.Cd "pseudo-device sppp"
./share/man/man4/man4.i386/cx.4:.Cd pseudo-device sppp
./share/man/man4/man4.i386/en.4:.Cd "pseudo-device atm"
./share/man/man4/man4.i386/spkr.4:.Cd pseudo-device speaker
./share/man/man4/man4.i386/sr.4:.Cd "pseudo-device sppp"
./sys/dev/ccd/ccd.c: * Called by main() during pseudo-device attachment.  All we need
./sys/dev/streams/streams.c: * Stolen from NetBSD /sys/compat/svr4/svr4_net.c.  
Pseudo-device driver
./sys/dev/vinum/vinum.c:/* Called by main() during pseudo-device attachment. */
./sys/dev/vinum/vinum.c: * Called by main() during pseudo-device attachment.  All we 
need
./sys/i4b/driver/i4b_isppp.c:# error "You need to define `pseudo-device sppp ' with 
options ISPPP"
./sys/kern/kern_descrip.c: * File Descriptor pseudo-device driver (/dev/fd/).
./sys/modules/svr4/README:  a.  Add "pseudo-device streams" to your kernel config 
file and rebuild,
./sys/net/if_vlan.c: * if_vlan.c - pseudo-device driver for IEEE 802.1Q virtual LANs.
./sys/netinet/ip_fil.c: * Try to detect the case when compiling for NetBSD with 
pseudo-device
./sys/sys/mdioctl.h: * Ioctl definitions for memory disk pseudo-device.
./sys/sys/vnioctl.h: * Ioctl definitions for file (vnode) disk pseudo-device.
./tools/tools/upgrade/doupgrade.sh:pseudo-device   splash \
./usr.sbin/arp/arp.4:.Cd "pseudo-device ether"
./usr.sbin/config/SMM.doc/2.t:.IR pseudo-devices .
./usr.sbin/config/SMM.doc/4.t:Pseudo-devices
./usr.sbin/config/SMM.doc/4.t:To include any of these pieces, a ``pseudo-device'' 
specification
./usr.sbin/config/SMM.doc/4.t:\fBpseudo-device\fP   \fIdevice-name\fP [ 
\fIhowmany\fP ]
./usr.sbin/config/SMM.doc/5.t:.I pseudo-device
./usr.sbin/config/SMM.doc/5.t:.I pseudo-device
./usr.sbin/config/SMM.doc/5.t:pseudo-device pty
./usr.sbin/config/SMM.doc/5.t:pseudo-device loop
./usr.sbin/config/SMM.doc/5.t:pseudo-device imp
./usr.sbin/config/SMM.doc/5.t:pseudo-device ether
./usr.sbin/config/SMM.doc/6.t:which may be configured with pseudo-device 
specifications.
./usr.sbin/config/SMM.

world broken at vnode.h

2001-04-22 Thread Michael Harnois

In file included from ../../dev/bktr/bktr_audio.c:52:
../../sys/vnode.h:571: conflicting types for `vaccess_acl_posix1e'
../../sys/vnode.h:568: previous declaration of `vaccess_acl_posix1e'
../../sys/vnode.h:571: warning: redundant redeclaration of `vaccess_acl_posix1e' in 
same scope
../../sys/vnode.h:568: warning: previous declaration of `vaccess_acl_posix1e'
*** Error code 1

the offending lines in vnode.h are 

int vaccess_acl_posix1e __P((enum vtype type, struct acl *acl,
mode_t acc_mode, struct ucred *cred, int *privused));
int vaccess_acl_posix1e __P((enum vtype type, uid_t file_uid,
gid_t file_gid, struct acl *acl, mode_t acc_mode,
struct ucred *cred, int *privused));

One suspects only one of those can be correct ...

-- 
Michael D. Harnois[EMAIL PROTECTED]
Redeemer Lutheran Church  Washburn, Iowa 
 Hanlon's Razor: Never attribute to malice 
 that which is adequately explained by stupidity.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Maxim Sobolev

On Sun, 22 Apr 2001 13:16:31 +0100, Brian Somers wrote:
> > On Sat, 21 Apr 2001 20:04:31 +0100, Brian Somers wrote:
> > > > Sorry for butting in. Adding new non-portable functionality to solve the 
>problem
> > > > which could be adequitely taken care of using existing and well known
> > > > techniquies is not appropriate, I completely agree with you on that.
> > > 
> > > And I'm still waiting to see those well known techniques.
> > 
> > Attached small script should solve this problem and doesn't require
> > introducing incompatible option in the standard tool.
> > 
> > For example:
> > 
> > find /usr/src -type f | xargs larg cp targetdir
> > 
> > For speed purposes it could be implemented in raw C.
> > 
> > -Maxim
> > 
> > #!/bin/sh
> > 
> > if [ ${#} -le 2 ]; then
> > echo "Usage: larg command lastarg arg1 [arg2 ...]"
> > exit 0
>  ^
>  oops :-)
> > fi
> > 
> > COMMAND=${1}
> > LASTARG=${2}
> > shift 2
> > exec ${COMMAND} "${@}" "${LASTARG}"
> 
> Yes, I think this will work as long as your environment isn't 
> polluted by something like $ENV (any increase in the environment size 
> will effect xargs's calculation of how many arguments will fit on the 
> command line).

I don't see why it matters. The only thing that matters here is number of
args accepted by the shell. Anyway this is a 2-minute prototype... ;)
As you can see, the problem in fact could be easily solved using "well
known techniques".

> Of course I still prefer the xargs fix - as you said above, it'd be 
> nicer in C :-)

I still don't see why it couldn't be an separate tool (perhaps more
general that my prototype).

-Maxim

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Maxim Sobolev

On Sat, 21 Apr 2001 20:04:31 +0100, Brian Somers wrote:
> > Sorry for butting in. Adding new non-portable functionality to solve the problem
> > which could be adequitely taken care of using existing and well known
> > techniquies is not appropriate, I completely agree with you on that.
> 
> And I'm still waiting to see those well known techniques.

Attached small script should solve this problem and doesn't require
introducing incompatible option in the standard tool.

For example:

find /usr/src -type f | xargs larg cp targetdir

For speed purposes it could be implemented in raw C.

-Maxim

#!/bin/sh

if [ ${#} -le 2 ]; then
echo "Usage: larg command lastarg arg1 [arg2 ...]"
exit 0
fi

COMMAND=${1}
LASTARG=${2}
shift 2
exec ${COMMAND} "${@}" "${LASTARG}"

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



RE: kernel core

2001-04-22 Thread Chris Knight

Howdy,

I've found the following sequence to be optimal from going from
pre-dirpref -current to post-dirpref -current and 4-stable to -current:

make buildworld
make buildkernel KERNCONF=YOUR_KERNEL_HERE
make installkernel KERNCONF=YOUR_KERNEL_HERE
make installworld
mergemaster

fsck all partitions, answering yes to all prompts
tunefs -A -s  all partitions, where N > 0

I found that the newer fsck didn't help any.

Regards,
Chris Knight
Systems Administrator
AIMS Independent Computer Professionals
Tel: +61 3 6334 6664  Fax: +61 3 6331 7032  Mob: +61 419 528 795
Web: http://www.aims.com.au



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of John Baldwin
> Sent: Sunday, 22 April 2001 3:27
> To: David W. Chapman Jr.; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: kernel core
>
>
>
> On 21-Apr-01 David W. Chapman Jr. wrote:
> > I just tried to do an installkernel on a new kernel I built
> and I got the
> > same error except the last line changed to
> >
> > stopped atffs_dirpref+0x210movzbl0(%ECX,%EAX,1),%EAX
> >
> > Do I have any hope at recovering from this or should I
> start again with 4
> > and upgrade to -current.  I'm assuming is a problem with
> the kernel and
> > without being able to update the kernel and install a new
> one, I don't think
> > I can fix it.
>
> You need to rebuild fsck and install it and fsck your
> filesystems.  This is the
> dirpref changes biting you.  Warner, we probably need an
> entry in UPDATING for
> the dirpref changes that warn people to build and install a
> new fsck before
> booting a dirpref kernel.
>
> --
>
> John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
> PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc
> "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
>



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Wrong headline!

2001-04-22 Thread Fredrik Neisler

Current Release(s)

->  Release 4.3 (November, 2000) ?!??

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Brian Somers

> On Sat, 21 Apr 2001 20:04:31 +0100, Brian Somers wrote:
> > > Sorry for butting in. Adding new non-portable functionality to solve the problem
> > > which could be adequitely taken care of using existing and well known
> > > techniquies is not appropriate, I completely agree with you on that.
> > 
> > And I'm still waiting to see those well known techniques.
> 
> Attached small script should solve this problem and doesn't require
> introducing incompatible option in the standard tool.
> 
> For example:
> 
> find /usr/src -type f | xargs larg cp targetdir
> 
> For speed purposes it could be implemented in raw C.
> 
> -Maxim
> 
> #!/bin/sh
> 
> if [ ${#} -le 2 ]; then
>   echo "Usage: larg command lastarg arg1 [arg2 ...]"
>   exit 0
 ^
 oops :-)
> fi
> 
> COMMAND=${1}
> LASTARG=${2}
> shift 2
> exec ${COMMAND} "${@}" "${LASTARG}"

Yes, I think this will work as long as your environment isn't 
polluted by something like $ENV (any increase in the environment size 
will effect xargs's calculation of how many arguments will fit on the 
command line).

Of course I still prefer the xargs fix - as you said above, it'd be 
nicer in C :-)
-- 
Brian <[EMAIL PROTECTED]>
     
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



--whole-archive ld(1) option doesn't work

2001-04-22 Thread Maxim Sobolev

I've noticed that the --whole-archive option doesn't work in -CURRENT and
4-STABLE. Among other things it makes impossible to build openssl from ports
(yeah, I know that one should use ssl from /usr/src, but that's not a point).

Attached testcase and log exose the problem in question.

-Maxim
 out
 ldbug.tgz


world is broken?

2001-04-22 Thread Ilya Naumov

Hello,

'make buildworld' fails with the following symptoms:

===> usr.sbin/rpc.lockd
cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
-I/usr/obj/garbage/src/i386/usr/include -c /garbage/src/usr.sbin/rpc.lockd/kern.c
cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
-I/usr/obj/garbage/src/i386/usr/include -c nlm_prot_svc.c
cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
-I/usr/obj/garbage/src/i386/usr/include -c /garbage/src/usr.sbin/rpc.lockd/lockd.c
cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
-I/usr/obj/garbage/src/i386/usr/include -c /garbage/src/usr.sbin/rpc.lockd/lock_proc.c
cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
-I/usr/obj/garbage/src/i386/usr/include -c /garbage/src/usr.sbin/rpc.lockd/lockd_lock.c
cc -pipe -march=k6 -I. -I/usr/obj/garbage/src/i386/usr/include/rpcsvc -g   
-I/usr/obj/garbage/src/i386/usr/include  -o rpc.lockd kern.o nlm_prot_svc.o lockd.o 
lock_proc.o lockd_lock.o  -lrpcsvc -lutil
*** Error code 1

Stop in /garbage/src/usr.sbin/rpc.lockd.
*** Error code 1

Stop in /garbage/src/usr.sbin.
*** Error code 1

Stop in /garbage/src.
*** Error code 1

Stop in /garbage/src.
*** Error code 1

Stop in /garbage/src.


-- 
Best regards,
 Ilya  mailto:[EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: cp -d dir patch for review (or 'xargs'?)

2001-04-22 Thread Brian Somers

> Brian Somers <[EMAIL PROTECTED]> writes:
> > I looked at your patches and immediately thought ``these patches 
> > can't be right'' as I was expecting it to deal with things such as 
> > 
> >   xargs -I [] echo args are [], duplicated are []
> 
> It deals with it.  It conveniently ignores the second '[]' :-).
> Seriosly though, what do you expect it to do in this case?  It can
> either read some more from stdin, or use the same input it used for
> the first case of '[]'.  I also can't think of a case when either one
> of these would be useful.

I can't think of a case either :*]

> I guess the only reason we would want this is if SUSv2 defines it, but
> even that may not matter since we probably won't support the silly
> '-i[nospace]' semantic (other than being silly, I can't think of how
> to implement it without writing a custom getopt() facility).

Absolutely - we wanna avoid that sort of mucking about.

> > I'm also dubious about the patches working for large volumes on 
> > standard input.  At this point I scrapped the email I was composing 
> > 'cos I didn't have time to look into it further :-/
> > 
> > I think it's important to test any patches with a large number of 
> > large path names as input - so that ARG_MAX is reached before the 
> > 5000 argument limit and we can see that we don't end up getting E2BIG 
> > because of an accidental overflow/miscalculation.
> 
> Any advice on testing this (you did write rev. 1.9 of xargs.1, after
> all)?  I created a file with 4500 words like this:
> 
>   /this/is/a/very/long/path/name/because/I/am/testing/some/posix/limit/10
> 
> which ended up being 330 kB.  It ran the `utility' multiple times like
> I expected it to.  That said, I don't know what kind of failure mode
> to expect.  I.e., if the patch is wrong, should it have failed with
> something like, "xargs: exec: argument list too long", or would it
> just produce incorrect output (which I didn't really check for)?

Yes, I was expecting it to fail with E2BIG.  Sorry for doubting your 
patches - they work as advertised from the looks of it !  Nice one.

> Thanks,

Thank you !

>   Dima Dorfman
>   [EMAIL PROTECTED]

-- 
Brian <[EMAIL PROTECTED]>
     
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message