Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 May 2010 23:25:25 +0400
From:      pluknet <pluknet@gmail.com>
To:        gljennjohn@googlemail.com
Cc:        freebsd-hackers@freebsd.org, Knowledge Seeker <knoseeker@googlemail.com>
Subject:   Re: utimes(2): changing the birth time
Message-ID:  <AANLkTim7Cf6nznLJgZQj-vxQtC5ec-cx-uLe8fGHbsRN@mail.gmail.com>
In-Reply-To: <20100512203825.1db158db@ernst.jennejohn.org>
References:  <AANLkTimzR-yTu6S5C49bojmGvGrQ1wQRvcjhKcrlJTg-@mail.gmail.com> <20100512203825.1db158db@ernst.jennejohn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12 May 2010 22:38, Gary Jennejohn <gljennjohn@googlemail.com> wrote:
> On Wed, 12 May 2010 17:53:38 +0000
> Knowledge Seeker <knoseeker@googlemail.com> wrote:
>
>> Hi,
>> Is there a way to set birth time to a value greater(newer) than the actu=
al
>> birth time (not in the future, but not the current time)?
>> The man page utimes(2) says that is only possible to change to an older
>> value.
>>
>> I saw a way to do this by opening a new file, coping the data, setting t=
he
>> other attributes, then calling utimes 2 times to set the birth and the
>> modification time.
>>
>> Is there a way to change it without creating a new file?
>>
>
> Not with the current code. =A0vfs_syscalls.c:setutimes() explicitly check=
s
> that the new time is less than va_birthtime.
>
> Interestingly enough, there's code in the routine to handle what this
> comment in utimes(2) mentions, but it's not implemented yet.
>
> "Ideally a new system call will be added that allows the setting of all
> three times at once."
>

btw, there's a paper someone can find something interesting at.
http://www.usenix.org/events/bsdcon03/tech/full_papers/mckusick/mckusick_ht=
ml/

--=20
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim7Cf6nznLJgZQj-vxQtC5ec-cx-uLe8fGHbsRN>