Re: [PATCH 14/17] Add ftruncate implementation for MSVC

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

 



On Mon, Sep 14, 2009 at 15:11, Marius Storm-Olsen <mstormo@xxxxxxxxx> wrote:
> +int ftruncate(int fd, __int64 length)
> +{
> +       HANDLE fh = (HANDLE)_get_osfhandle(fd);
> +       if (!fh || _lseeki64(fd, length, SEEK_SET))

According to MSDN, error is manifested by returning INVALID_HANDLE_VALUE (–1):

http://msdn.microsoft.com/en-us/library/ks2530z6.aspx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]