DragonFly BSD
DragonFly kernel List (threaded) for 2003-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: HEADS UP! RCNG in the tree...


From: Robert Garrett <rg70@xxxxxxxxxxxxx>
Date: Fri, 25 Jul 2003 10:50:29 -0500

Robert Garrett wrote:

> Please try the following patch, basically this uses the same
> find_mode() routine as the 4.8 mergemaster did.
> rather than expect the output of the new stat
> 
> Rob
> 
> ===================================================================
> RCS file: /usr/home/dcvs/src/usr.sbin/mergemaster/mergemaster.sh,v
> retrieving revision 1.3
> diff -u -r1.3 mergemaster.sh
> --- mergemaster/mergemaster.sh  24 Jul 2003 06:35:39 -0000      1.3
> +++ mergemaster/mergemaster.sh  25 Jul 2003 11:14:36 -0000
> @@ -670,10 +670,9 @@
> 
>  # 4095 = "obase=10;ibase=8;07777" | bc
>  find_mode () {
> -  local OCTAL
> -  OCTAL=$(( ~$(echo "obase=10; ibase=8; ${CONFIRMED_UMASK}" | bc) & 4095
> &
> -    $(echo "obase=10; ibase=8; $(stat -f "%OMp%OLp" ${1})" | bc) ))
> -  printf "%04o\n" ${OCTAL}
> + OCTAL=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ \
> +    oct("$ARGV[1]"))' "${1}" "${CONFIRMED_UMASK}"`
> +  echo "${OCTAL}"
>  }
lol, I didn't see your patch.. my bad 

Rob



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]