List Info

Thread: truncate64




truncate64
country flaguser name
Czech Republic
2008-04-23 06:25:43
hi,

Linux defines two syscalls ftruncate64 and truncate64 that
are
defined only on 32bit archs, currently Linuxulator
implementes
ftruncate64 which is defined in linux[32]_machdep.c, ie. in
machine dependant file.

I plan to commit truncate64 but I prefer it to be placed in
linux_file.c which is machine independent. Kostik and I had
a discussion about this yesterday and we didnt agree what
is the best place for these functions.

I think it's better to have it in linux_file.c because the
only problem that can arise is that on platforms that don't
use these syscalls there will be unused function in
linux_file.c
Kostik prefers each linux[32]_machdep.c to have it's own
copy.

So I ask emulation what should be done, do we want this in
linux_file.c
or linux[32]_machdep.c

thnx

roman
Re: truncate64
user name
2008-04-23 06:42:43
On Wed, Apr 23, 2008 at 01:25:43PM +0200, Roman Divacky
wrote:
> hi,
> 
> Linux defines two syscalls ftruncate64 and truncate64
that are
> defined only on 32bit archs, currently Linuxulator
implementes
> ftruncate64 which is defined in linux[32]_machdep.c,
ie. in
> machine dependant file.
> 
> I plan to commit truncate64 but I prefer it to be
placed in
> linux_file.c which is machine independent. Kostik and I
had
> a discussion about this yesterday and we didnt agree
what
> is the best place for these functions.
> 
> I think it's better to have it in linux_file.c because
the
> only problem that can arise is that on platforms that
don't
> use these syscalls there will be unused function in
linux_file.c
> Kostik prefers each linux[32]_machdep.c to have it's
own copy.
> 
> So I ask emulation what should be done, do we want this in
linux_file.c
> or linux[32]_machdep.c

It is wrong to limit the discussion to not quite interesting
case of the
truncate64. There is a lot more duplication, see the
linux{,32}_machdep.c.

I would prefer to have some definite word on the reason for
this.
Re: truncate64
country flaguser name
Russian Federation
2008-05-02 16:36:09
On Wed, 23 Apr 2008, Kostik Belousov wrote:

> On Wed, Apr 23, 2008 at 01:25:43PM +0200, Roman Divacky
wrote:
>> hi,
>>
>> Linux defines two syscalls ftruncate64 and
truncate64 that are
>> defined only on 32bit archs, currently Linuxulator
implementes
>> ftruncate64 which is defined in
linux[32]_machdep.c, ie. in
>> machine dependant file.
>>
>> I plan to commit truncate64 but I prefer it to be
placed in
>> linux_file.c which is machine independent. Kostik
and I had
>> a discussion about this yesterday and we didnt
agree what
>> is the best place for these functions.
>>

It's better to have some the duplicated lines of a code in 
linux[32]_machdep.c, rather than dust (aka more lines of
#ifdef XX32x64) 
in machine independant code.
On an example linux_fcntl64 defined only for 32bit archs,
but look at 
realization of linux_fcntl. The variable of type
linux_fcntl64_args is 
used, which in 64bit world will be undefined.


>> I think it's better to have it in linux_file.c
because the
>> only problem that can arise is that on platforms
that don't
>> use these syscalls there will be unused function in
linux_file.c
>> Kostik prefers each linux[32]_machdep.c to have
it's own copy.
>>
>> So I ask emulation what should be done, do we
want this in linux_file.c
>> or linux[32]_machdep.c
>
> It is wrong to limit the discussion to not quite
interesting case of the
> truncate64. There is a lot more duplication, see the
linux{,32}_machdep.c.
>
> I would prefer to have some definite word on the reason
for this.
>

I think that that there was no mess in the further, it's
necessary to 
transfer a machine dependent code according to definition.

thnx!

-- 
Have fun!
chd
_______________________________________________
freebsd-emulationfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emu
lation
To unsubscribe, send any mail to
"freebsd-emulation-unsubscribefreebsd.org"

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )