Re: stat(1) (was Re: mergemaster(8) broken -- uses Perl

2002-06-06 Thread Doug Barton
Bakul Shah wrote: the trick nicely (but is too ``complicated'', and I'd still like having a tool that allows userland to call stat/fstat(2): I'm currently testing a buildworld prior to importing NetBSD's stat(1) into the tree. Once that's done, if you have suggestions for improvements I'm

Re: stat(1) (was Re: mergemaster(8) broken -- uses Perl

2002-06-06 Thread Sheldon Hearn
On Wed, 05 Jun 2002 23:58:14 MST, Doug Barton wrote: I'm currently testing a buildworld prior to importing NetBSD's stat(1) into the tree. Once that's done, if you have suggestions for improvements I'm sure that they would be interested. I'll be happy to work with you on adding useful bits

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Paul Herman
On Sun, 19 May 2002, Dima Dorfman wrote: How about fixing ls(1) to output the numeric mode if asked to? That's good, but while you're at it you'd probably want to get *everything* out of (struct stat) and print it numerically (device, flags, atime since epoch, etc.) You could do this in

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Dima Dorfman
Paul Herman [EMAIL PROTECTED] wrote: On Sun, 19 May 2002, Dima Dorfman wrote: How about fixing ls(1) to output the numeric mode if asked to? That's good, but while you're at it you'd probably want to get *everything* out of (struct stat) and print it numerically (device, flags, atime

new fstat(1) feature (was Re: mergemaster(8) broken -- uses Perl)

2002-05-19 Thread Paul Herman
OK, here's a patch to fstat(1) which adds an -s option to stat(2) a list of files on the command line. It's against -STABLE but should still apply to -CURRENT. Comments are appreciated. The only other addition I would like to have is have -n option display everything numericaly as it does

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Bakul Shah
Paul Herman [EMAIL PROTECTED] wrote: On Sun, 19 May 2002, Dima Dorfman wrote: How about fixing ls(1) to output the numeric mode if asked to? That's good, but while you're at it you'd probably want to get *everything* out of (struct stat) and print it numerically (device, flags,

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Bakul Shah
$ stat -a stat Oops! A few lines got eaten! $ stat -a stat May 19 00:24:42 2002|48|May 19 00:24:42 2002|291846|-|bakul|0|262301|1|May 19 00:24:42 2002|rwxr-xr-x|1095744|23996|-|bakul|stat $ stat -a -n stat

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Alfred Perlstein
* Bakul Shah [EMAIL PROTECTED] [020519 00:30] wrote: $ stat -a stat Oops! A few lines got eaten! $ stat -a stat May 19 00:24:42 2002|48|May 19 00:24:42 2002|291846|-|bakul|0|262301|1|May 19 00:24:42 2002|rwxr-xr-x|1095744|23996|-|bakul|stat $ stat -a -n stat

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Giorgos Keramidas
On 2002-05-19 06:26, Dima Dorfman wrote: Paul Herman [EMAIL PROTECTED] wrote: bash$ /usr/obj/usr/src/usr.bin/fstat/fstat -s /tmp /kernel INODE DEVSIZE BLOCKS MODE FLAGS LNK UID GID ATIME MTIME CTIME NAME 235226304 4114305 8096 100555 40 1 0 0

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Giorgos Keramidas
On 2002-05-19 02:13, Alfred Perlstein wrote: * Bakul Shah [EMAIL PROTECTED] [020519 00:30] wrote: $ stat -a stat Oops! A few lines got eaten! $ stat -a stat May 19 00:24:42 2002|48|May 19 00:24:42 2002|291846|-|bakul|0|262301|1|May 19 00:24:42

Re: new fstat(1) feature (was Re: mergemaster(8) broken -- uses Perl)

2002-05-19 Thread Giorgos Keramidas
On 2002-05-19 00:01, Paul Herman wrote: OK, here's a patch to fstat(1) which adds an -s option to stat(2) a list of files on the command line. It's against -STABLE but should still apply to -CURRENT. Comments are appreciated. When building with WARNS=2 I also saw a few 'long int format,

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread David O'Brien
On Sun, May 19, 2002 at 05:29:22AM +0300, Giorgos Keramidas wrote: Part of the problems I had when I tried to replace perl in mergemaster.sh with something `native' was that the perl code uses stat(2) to obtain the permission bits of a directory/file and I can't think of a way to do this with

stat(1) (was Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Bakul Shah
the trick nicely (but is too ``complicated'', and I'd still like having a tool that allows userland to call stat/fstat(2): You are not alone; a number of stat(1) commands seemed to have popped up over the years. My friend @ SGI told me IRIX also has such a command. I liked its options so I

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Giorgos Keramidas
On 2002-05-19 11:05, David O'Brien wrote: On Sun, May 19, 2002 at 05:29:22AM +0300, Giorgos Keramidas wrote: Part of the problems I had when I tried to replace perl in mergemaster.sh with something `native' was that the perl code uses stat(2) to obtain the permission bits of a

mergemaster(8) broken -- uses Perl

2002-05-18 Thread David O'Brien
Anyone got a patch? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message

Re: mergemaster(8) broken -- uses Perl

2002-05-18 Thread Giorgos Keramidas
On 2002-05-18 11:54, David O'Brien wrote: Anyone got a patch? Part of the problems I had when I tried to replace perl in mergemaster.sh with something `native' was that the perl code uses stat(2) to obtain the permission bits of a directory/file and I can't think of a way to do this with tools

RE: mergemaster(8) broken -- uses Perl

2002-05-18 Thread Benjamin P. Grubin
Is [t]csh's `filetest` builtin viable here? Relurking, Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Giorgos Keramidas Sent: Saturday, May 18, 2002 10:29 PM To: [EMAIL PROTECTED] Subject: Re: mergemaster(8) broken -- uses Perl

Re: mergemaster(8) broken -- uses Perl

2002-05-18 Thread Giorgos Keramidas
On 2002-05-18 23:11, Benjamin P. Grubin wrote: Giorgos Keramidas wrote: [ The above should print in stdout just 01777 as a number. ] ... Does anyone know of any other (possibly more elegant way) of reading the numeric value of the permission bits for a file? Is [t]csh's `filetest`

Re: mergemaster(8) broken -- uses Perl

2002-05-18 Thread Paul Herman
On Sun, 19 May 2002, Giorgos Keramidas wrote: On 2002-05-18 23:11, Benjamin P. Grubin wrote: Giorgos Keramidas wrote: [ The above should print in stdout just 01777 as a number. ] ... Does anyone know of any other (possibly more elegant way) of reading the numeric value of the

RE: mergemaster(8) broken -- uses Perl

2002-05-18 Thread Benjamin P. Grubin
) broken -- uses Perl On Sun, 19 May 2002, Giorgos Keramidas wrote: On 2002-05-18 23:11, Benjamin P. Grubin wrote: Giorgos Keramidas wrote: [ The above should print in stdout just 01777 as a number. ] ... Does anyone know of any other (possibly more elegant way

Re: mergemaster(8) broken -- uses Perl

2002-05-18 Thread Giorgos Keramidas
On 2002-05-19 00:04, Benjamin P. Grubin wrote: Dear god, you guys really like hurting yourselves. If filetest doesn't do it, why not just something on the order of: #include sys/types.h #include sys/stat.h I was looking for a scriptable version of exactly this :) -- Giorgos Keramidas

Re: mergemaster(8) broken -- uses Perl

2002-05-18 Thread Dima Dorfman
Giorgos Keramidas [EMAIL PROTECTED] wrote: On 2002-05-18 11:54, David O'Brien wrote: Anyone got a patch? Part of the problems I had when I tried to replace perl in mergemaster.sh with something `native' was that the perl code uses stat(2) to obtain the permission bits of a directory/file