public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: IA-32 support patch: fcntl64 calls are broken
Date: Wed, 25 Jun 2003 21:06:48 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105657534422322@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105649509512709@msgid-missing>

On Tuesday 24 June 2003 4:51 pm, Arun Sharma wrote:
> Currently, sys32_fcntl64() is broken, because it passes F_*64 commands to sys_fcntl(), which it doesn't understand. The F_XXX64 commands need to be converted to F_XXX before calling sys_fcntl().

As far as I can tell, this is almost equivalent to, but uglier than,
the mips64 version:

	sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
	{
	        switch (cmd) {
	        case F_GETLK64:
	                return sys_fcntl(fd, F_GETLK, arg);
	        case F_SETLK64:
	                return sys_fcntl(fd, F_SETLK, arg);
	        case F_SETLKW64:
	                return sys_fcntl(fd, F_SETLKW, arg);
	        }

	        return sys32_fcntl(fd, cmd, arg);
	}

parisc, ppc64, s390, and sparc64 have this, which I think is
also equivalent, but uglier:

	asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
	{
	        if (cmd >= F_GETLK64 && cmd <= F_SETLKW64)
	                return sys_fcntl(fd, cmd + F_GETLK - F_GETLK64, arg);
	        return sys32_fcntl(fd, cmd, arg);
	}

I'd like to see the ia64 version be similar to the mips64 version.
The remaining difference is the int/long argument; maybe you
can resolve that too...

Bjorn


  parent reply	other threads:[~2003-06-25 21:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-24 22:51 IA-32 support patch: fcntl64 calls are broken Arun Sharma
2003-06-25 16:53 ` Bjorn Helgaas
2003-06-25 18:18 ` Arun Sharma
2003-06-25 21:06 ` Bjorn Helgaas [this message]
2003-06-26  1:27 ` Stephen Rothwell
2003-06-26  5:02 ` Bjorn Helgaas
2003-07-08 18:57 ` Arun Sharma
2003-07-08 19:16 ` Matthew Wilcox
2003-07-08 21:51 ` Arun Sharma
2003-07-15 19:26 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105657534422322@msgid-missing \
    --to=bjorn.helgaas@hp.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox