Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755242Ab1DZMbD (ORCPT ); Tue, 26 Apr 2011 08:31:03 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:58377 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753353Ab1DZMa6 (ORCPT ); Tue, 26 Apr 2011 08:30:58 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=TR+zeBVgSgM9VXNMPk/QGusqEBSDKSr5KHEoduM8yjzdmfS+QcIVkF11glTxoTm6hp 6GgXmTh92uskfUXjFM4KHK+Ey5JcQKyNgdYuPlqgkcsdCHWH9yFNnd0QScQGmeVlcKCw tWT2fdNjgpm6mBKyrC4NJXCJ2tq7S/FU3HgFs= Message-ID: <4DB6BAFF.8080302@gmail.com> Date: Tue, 26 Apr 2011 14:30:55 +0200 From: Jiri Slaby User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0a2) Gecko/20110420 Thunderbird/3.3a4pre MIME-Version: 1.0 To: Amit Ben Shahar CC: linux-kernel@vger.kernel.org Subject: Re: Why is the 'loff_t *offset' parameter in the file_operations' read function a pointer? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 710 Lines: 23 On 04/26/2011 01:58 PM, Amit Ben Shahar wrote: > (if i'm off topic or should look elsewhere i apologize - couldn't find > information anywhere) > I am coding a kernel module and implementing a file's operations, the > read operation received an loff_t *offset parameter, why is this a > pointer? Because you are responsible for changing it appropriately. > is it in userspace? Nope, in kernelspace. I think this is described in LDD3, isn't it? regards, -- js -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/