Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DCDAC43219 for ; Wed, 1 May 2019 12:07:25 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3347C20651 for ; Wed, 1 May 2019 12:07:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3347C20651 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=metamail.co Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1hLo0v-0006R5-Sf; Wed, 01 May 2019 08:07:05 -0400 Received: from s1.ubiqiti.net ([45.56.103.136]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hLo0t-0006Qz-Ev for kernelnewbies@kernelnewbies.org; Wed, 01 May 2019 08:07:03 -0400 Received: from s1.ubiqiti.net (localhost [127.0.0.1]) by s1.ubiqiti.net (Postfix) with ESMTP id 5431260094 for ; Wed, 1 May 2019 12:07:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at s1.ubiqiti.net Received: from s1.ubiqiti.net ([127.0.0.1]) by s1.ubiqiti.net (s1.ubiqiti.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yyUcW0tlnKS6 for ; Wed, 1 May 2019 12:07:00 +0000 (UTC) Received: from I71607 (unknown [IPv6:2a00:23c3:3780:8600:948b:620:4a56:c9d0]) by s1.ubiqiti.net (Postfix) with ESMTPSA id 461FF60088; Wed, 1 May 2019 12:06:59 +0000 (UTC) From: To: "'Martin Christian'" , References: <009001d4ff4a$2ac6a030$8053e090$@metamail.co> <531b212a-fb20-e2f2-f052-66e37fc5ba68@secunet.com> In-Reply-To: <531b212a-fb20-e2f2-f052-66e37fc5ba68@secunet.com> Subject: RE: debugfs question ... Date: Wed, 1 May 2019 13:06:58 +0100 Message-ID: <013b01d50016$623e2ca0$26ba85e0$@metamail.co> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIG87obfALzWv1Hcvj0rfeZhhsAfgLIG/mkpdwDw/A= Content-Language: en-gb X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org > my guess is your are not returning EOF (= 0). User space expects a return > value of 0 (EOF) to terminate reading. But your code will always return > sizeof("Hello world\n"). A fix would be to not only increment ppos, but also > check if it's already behind your data. > > Regards, > > Martin Thank you, Martin, help much appreciated. It's a bit of a mystery but neither works for me. More detail in my reply to Greg KH. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies